cbluetoothhidmeegol2cap

Trying to bind bluetooth socket to PSM 17 and 19 returns EACCESS on MeeGo


I am trying to use Nokia N9 (meego) as a virtual Bluetooth mouse/keyboard. I am trying to use this small program as a starting point but I am running into problem: when I am running this program I get an error telling me that "Bind error (PSM 19): Permission denied". This is when a bluetooth socket is being bound to PSM 19.

I get access denied when I run the program as a normal user, also when running as root.

Searching the internet I found that PSM (ports) below 0x1000 are reserved, and that in other bluetooth implementations inability to bind to these PSM is a feature (e.g jsr-82).

I tried the same program with PSM above 0x1000 and it worked, although, other devices could no see that there is a HID device nearby :(

Is there a way to bind to these PSM without resorting to hacking the bluetooth stack itself?


Solution

  • The program must be run as root.