Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
mauromena
Posts: 2
Registered: ‎11-03-2010
My Device: Not Specified

L2CAP server incaming connections

Hi All, I'm porting a MIDlet application to Blackberry platform. And i've a problem with incaming L2cap connections that i don't have on other J2me phones used to test.

 

I've a bluetooth board that after succesful pairing with it start autocalling paired devices to l2cap protocol. Attaching debugger on device the output is: 

 

BT: HCI ACCEPT_CON_REQ
BT: BTEVENT_LINK_CONNECT_IND
net.rim.bluetooth: DC00
BT: ROLE_CHANGE: 1 err=0
BT: BTEVENT_LINK_POLICY_CHNG received
net.rim.bluetooth: EC00
BT: BTEVENT_LINK_DISCONNECT
net.rim.bluetooth: DD13
BT: HCI ACCEPT_CON_REQ
I've set in bluetooth options "discoverable yes" "protection high" and in paired device properties "Trusted yes"
The code on bluetooth thread for listening connections is:
LocalDevice.getLocalDevice().setDiscoverable(DiscoveryAgent.GIAC);
this.url = "btl2cap://localhost:4af244c22f8f46d6b8ba64595b0fd7e1;encrypt=true;authenticate=true;name=btl2capEcho";
this.service = (L2CAPConnectionNotifier) Connector.open(this.url);

this.con = (L2CAPConnection) this.service.acceptAndOpen();

 I've tested with Curve 8900 (4.6.1) and Bold 9000 (5.0.0)

 

Thanks for your attention!

 

Mauro Menazzi

Please use plain text.