SPI not working on Raspberry Pi with ubuntu core

Bug #1705486 reported by Sebastian Weitzel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Undecided
Unassigned
snapd
Fix Released
Undecided
Unassigned

Bug Description

We tried to connect an SPI sensor to a Raspberry PI that uses Ubuntu Core as an operating System but there is no device for SPI showing up. We need SPI for a CAN protocol shield for the Raspberry PI.

Revision history for this message
Oliver Grawert (ogra) wrote :

while it is fairly easy to enable teh spidev overlay in /boot/uboot/config.txt (and we should be easily able to set this as default in the gadget snap), there is currently no interface in snapd that allows spidev access ... adding a snapd task here ...

Revision history for this message
Oliver Grawert (ogra) wrote :

the option to add to /boot/uboot/config.txt is "dtparam=spi=on", you can edit this file manually for the time being and install your snapped application in --devmode until snapd and the gadget bits are fixed (to unblock development etc) as a temporary workaround.

Revision history for this message
Sebastian Weitzel (sebastian2) wrote :

It seems this makes it work. Thanks a lot for that!

Revision history for this message
Oliver Grawert (ogra) wrote :

Awesome to hear :)

If you are done with your application snap, would you mind installing it once without --devmode and capture syslog when running it ?

That way we should be able to find all required bits (via apparmor and seccomp denials that will be recorded in the log) that the spidev interface will need access to.

Revision history for this message
Oliver Grawert (ogra) wrote :

a fix for the pi3 gadget just landed via https://github.com/snapcore/pi3-gadget/pull/12

fixes for pi2 and cm3 (compute module) will follow shortly

the spi interface for snapd is currently in security review at https://github.com/snapcore/snapd/pull/3499

summary: - SPI not working on Raspberry Pi 2 with ubuntu core
+ SPI not working on Raspberry Pi with ubuntu core
Revision history for this message
Michael Vogt (mvo) wrote :

AIUI the gadget snap was updated for all pi2,pi3,cm3. So this should be fixed. Please reopen if I am mistaken.

Changed in snappy:
status: New → Fix Released
Changed in snapd:
status: New → Fix Released
Revision history for this message
Oliver Grawert (ogra) wrote :

note that this is only true for the edge channel ... gadgets in stable, candidate and beta are still affected.

Changed in snappy:
status: Fix Released → Fix Committed
Changed in snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.