Hey all. I recently finished a soon-to-be-published blog series walking the reader through taking a ROS prototype to production with Ubuntu Core. Part of this series is creating a custom gadget snap to expose serial ports to the ROS snap, and creating a custom image with this gadget and ROS snap pre-installed.
This effort ultimately ended in success, but I wanted to provide some feedback about some of the rough edges I encountered while going through this process. This is one of those rough edges, and ate a particularly large chunk of time.
I initially attempted to define the serial-port slot like the following:
However, once I created the image and booted it, that slot didn’t show up in
snap interfaces. At no time during this process was I informed that my slot was invalid simply because I didn’t use a
path that matched
/dev/serial-port-<something>. Snapd warns about invalid interfaces when installing app snaps, it’d be handy if it also warned when creating an image using a gadget snap with invalid interfaces. It would also be nice to get this documented. I logged a bug to discuss this.