Hi,
I have been trying for awhile to get app working that requires access to usb hid. I looked into hot swapping USB feature but it looks like that only supports usb serial interface. The app I am working with here communicates with USB devices over USB HID protocol. I also tried specifying usb-vendor and usb-product thinking that may work but everything I have tried results in the same error:
error:udev_watcher.cc(63)] Failed to begin udev enumeration.
That is except classic confinement, the app works fine with classic confinement so I am asking for exception allowing classic confinement or for auto-connection of hidraw interface. Or if I have missed something and there is another way to make this work that would be great!
Here is the full snapcraft.yaml
name: onlykey-app
version: ‘5.2.0’
summary: Setup and configure OnlyKey
description: |
Use this app to setup and configure OnlyKey for password management and 2-factor authentication.
grade: stable
confinement: classic
parts:
onlykey-app:
plugin: dump
source: OnlyKey_5.2.0_amd64.deb
source-type: deb
after:
- nwjs-support
- desktop-gtk3
stage-packages:
- gir1.2-gnomekeyring-1.0
- libasound2
- libgconf-2-4
- libgl1-mesa-glx
- libglu1-mesa
- libgnome-keyring0
- libcap2
- libgcrypt20
- libnotify4
- libnspr4
- libnss3
- libpulse0
- libxtst6
- libxss1
apps:
onlykey-app:
command: bin/desktop-launch $SNAP/opt/OnlyKey/nw
desktop: usr/share/applications/OnlyKey.desktop
environment:
TMPDIR: $XDG_RUNTIME_DIR
plugs:
- hidraw
- u2f-devices
- onlykey-usb
- network
- x11
- wayland
- desktop
- browser-sandbox
- browser-support
- screen-inhibit-control
plugs:
browser-sandbox:
interface: browser-support
allow-sandbox: true
onlykey-usb:
interface: hidraw
usb-vendor: 7504
usb-product: 24828
path: /dev/hidraw-onlykey