MangOH Red , spidev0.0 after reboot not starts


Hello all,
I am working on MangOH RED + WP8548 + Legato 17.08.0
After reboot of my MangOH Red, spidev0.0 does not start automatically.
I have to give after each reboot:
modprobe spidev
insmod spisvc.ko

How can I solve this issue?


The latest mangOH_Red.sdef mentions spisvc, so the loading of that module should be taken care of by legato automatically. If you want to get spidev loaded automatically, then you need to add it to /etc/modules. There are two ways to do this.

  1. login to your mangOH and edit the /etc/modules file
  2. Modify meta-swi/meta-swi-mdm9x15/recipes-core/base-files/base-files in the yocto tree and rebuild yocto and flash the new image to your system.


Hi @dfrey,

When adding spidev to /etc/modules I still have to manually start spiService. During boot when spiService starts, it gives error:

Feb 19 13:20:46 | supervisor[3403]/supervisor T=main | app.c GetDevID() 644 | Could not get file info for ‘/dev/spidev0.0’. No such file or directory.
Feb 19 13:20:46 | supervisor[3403]/supervisor T=main | app.c SetCfgDevicePermissions() 754 | Failed to set permissions (rw) for app ‘spiService’ on device ‘/dev/spidev0.0’.

But after it has booted you can start spiService without any configuration. If I am correct, /etc/modules should initialize during boot as well. What could be happening here? I have been unable to find any answer to this anywhere. Thanks!


Hey @basti,

I believe I have figured out this problem. Please read my post here: SPI service sometimes fails to start when run in sandbox mode

You can “solve” this problem by modifying $LEGATO_ROOT/apps/platformServices/spiService.adef to specify sandbox: false and removing or commenting the the requires section for /dev/spidev0.0 (see gist). Clean and re-compile Legato for good measure.

Keep in mind this compromises security to some extent. A better solution would involve waiting for /dev/spidev0.0 to be ready before starting the supervisor as discussed in the post above.


Hi @nick,

Thank you very much for this! I have been unable to find an answer for this anywhere (except for some possible fixes involving rebuilding Yocto which I did not have time to test). This actually did solve the issue and spiService can now start automatically.
The security part is not that important for me right now, only building some demo apps and testing out the legato framework. But I will keep that in mind!