03-24-2010 08:32 PM
I trolled around and found this: http://supportforums.blackberry.com/t5/Java-Develo
It does not answer my question so have started a new post.
I am experimenting with bluetooth and HID and want to connect to the control and interrupt channel: 0x0011 and 0x0013.
Code like that below gives: illegalArgumentException: Invalid PSM.
Is this a complete non-starter or is there something obvious I am missing? i.e. certain PSM's are off-limits.
conn = (L2CAPConnection)Connector.open( "btl2cap://" + btAddress + ":" + PSM );
btAddress is a valid bluetooth address (discovered) and PSM is one of "0011" or "0013" (as above)
03-25-2010 04:33 PM
On further digging it looks like I am hooped since this seems to be a "feature" of jsr-82.
From the JSR-82 spec:
The psm in the preceding connection string description represents the Protocol Service Multiplexor (PSM) value for the service. L2CAP server applications on a device can identify themselves with a PSM value, which is assigned by the implementation. Legal PSM values are in the range (0x1001..0xFFFF), and the least significant byte must be odd and all other bytes must be even.
If I am reading this correctly, the PSM in a client connection URL must be in the dynamic range (0x1001..0xFFFF). How can an application connect to a service with a static PSM value (like an HID device with PSM 0x11 and 0x13)??
It would be good to get official RIM confirmation of this limitation in the the jsr-82 in the phones. Any RIMite care to comment?!
If so, then does this exclude making phones function as part of the HID universe?
03-26-2010 11:15 PM
I'm stuck with the same problem. Have you found a solution to the HID PSM range problem?
RIM, any official answer? Is there a way to override the JSR-82 implementation and accept the HID PSMs?
04-01-2010 02:57 PM
No. I was hoping for RIM to give us some official answer!! I think the sad news is that it's just the way jsr-82 is. In some of my 'research' it appears that other implementations do have a way of using the 'restricted port' range.
Good to know we are partners in confusion/frustration/brick wall - sigh.
I'm wondering if we should file it as a bug and then it might get some official response ;-)
11-20-2011 11:39 AM
I would like to play around with HID or see if this has been updated as of recent API updates. Any plans of sharing that sample code?