Context
The Seat Service Example container can be either configured to use a simulated CAN (default) or can be reconfigured to use a physical CAN via environment variables.
We are using the Seat Service container as-is with a physical CAN, connected to an actual ECU via CAN with a real physical seat.
However, the ECU requires calibration on first use and for that purpose, there is a script packaged into the container: tools/ecu-reset.sh
Bug description
Unfortunately, the script errors out when run inside of a container, as the container is missing a required dependency: candump from can-utils.
Steps to reproduce
Configure the container to use SC_CAN=can0 and CAN=can0 environment variables
Start container -> application may print an error ECU is not calibrated, consider running ecu-reset.sh or alike (it's hard to copy&paste from raspi terminal)
Create a shell inside of the container (on Leda, sdv-ctr-exec -n seatservice-example /bin/bash), and execute script tools/ecu-reset.sh -s can0
Scripts errors with candump not found
Tried alternatives / Workaround
Copied the script from GitHub Source Repository to the Leda device
Run the script manually (after fixing the shebang, as there is no bash on Leda)
ECU motor was properly reset
Suggested fix
Easiest: Install can-utils into the seat-service example container, so that the script can be run from within the container.
Advanced: Include the ecu-reset logic into the seat service itself. Imho, a service should be doing that without the user having to run arbitrary scripts somewhere. If there is already a warning and a recommendation in the code, why not just execute it. Or provide an MQTT interface to trigger the ECU reset, that would be much easier to use than opening shells.)
Minor improvement: fix the ecu-reset.sh script to use #!/bin/sh as it seems to be sufficient, not requiring bash.
Context The Seat Service Example container can be either configured to use a simulated CAN (default) or can be reconfigured to use a physical CAN via environment variables.
We are using the Seat Service container as-is with a physical CAN, connected to an actual ECU via CAN with a real physical seat.
However, the ECU requires calibration on first use and for that purpose, there is a script packaged into the container:
tools/ecu-reset.sh
Bug description Unfortunately, the script errors out when run inside of a container, as the container is missing a required dependency: candump from can-utils.
Steps to reproduce
SC_CAN=can0
andCAN=can0
environment variablesECU is not calibrated, consider running ecu-reset.sh
or alike (it's hard to copy&paste from raspi terminal)sdv-ctr-exec -n seatservice-example /bin/bash
), and execute scripttools/ecu-reset.sh -s can0
candump not found
Tried alternatives / Workaround
Suggested fix
#!/bin/sh
as it seems to be sufficient, not requiring bash.