Approval and auto-connection for custom-device interface on matter-pi-gpio-commander

We’ve changed the implementation of matter-pi-gpio-commander to use chardev for GPIO access, and as a result require the use of a custom-device interface. Please refer to the existing discussion here

The custom-device interface slot and plug definitions can be reviewed from the chardev branch. This will be merged into main once we have the approval.

This request is to (1) approve the use of the custom-device and if possible (2) set up an auto connection for it.

Thanks

As it was already discussed, custom device seems to be the right approach to fit matter-pi-gpio-commander needs for now, until gpio-aggregator will be released.

Thus +1 from me for granting matter-pi-gpio-commander auto-connect to custom-device interface

1 Like

for the same reasoning as @jslarraz , +1 from me as well.

1 Like

Could someone else please provide their input on these changes? We would appreciate the assistance from the @review-team. Thank you!

+1 from me as well auto-connection of custom-gpio-dev as it fits the functionality of the snap.

1 Like

+3 votes for, 0 votes against, fast-tracking auto-connect of interface custom-device to snap matter-pi-gpio-commander. This is now live.

2 Likes

Hi,

The interface doesn’t auto-connect on Ubuntu Core.

Ubuntu Core 24:

$ sudo snap install matter-pi-gpio-commander --candidate
matter-pi-gpio-commander (candidate) 2.0+chip-v1.3.0.0 from Canonical IoT Labs installed

$ snap connections matter-pi-gpio-commander 
Interface      Plug                                      Slot                                      Notes
avahi-control  matter-pi-gpio-commander:avahi-control    -                                         -
bluez          matter-pi-gpio-commander:bluez            -                                         -
custom-device  -                                         matter-pi-gpio-commander:custom-gpio-dev  -
custom-device  matter-pi-gpio-commander:custom-gpio      -                                         -
dbus           matter-pi-gpio-commander:otbr-dbus-wpan0  -                                         -
network        matter-pi-gpio-commander:network          :network                                  -
network-bind   matter-pi-gpio-commander:network-bind     :network-bind                             -

Ubuntu Server 24:

$ sudo snap install matter-pi-gpio-commander --candidate
matter-pi-gpio-commander (candidate) 2.0+chip-v1.3.0.0 from Canonical IoT Labs installed

$ sudo snap connections matter-pi-gpio-commander 
Interface      Plug                                      Slot                                      Notes
avahi-control  matter-pi-gpio-commander:avahi-control    -                                         -
bluez          matter-pi-gpio-commander:bluez            -                                         -
custom-device  matter-pi-gpio-commander:custom-gpio      matter-pi-gpio-commander:custom-gpio-dev  -
dbus           matter-pi-gpio-commander:otbr-dbus-wpan0  -                                         -
network        matter-pi-gpio-commander:network          :network                                  -
network-bind   matter-pi-gpio-commander:network-bind     :network-bind                             -

The assertion looks correct to me, as it doesn’t specify that this is just for classic:

type: snap-declaration
format: 5
authority-id: canonical
revision: 2
series: 16
snap-id: r4eNvylFmQlYEKLEU3XP4GEHpcxQCHLD
publisher-id: fnEni7OOr54T1CivYaEi4sGS2RwNJLoY
slots:
  custom-device:
    allow-auto-connection: true
    allow-installation:
      slot-attributes:
        custom-device: gpiochip
        devices:
          - /dev/gpiochip0
          - /dev/gpiochip4
        files:
          read:
            - /sys/devices/platform/soc/\*\.gpio/gpiochip0/dev
            - /sys/devices/platform/axi/\*\.pcie/\*\.gpio/gpiochip4/dev
snap-name: matter-pi-gpio-commander
timestamp: 2024-02-12T15:48:46.376742Z
sign-key-sha3-384: BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul

Any idea @jslarraz ?