0

I've been trying to run a command, when I press the top key on my Bamboo Ink Pen. I realized that it connects via Bluetooth, when I press the button and ceases the connection, when I release it.

I stumbled over Run a script when bluetooth device is connected and when I run

udevadm monitor --environment --udev --kernel --property

and press the button once, I get the following output:

KERNEL[5118.647193] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:3585 (bluetooth)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:3585
SUBSYSTEM=bluetooth
DEVTYPE=link
SEQNUM=4094

UDEV  [5118.657098] add      /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:3585 (bluetooth)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:3585
SUBSYSTEM=bluetooth
DEVTYPE=link
SEQNUM=4094
USEC_INITIALIZED=5118654305
SYSTEMD_ALIAS=/sys/subsystem/bluetooth/devices/hci0:3585
SYSTEMD_WANTS=bluetooth.target
SYSTEMD_USER_WANTS=bluetooth.target
TAGS=:systemd:

KERNEL[5119.311809] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:3585 (bluetooth)
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:3585
SUBSYSTEM=bluetooth
DEVTYPE=link
SEQNUM=4095

UDEV  [5119.317304] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:3585 (bluetooth)
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:3585
SUBSYSTEM=bluetooth
DEVTYPE=link
SEQNUM=4095
USEC_INITIALIZED=5118654305
SYSTEMD_ALIAS=/sys/subsystem/bluetooth/devices/hci0:3585
SYSTEMD_WANTS=bluetooth.target
SYSTEMD_USER_WANTS=bluetooth.target
TAGS=:systemd:

Unfortunately there is no idVendor or idProduct.

When I run

sudo tail -f /var/log/syslog

though, it complains that the file does not exist.

My udev rules looks like this so far.

# Run a program when my Bamboo Ink is connected
ACTION=="add" , SUBSYSTEM=="bluetooth", ATTR{idVendor}=="xxx", ATTR{idProduct}=="yyy", ATTRS{model}=="Bamboo Ink", RUN+="xournalpp"

Guessing the model is "Bamboo Ink", since I found this line in journalctl -b

Feb 26 14:57:35 X380-Yoga kernel: wacom 0005:056A:035F.000C: Unknown device_type for 'Bamboo Ink'. Ignoring.

So I need to find the idVendor, idProduct and model. Is there another way to do that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.