-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start_CAN on startup #397
Comments
Hi @JochenDeprezVintecc there are several possibilities depending on your development approach:
Hope this helps! Any question don't hesitate to ask! |
Hi, I have currently fixed this by creating a custom systemd service. But as far as I understand, this service will disapear if I do a HostOS update. So for production purposes I will probably need to build a container to do the Start_CAN command. I have downloaded a package from your developer zone. But I run into problems with having the wrong c++ compiler. I also am looking into the GPS, will I have to follow the same steps to start GPS? Like build a container and run the command to start it? Because I see no command on the HostOS to start GPS |
Hello @JochenDeprezVintecc, thanks for your question. Regarding the c++ problems, could you please give me some more feedback about the nature of the problems? Maybe a log would be helpful. About the GPS, let me check and I'll come back to you ASAP. Thanks in advance! |
Hi, I have fixed some issues with the c++ compilation but when trying to run make on the ow5x_AN8 module I downloaded from the developer zone I get the following error: root@4fd5059:/rtu# make Building owa5x_AN8 Object |
When building the owa5x_AN3 I seem to be able to run the make command but then on execution of the binary I get also an error to libRTU_Module.so root@4fd5059:/io# make Building owa5x_AN3 Object |
It seems your toolchain is lacking that library. May you give me an email so I can send them to you? They should be located in /usr/lib/owasys and /lib/ Thanks in advance |
Hi, you can email them to: |
Hello Jochen,
I tried to but it was rejected!
[cid:3c18d2f4-ca6e-4a3c-a0b9-267128d4a5ae]
is the email address okey? can I attach zip files to it?
Thanks!
Álvaro Guzmán Juán
R&D Engineer
[Logotipo Descripción generada automáticamente]
Phone: (+34) 946 025 323
E-mail: ***@***.******@***.***>
www.owasys.com<http://www.owasys.com/>
Bizkaia Technology Park, 202
E-48170, Zamudio Bizkaia Spain
This email and any attachment may contain confidential, propietary or legally priviledged information. If you are not the intended recipient of this message, please notify it to the sender and delete it without resending or backing it, as it is legally prohibited.
If you do not want to receive any communication from Owasys, S.L., please send en email to ***@***.******@***.***> or a letter to Owasys, S.L., Bizkaia Technology Park 202, 48170 Zamudio, Bizkaia, Spain.”.
Please think of the environment before printing this email
…________________________________
From: Jochen Deprez ***@***.***>
Sent: Monday, May 27, 2024 11:59 AM
To: balena-os/balena-owa5x ***@***.***>
Cc: Alvaro Guzman ***@***.***>; Mention ***@***.***>
Subject: Re: [balena-os/balena-owa5x] Start_CAN on startup (Issue #397)
Hi, you can email them to:
***@***.******@***.***>
—
Reply to this email directly, view it on GitHub<#397 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2RRXI7YI7HSGMQJSNE7YHLZEL7YJAVCNFSM6AAAAABGUZBG4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGEZDAOJUGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Please, try download it from here: https://owasys.sharepoint.com/:u:/s/support/EbLgaXC9WnRDvvlZhVUGn6QB6t_v2Z68tqiVdmABqsSg5w?e=ueLxID |
Hello @JochenDeprezVintecc did you have the chance to test the libraries? Please let me know, I'm here to help! BR |
Hi, the libRTU errors seem to be gone, now I have some other errors: When running the owa5x_AN3 from within a container, I get the following error: Also when running the Start_CAN binary from within my container, I get the following error: root@4fd5059:/# ./Start_CAN 1 It seems to be the same kind of error with the socket communication My container is running in privileged mode though |
Hi @owzagj, any idea how I could resolve the socket communication error? |
Hi Jochen,
You have to map the sockets from the native rootfs into the container's. Try this workaround in the container definition file:
services:
myservice:
volumes:
- hosttmp:/tmp
volumes:
hosttmp:
driver_opts:
type: none
o: bind
device: /tmp
Also in dockers containers you can:
1.
Run the container in priviledge mode:
*
$ docker run --privileged -d whatever
2.
Map the rootfs
*
docker run -v /sys:/sys -d whatever
3.
To access the RTU lib map the sockets /tmp/PMsck, /tmp/Tmsck
You can find info in this links:
https://stackoverflow.com/questions/58113780/access-shared-library-inside-a-docker-container
https://docs.balena.io/learn/develop/hardware/
BR
Álvaro Guzmán Juán
R&D Engineer
[Logotipo Descripción generada automáticamente]
Phone: (+34) 946 025 323
E-mail: ***@***.******@***.***>
www.owasys.com<http://www.owasys.com/>
Bizkaia Technology Park, 202
E-48170, Zamudio Bizkaia Spain
This email and any attachment may contain confidential, propietary or legally priviledged information. If you are not the intended recipient of this message, please notify it to the sender and delete it without resending or backing it, as it is legally prohibited.
If you do not want to receive any communication from Owasys, S.L., please send en email to ***@***.******@***.***> or a letter to Owasys, S.L., Bizkaia Technology Park 202, 48170 Zamudio, Bizkaia, Spain.”.
Please think of the environment before printing this email
…________________________________
From: Jochen Deprez ***@***.***>
Sent: Tuesday, June 11, 2024 11:32 AM
To: balena-os/balena-owa5x ***@***.***>
Cc: Alvaro Guzman ***@***.***>; Mention ***@***.***>
Subject: Re: [balena-os/balena-owa5x] Start_CAN on startup (Issue #397)
Hi @owzagj<https://github.com/owzagj>, any idea how I could resolve the socket communication error?
—
Reply to this email directly, view it on GitHub<#397 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2RRXI3ATOP27K5BABBQP73ZG2737AVCNFSM6AAAAABGUZBG4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQGI2TEMRSG4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi again,
you may also find interesting the tutorial attaached tutorial for owa5X and docker.
Regards
Álvaro Guzmán Juán
R&D Engineer
[Logotipo Descripción generada automáticamente]
Phone: (+34) 946 025 323
E-mail: ***@***.******@***.***>
www.owasys.com<http://www.owasys.com/>
Bizkaia Technology Park, 202
E-48170, Zamudio Bizkaia Spain
This email and any attachment may contain confidential, propietary or legally priviledged information. If you are not the intended recipient of this message, please notify it to the sender and delete it without resending or backing it, as it is legally prohibited.
If you do not want to receive any communication from Owasys, S.L., please send en email to ***@***.******@***.***> or a letter to Owasys, S.L., Bizkaia Technology Park 202, 48170 Zamudio, Bizkaia, Spain.”.
Please think of the environment before printing this email
…________________________________
From: Alvaro Guzman ***@***.***>
Sent: Wednesday, June 12, 2024 11:19 AM
To: balena-os/balena-owa5x ***@***.***>
Subject: Re: [balena-os/balena-owa5x] Start_CAN on startup (Issue #397)
Hi Jochen,
You have to map the sockets from the native rootfs into the container's. Try this workaround in the container definition file:
services:
myservice:
volumes:
- hosttmp:/tmp
volumes:
hosttmp:
driver_opts:
type: none
o: bind
device: /tmp
Also in dockers containers you can:
1.
Run the container in priviledge mode:
*
$ docker run --privileged -d whatever
2.
Map the rootfs
*
docker run -v /sys:/sys -d whatever
3.
To access the RTU lib map the sockets /tmp/PMsck, /tmp/Tmsck
You can find info in this links:
https://stackoverflow.com/questions/58113780/access-shared-library-inside-a-docker-container
https://docs.balena.io/learn/develop/hardware/
BR
Álvaro Guzmán Juán
R&D Engineer
[Logotipo Descripción generada automáticamente]
Phone: (+34) 946 025 323
E-mail: ***@***.******@***.***>
www.owasys.com<http://www.owasys.com/>
Bizkaia Technology Park, 202
E-48170, Zamudio Bizkaia Spain
This email and any attachment may contain confidential, propietary or legally priviledged information. If you are not the intended recipient of this message, please notify it to the sender and delete it without resending or backing it, as it is legally prohibited.
If you do not want to receive any communication from Owasys, S.L., please send en email to ***@***.******@***.***> or a letter to Owasys, S.L., Bizkaia Technology Park 202, 48170 Zamudio, Bizkaia, Spain.”.
Please think of the environment before printing this email
________________________________
From: Jochen Deprez ***@***.***>
Sent: Tuesday, June 11, 2024 11:32 AM
To: balena-os/balena-owa5x ***@***.***>
Cc: Alvaro Guzman ***@***.***>; Mention ***@***.***>
Subject: Re: [balena-os/balena-owa5x] Start_CAN on startup (Issue #397)
Hi @owzagj<https://github.com/owzagj>, any idea how I could resolve the socket communication error?
—
Reply to this email directly, view it on GitHub<#397 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2RRXI3ATOP27K5BABBQP73ZG2737AVCNFSM6AAAAABGUZBG4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQGI2TEMRSG4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi, I do not see the attachment. |
owa5x_HW_Docker_setup ATo achieve a easy deployment for a big number of Owa devices, it is a good idea to use docker images, due to the ease of setup on a new device and the posibility of deploying in a bulk using Docker Compose. In this tutorial is exposed how to create a new docker container and how to set it up so it comunicates with the rest of HW modules in the Owa. For the purpose of this tutorial an Owa_5x running FW_1.1.0 has been used. RequisitesDocker installed on the Owa: Refer to the tutorial on the official website: https://docs.docker.com/engine/install/debian/ Creating docker imageThe next command will create a docker container with debian with access to corresponding sockets. docker run -v /tmp/PMsck:/tmp/PMsck -v /tmp/TMsck:/tmp/TMsck --privileged -it debian Installing required librariesOnce on the command prompt inside the container, take the container_id, which is displayed on the hostname part of the command prompt. Open another terminal on the Owa and run the following commands to install the Owasys libraries inside the docker container. ##RUN IN OWA TERMINAL
docker cp /lib/libFMS_Module.so d1d9beb4e833:/lib/
docker cp /lib/libGPS2_Module.so d1d9beb4e833:/lib/
docker cp /lib/libGSM_Module.so d1d9beb4e833:/lib/
docker cp /lib/libINET_Module.so d1d9beb4e833:/lib/
docker cp /lib/libIOs_Module.so d1d9beb4e833:/lib/
docker cp /lib/libRTU_Module.so d1d9beb4e833:/lib/
docker cp /lib/owasys/ d1d9beb4e833:/lib/
docker cp /usr/lib/aarch64-linux-gnu/libasound.so.2 d1d9beb4e833:/usr/lib/aarch64-linux-gnu/
docker cp /usr/lib/aarch64-linux-gnu/libasound.so.2.0.0 d1d9beb4e833:/usr/lib/aarch64-linux-gnu/ Installing your script/program on the containerLast thing is to install the program so it can be executed inside the docker container, in this tutorial Start_BT_WiFi will be used for demonstration purposes. ##RUN IN OWA TERMINAL
docker cp /usr/bin/Start_BT_WiFi d1d9beb4e833:/usr/bin/ Running the programOnce the previous steps are completed, the container can be used as if it was the Owa. ##RUN IN DOCKER CONTAINER
root@d1d9beb4e833:/ Start_BT_WiFi 1
BT/WIFi ENABLE OK
##Dmesg OUTPUT
[ 6121.652336] BT: Loading driver
[ 6121.758971] BT Request firmware: nxp/sdsd8987_combo.bin
[ 6122.872029] BT: FW download over, size 607832 bytes
[ 6123.893987] BT FW is active(10)
[ 6123.911200] BT: Driver loaded successfully History
|
Please @JochenDeprezVintecc , let's move this conversation to the email so I can send you files and so on: BR |
Hello @owzagj - I have the same problem, I would need to start can from the docker application. I can copy the libraries to the docker image but the issue is with socket communication. Balena does not allow bind mounts. Trying to mount the sockets with:
Gives you an error from Balena: Could you please advice on how to overcome this? |
I suggest we would always start CAN on boot: #545 |
As discussed in balena-os#397 starting CAN communication from within balena docker applications is difficult due to needing owasys libraries in the image and needing to mount sockets to the running container. This commit enables CAN on boot. Changelog-entry: Start CAN on boot
As discussed in balena-os#397 starting CAN communication from within balena docker applications is difficult due to needing owasys libraries in the image and needing to mount sockets to the running container. This commit enables CAN on boot. Changelog-entry: Start CAN on boot
As discussed in balena-os#397 starting CAN communication from within balena docker applications is difficult due to needing owasys libraries in the image and needing to mount sockets to the running container. This commit enables CAN on boot. Changelog-entry: Start CAN on boot Signed-off-by: Otto Laitila <[email protected]>
As discussed in balena-os#397 starting CAN communication from within balena docker applications is difficult due to needing owasys libraries in the image and needing to mount sockets to the running container. This commit enables CAN on boot. Changelog-entry: Start CAN on boot Signed-off-by: Otto Laitila <[email protected]>
As discussed in balena-os#397 starting CAN communication from within balena docker applications is difficult due to needing owasys libraries in the image and needing to mount sockets to the running container. This commit enables CAN on boot. Changelog-entry: Start CAN on boot Signed-off-by: Otto Laitila <[email protected]>
As discussed in balena-os#397 starting CAN communication from within balena docker applications is difficult due to needing owasys libraries in the image and needing to mount sockets to the running container. This commit enables CAN on boot. Changelog-entry: Start CAN on boot Signed-off-by: Otto Laitila <[email protected]>
As discussed in balena-os#397 starting CAN communication from within balena docker applications is difficult due to needing owasys libraries in the image and needing to mount sockets to the running container. This commit enables CAN on boot. Changelog-entry: Start CAN on boot Signed-off-by: Otto Laitila <[email protected]>
@owzagj Is there some kind of service we can enable so the Start_CAN command gets executed on boot. This way the CAN interfaces are immediately active.
I get the point of not enabling them if you do not need them.
But I suppose most use cases with the owa5x will require them so being able to enable them from startup would be quite nice.
The text was updated successfully, but these errors were encountered: