lvpb
September 24, 2018, 8:14am
1
I made a app on a pi3 with the ubuntu-core system which use the spi interface.
But I didn’t find that interface by using “snap interfaces”.
And the content that “dtparam=spi=on” already exists in the configured.txt
“dtparam=i2c_arm=on
dtparam=i2c_vc=on
#i2s=on
dtparam=spi=on
dtparam=act_led_trigger=heartbeat
dtparam=pwr_led_trigger=mmc0
dtparam=audio=on
device_tree_address=0x02000000
core_freq=250
enable_uart=1
dtoverlay=vc4-kms-v3d”
but i still don’t find the spi option in the “snap interfaces list”, so what should I do??
thanks
ogra
October 12, 2018, 10:40am
2
there is a not yet released stable image at:
http://cdimage.ubuntu.com/ubuntu-core/16/stable/20181010.1/ubuntu-core-16-armhf+raspi3.img.xz
that has a new gadget which should list all gpio interfaces, feel free to try it …
getty23
February 27, 2019, 8:10pm
3
I was also trying to use the SPI interface on my RPI3 with Ubuntu Core but I do not find the interface pi3:spidev0.0 (not listed when executing snap interfaces
).
If I check my versions it says:
pi2-kernel 4.4.0-1103.111 82 stable canonical✓ kernel
pi3 16.04-0.6 27 stable canonical✓ gadget
core 16-2.37.2 6409 stable canonical✓ core
So I’d expect to see the interface because the pi3 gadget 16.04-0.6 contains the interfaces (compare https://github.com/snapcore/pi3-gadget/blob/master/snapcraft.yaml ).
By the way I see a lot of pi3:bcm-gpio-7 slots but just no spi slot.
Did I miss something? Would be great if you could help here.
Thanks
Update: I also checked with Ubuntu Core 18 but still I do not see the pi:spidev0.0 interface.
Compare my versions:
core18 18 733 stable canonical✓ base
pi 18-0.1 2 18-pi3 canonical✓ gadget
pi-kernel 4.15.0-1031.33 21 18-pi3 canonical✓ kernel
snapd 2.37.2 2348 stable canonical✓ snapd
Any idea? I slightly remember that I might have read in some forum post (I do not find it again) that the dot “.” in spidev0.0 might be a problem.
Any idea? Am I the only one who does not see the SPI interfaces on my Ubuntu Core Pi?
It would be great to get some help here because I’d really like to use the interface.
Thanks
Can you please provide the output of:
snap interface
Sure, here is the output
Slot Plug
:account-control -
:adb-support -
:alsa -
:autopilot-introspection -
:block-devices -
:bluetooth-control -
:broadcom-asic-control -
:browser-support -
:camera -
:can-bus -
:cifs-mount -
:classic-support -
:core-support -
:cpu-control -
:daemon-notify -
:dcdbas-control -
:device-buttons -
:display-control -
:docker-support -
:dvb -
:firewall-control -
:framebuffer -
:fuse-support -
:gpg-keys -
:gpg-public-keys -
:gpio-memory-control -
:greengrass-support -
:hardware-observe -
:hardware-random-control -
:hardware-random-observe -
:home -
:hostname-control -
:io-ports-control -
:joystick -
:kernel-module-control -
:kernel-module-observe -
:kubernetes-support -
:kvm -
:log-observe -
:lxd-support -
:mount-observe -
:netlink-audit -
:netlink-connector -
:network -
:network-bind -
:network-control -
:network-observe -
:network-setup-control -
:network-setup-observe -
:opengl -
:openvswitch-support -
:personal-files -
:physical-memory-control -
:physical-memory-observe -
:ppp -
:process-control -
:raw-usb -
:removable-media -
:shutdown -
:snapd-control -
:ssh-keys -
:ssh-public-keys -
:system-files -
:system-observe -
:system-trace -
:time-control -
:timeserver-control -
:timezone-control -
:tpm -
:u2f-devices -
:uhid -
network-manager:service -
pi3:bcm-gpio-0 -
pi3:bcm-gpio-1 -
pi3:bcm-gpio-10 -
pi3:bcm-gpio-11 -
pi3:bcm-gpio-12 -
pi3:bcm-gpio-13 -
pi3:bcm-gpio-14 -
pi3:bcm-gpio-15 -
pi3:bcm-gpio-16 -
pi3:bcm-gpio-17 -
pi3:bcm-gpio-18 -
pi3:bcm-gpio-19 -
pi3:bcm-gpio-2 -
pi3:bcm-gpio-20 -
pi3:bcm-gpio-21 -
pi3:bcm-gpio-22 -
pi3:bcm-gpio-23 -
pi3:bcm-gpio-24 -
pi3:bcm-gpio-25 -
pi3:bcm-gpio-26 -
pi3:bcm-gpio-27 -
pi3:bcm-gpio-3 -
pi3:bcm-gpio-4 -
pi3:bcm-gpio-5 -
pi3:bcm-gpio-6 -
pi3:bcm-gpio-7 -
pi3:bcm-gpio-8 -
pi3:bcm-gpio-9 -
pi3:bt-serial -
pi3:i2c-0 -
pi3:i2c-1 -
pi3:i2c-2 -
wifi-ap:control -
Thanks for the support.
One additional note: When I check /snap/pi3/current/meta/snap.yaml I see the spi interfaces
spidev0.0:
interface: spi
path: /dev/spidev0.0
spidev0.1:
interface: spi
path: /dev/spidev0.1
I think the names in the pi3 gadget snap are simply rejected by the validator. CC @ogra
After a bit of research it seems to me that the yaml keys “spidev0.1” is just not valid because of the dot and therefore not considered. I did not see that the schema validator (https://github.com/snapcore/snapcraft/blob/master/snapcraft/project/_schema.py and https://github.com/snapcore/snapcraft/blob/master/schema/snapcraft.json ) seems to be the problem. But I might have overlooked something over here.
Could we change the key names? spidev0.0 -> spidev0-0?
I also saw some notation like “[spidev0.0]”: … but not sure if this would work out.
What do you think?
1 Like
CC @pedronis and @ogra
Yes. I think we should fix the gadget snap.
1 Like
Can I do something to support here?
ogra
March 7, 2019, 8:09am
12
as i said on IRC yesterday, this is open since november, waiting for review/merge …
https://github.com/snapcore/pi3-gadget/pull/20
perhaps you or @sil2100 could merge it
Great, thanks for that. I was just checking if a new build is available to test it. Though I think the build (pi3 : Snap packages : “Canonical Foundations Team” team ) is not yet triggered because it is taking the source from here lp:~canonical-foundations/snap-pi3/+git/github-mirror : Git : Code : Gadget snap for Raspberry Pi 3 . Though this is a github mirror of the pi3-gadget master → https://github.com/CanonicalLtd/pi3-gadget which is two commits behind the master.
I hope I figured it out in the right way
Could we also update the branch so that I can test the gadget after it is build?
Any update on this? Would be fantastic if someone could support to merge this part here, so that I can test it.
Thanks
ogra
March 12, 2019, 10:33am
16
i fear @sil2100 needs to pull it into CanonicalLtd/pi3-gadget from snapcore/pi3-gadget since the CanonicalLtd tree is a fork …
Thanks. @sil2100 could you or someone else help here? It would be fantastic to get the merge, so that we can test it. If I can do anything, let me know.
Best regards
ogra
March 14, 2019, 5:26pm
18
the pi3 snap has been updated in the edge channel … please try a:
snap refresh --edge pi3
on your installed system and see if the spi interfaces show up after a reboot in snap interfaces
.
1 Like
great, thanks a lot. It is working and I can see the interface now
3 Likes
I was just in the process of setting up my snap on Core 18 with RPI and it seems that over there the SPI interface is not available on stable channel. Could this be updated as well?
Thanks a lot