Hello @davidc,
Thanks for the suggestion and it is inline with what I tried.
I did develop a Leato App to initiate some of the dependencies of our application. One of them is running the spidev32766.1 initialization command as given by @dfrey.
Initially, I tried keeping all the commands in a shell script. However, as it was lacking control on the results/returns, I made them as individual commands and executing from the Legato app. This app runs only once on a reboot.
The steps around this are as below…
- execute the command for
spi32766.1
(channel_config setup) - Start the
spiService
- Check for the spi devices (/dev/spi*). Here I expect 2 devices (/dev/spidev.0 and /dev/spidev32766.1)
- But for me, at this moment, spiService is failing because it’s not able to create /dev/spidev.0
- So, restart the spiService and check again. (Steps 3 and 5 are executed for 5 times before the result is achieved). Mostly for the second or third time, the result is achieved.
Not sure why spiService is failing for the first executed though. (the error is - Failed to set the permissions for spidev.0, as the device is not created).
Though this is not a robust solution, it is working most of the times.
One question is - when a client application fails/terminates, the service also terminates.
Is this by design? How can this be controlled i.e. not to terminate the service?
Idea is to set a fault action to the client application to restart. In this case, the client fails because Service is not running.
Let me know if any suggestions.
@asyal & @Bobby, this is one of the items on the Auto Start Issues that we are trying along with WiFi Configuration at Boot time.