Raspberry Pi 2 missing GPIO slot

Using the official rpi Ubuntu Core image, these are the interfaces I see:

$ snap interfaces
Slot                      Plug
:account-control          -
:alsa                     -
:autopilot-introspection  -
:bluetooth-control        -
:broadcom-asic-control    -
:browser-support          -
:camera                   -
:classic-support          classic
:core-support             core:core-support-plug
:dcdbas-control           -
:docker-support           -
:firewall-control         -
:framebuffer              -
:fuse-support             -
:greengrass-support       -
:hardware-observe         -
:hardware-random-control  -
:hardware-random-observe  -
:home                     -
:io-ports-control         -
:joystick                 -
:kernel-module-control    -
: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      -
:physical-memory-control  -
:physical-memory-observe  -
:ppp                      -
:process-control          -
:raw-usb                  -
:removable-media          -
:shutdown                 -
:snapd-control            -
:system-observe           -
:system-trace             -
:time-control             -
:timeserver-control       -
:timezone-control         -
:tpm                      -
:uhid                     -

Notably, the pi2 gadget isn’t providing any slots:

$ snap interfaces pi2
Slot  Plug

How do I access GPIO? Is something missing from the gadget, or am I expected to roll my own if I want to access GPIO (just like serial ports)?

I don’t see i2c, either. It looks like they’re all specified here at least…

I tried this just in case it was a presentation-layer problem, but no go:

$ sudo snap connect my-snap-name:gpio pi2:bcm-gpio-0
error: snap "pi2" has no slot named "bcm-gpio-0"

@ogra I could use some guidance.

I would also like to see avahi-observe and avahi-control interfaces on the RPI.

dont use the stable image until gadget upgrades work …

then install the avahi snap, it should provide both …

@lundmar please open your own topic rather than redirecting my cry for help :slight_smile: .

dont use the stable image until gadget upgrades work …

@ogra ouch, really? I literally just installed this image though. Should I create a new one based on another channel?

Also, while I’m unclear how this could be due to an old gadget since i2c was working back in the 15.04 days, does that mean we should be rolling new stable Ubuntu Core images more regularly?

yes, from … http://cdimage.ubuntu.com/ubuntu-core/16/edge/current/

the frequency of image generation does not matter, as long as gadget (and along with that the kernel snap) can not be moved to the stable channel for the pi2/3, we are stuck with the status quo … both snaps need to move over …

Surely there’s something more stable than edge that has this issue fixed? I’m trying to create another series here, I don’t want to recommend people use edge images.

sorry, there is only edge … due to the nature of the pi’s, there is a tie between kernel and gadget and they can only be moved together … but since gadget upgrades do not work (yet ?) installed images might break due to a wrong dtb (old dtb with newer kernel)… this can only move forward once the gadget can be updated on the device…

Yikes. So we just have broken pi2/3 images and have to live with it? I remember talking about gadget updates in London, do you know the priority of this work (that’s snapd, right?)?

@kyrofa @ogra We’ve recently investigated this case and there’s actually no real reason to hold these upgrades back. We just need to do the work and cook new images that have a kernel approved by the kernel team.

Well, they work, but are missing features …
Not sure where in the core teams schedule gadget/bootloader upgrades are … i know they have been scheduled multiple times over the last year but fell off the schedule due to more urgent bits …

Thanks @niemeyer. Who’s responsibility is this?

@kyrofa We’re working together with the kernel team on this, but things changed hands recently in this exact area, so I need to go after it and make sure we have a champion that will take it all the way.

1 Like

Alright, thanks @niemeyer. I look forward to that happening. Until then, I’ll start recommending the edge image if anyone needs GPIO.

Recommend them to do a:

snap refresh core --stable

right after install … then they at least get the stable core …

1 Like