This represents the interface to the iClebo Kobuki from Yujin Robot. Its driver is configured by default to expect the device to be available at /dev/kobuki, so that's what I used for the path in the slot definition.
However, after I generated an image with this gadget and booted it, my interface was nowhere to be found. After a day, I learned by talking to people that this was due to regex used to validate the udev symlink: https://github.com/snapcore/snapd/blob/master/interfaces/builtin/serial_port.go#L58 . Indeed, once I changed the path to /dev/serial-port-kobuki, this worked as expected.
This information was not given on the interface documentation (https://github.com/snapcore/snapd/wiki/Interfaces#serial-port), but more importantly, no feedback was provided to me at any point in the process about the fact that my slot was completely invalid. This experience could probably be improved.
I have a gadget snap with the following interface:
slots:
usb-product: 0x6001
kobuki:
interface: serial-port
path: /dev/kobuki
usb-vendor: 0x0403
This represents the interface to the iClebo Kobuki from Yujin Robot. Its driver is configured by default to expect the device to be available at /dev/kobuki, so that's what I used for the path in the slot definition.
However, after I generated an image with this gadget and booted it, my interface was nowhere to be found. After a day, I learned by talking to people that this was due to regex used to validate the udev symlink: https:/ /github. com/snapcore/ snapd/blob/ master/ interfaces/ builtin/ serial_ port.go# L58 . Indeed, once I changed the path to /dev/serial- port-kobuki, this worked as expected.
This information was not given on the interface documentation (https:/ /github. com/snapcore/ snapd/wiki/ Interfaces# serial- port), but more importantly, no feedback was provided to me at any point in the process about the fact that my slot was completely invalid. This experience could probably be improved.