7

I need to identify a my bluetooth pen in the /dev directory, because I want to create a udev rule for it. Unfortunately I can't find it. Can anyone help me?

neolith
  • 243

1 Answers1

0

Serial bluetooth devices which you typically connect via rfcomm are named with the same suffix. E.g. /dev/rfcomm0

If you connect your device in a different way, you should consider to use the belonging tool (which is in the most cases bluez/ bluetoothctl or hcitool).

For an udev-bluetooth example where hcitool is used, have a look at Making udev rule for bluetooth keyboard

Maze
  • 120
  • I have no rfcomm0 listed in /dev. I also tried the solution for the bluetooth keyboard, but it doesn't work. My devices hidraw0 and hidraw1 are the Wacom tablet and not the pen. I tried to access the pen via its MAC address, but without success. hcitool seems to be deprecated and I can't access bluetoothctl. I actually don't care how to accomplish this. I just want to map a command to this button – neolith Mar 02 '20 at 19:30
  • I would bet the pen is not connected directly to your device. Only the whole tablet and the tablet recognize the actions of the pen and send it to your device (but maybe the hidraw1 could be the stylus). In your case I would go trough the driver (possible the X Driver) to remap buttons and not via udev. I don't know which distribution you have, but maybe you can find something useful here: https://wiki.archlinux.org/index.php/Wacom_tablet#Remapping_buttons and the driver overview here https://linuxwacom.github.io/ – Maze Mar 02 '20 at 23:35
  • If you need further helps, ask another a more specific question here like "Remap button of wacom stylus" and provide information about your kernel version and distribution (or edit your question here to be more specific). – Maze Mar 03 '20 at 14:14
  • I am pretty sure that it connects to the device. There are three buttons on the pen and two of them are configurable via the Wacom utility. The third one establishes a bluetooth connection. As long as you press the button the device can connect to "Bamboo Ink" via bluetooth. When you release the button, the pen disconnects. So I am pretty sure that his is the right way. It is just hard to find the right information for the udev rule. I already wrote an extended explanation here, but nobody responded. – neolith Mar 04 '20 at 08:26
  • https://unix.stackexchange.com/questions/569814/how-can-i-run-a-command-when-i-press-the-top-button-of-my-bamboo-ink-pen – neolith Mar 04 '20 at 08:26
  • So you want to remap the bluetooth-connect button ? (And you are able to change the other buttons through the wacom utility right?) – Maze Mar 04 '20 at 14:43
  • Yes, I am able to change the other buttons. The top button does not work the same way though. This is a Wacom pen and it doesn't need bluetooth, but when I press the top button, I am able to connect to the pen as a bluetooth device. This does not have any effect whatsoever, so I want my system to perform an action, when I connect to the pen via bluetooth. – neolith Mar 10 '20 at 07:55