I would like my application snap to automatically connect to serial-port and joystick interface. The joystick interface is provided by core (through dtb) and serial-port interface is provided by the gadget snap.
I am using Ubuntu core 18, compile my own gadget snap and also have my own brand-store.
The slots and plugs have been defined as shown.
I have added the following in the gadget.yaml of gadget snap
+ - plug: <Snap ID of application snap>:serial-port
+ slot: <Snap ID of gadget snap>:serial-port
+ - plug: <Snap ID of application snap>:joystick
+ slot: system:joystick
and on the application snapcraft.yaml file I have added the following
I find that the plugs and slots do not connect automatically. Is my configurations correct? Am I missing anything?
N.B.: Snap ID’s were obtained from the Brand-store. But I am using the snaps locally as I would like to push the snaps after they work correctly
Steps followed for testing
I build the image using the command
UBUNTU_STORE_ID=xxxxx UBUNTU_STORE_AUTH_DATA_FILENAME=./store.auth ubuntu-image snap -c stable --snap gadget_xxxx.snap -O ./build --cloud-init cloud-init.conf device.model
Installed the image, then scp the applictaion snap and install the application using the command
snap install application.snap --dangerous.
Also I find that the
snap know serial has a correct entry.