-
Notifications
You must be signed in to change notification settings - Fork 7
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
Tools for serial ports as container #128
Comments
I would suggest If Another thought: Usually serial devices can only be used by one process exclusively, I don't know if that will work out with multiple containers that want to access the same device. BTW, this is one of the reasons, why software like gpsd exists. |
Hm that's a good point. The conceptual idea is to have services containerized, e.g. a "Location Service" which can be deployed or undeployed at runtime depending on the needs of the current situation. We also don't know whether the GPS module will be on the same device, or whether it is on another device in the vehicle network (a separate CCU, a separate HPC, ...) The services expose their interface using a standardized higher-level API to vehicle applications (VSS via Kuksa.VAL databroker). For the first two scenarios, the difference is only the configuration of gpsd, which is easily done via environment variable or config files mounted into a container. It's not a "static" system configuration per device model any more, but becomes part of the cloud-managed system configuration ("Desired State"). For the third scenario, the interface may be a customized, proprietary implementation, but from the viewpoint of the vehicle app, it's still the same interface. (These kind of things happen a lot in commercial setups) The general idea of the SDV container layer is to "shrink" the layers related to the base system (OS, drivers, ...) and put more responsibility or flexibility into the top layers, which are more dynamic in nature. Regarding the "the serial port can only be used by one process" topic: in production mode (eg once configured correctly), it would only be accessed by gpsd. in dev mode, I would stop the gpsd container and start the "serial-tools" container. This is great for development time, troubleshooting, hackathons etc. And I would only install the deployment descriptors if I have a gps device. |
graph TD;
app-->databroker;
databroker-->gps2val;
gps2val-->gpsd;
gpsd-->serial;
gpsd-->CAN;
databroker-->custom2val;
custom2val-->SomeIP;
SomeIP-->LocService;
|
Tio can probe serial ports and work as a simple (good enough) terminal. Implemented in eclipse-leda/meta-leda#198 With this I think the current issue can be closed. |
It should be possible and easy for a Leda user to configure and troubleshoot serial ports.
Example use cases:
Enabling GPS HAT requires testing via "AT" commands on serial port.
Vendor documentaiton of the GPS HAT often is based on RaspiOS tutorials, which can rebuild .c files natively, and serial terminals like minicom are either preinstalled or can easily be installed via apt.
On Leda, it's much harder to get the tools installed. Our concept for that is containers. But there are no prebuilt containers for such tools (or they are very outdated, or for wrong platform etc.).
Leda should provide tutorial / documentation / preconfigured container descriptor or maybe even container images with the following tools (list is not exclusive):
It's also good to document how to configure the containers, e.g. do they need to run in privileged more, or can serial devices be mapped into Kanto containers etc. How does the sysfs filesystem under
/sys
mapped into the containers. Does it require write access or additional Linux capabilities (permission).Current manual workflow:
Let's focus on specific GPS and GSM devices.
The text was updated successfully, but these errors were encountered: