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?
PSM 17 & 19 is for HID profile usage. The phone you mentioned Nokia N9 does not support the HID profile, so it makes sense that the connection request is being rejected. You can see the supported features / profiles on any Bluetooth device at the Bluetooth Qualified listings site .. This phones features are listed here https://www.bluetooth.org/tpg/QLI_viewQDL.cfm?qid=18246
EDIT: Per comments below it seems like you are trying to make the N9 a HID device by running the program on the N9 where you are getting the bind error. Possible reasons could be - Some other service / deamon is already bound to this same PSM, or the stack is configured not to accept dynamic binding to reserved PSMs and thus reject binds to PSM for profiles it does not support. The last one makes sense since it is a qualified stack and does not want to allow profile extensions via applications (like the small program trying to make it a HID client).
The program must be run as root.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With