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

Native Development

Reply
New Contributor
rajeshsinghal
Posts: 7
Registered: ‎10-11-2012
My Device: Dev Alpha B
Accepted Solution

Blackberry 10 : Problem in Bluetooth SPP APIs

Hi All,

 

Has anyone used Bluetooth SPP APIs in Blackberry SDK 10?

 

I used bt_spp_open for connection to remote SPP server (paired already manually) but the API is returning ENODATA always.

 

bt_device_init and bt_spp_init were succesfully called before the above API.

 

The parameters used for  the bt_spp_open were:

1) mac address of the server,

2) services UUID which was "0x1101",

3) true for nonblocking mode

 

Target device OS version used: 10.0.9.388

 

Anyone having experience on using Bluetooth API in BB10. Please help..Thanks in advance.

New Contributor
rajeshsinghal
Posts: 7
Registered: ‎10-11-2012
My Device: Dev Alpha B

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

Gentle Reminder!!!

Any one please help in resolving  the SPP APIs,,,,

New Contributor
rajeshsinghal
Posts: 7
Registered: ‎10-11-2012
My Device: Dev Alpha B

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

Its urgent...Can anyone provide any clue..

New Contributor
rajeshsinghal
Posts: 7
Registered: ‎10-11-2012
My Device: Dev Alpha B

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

[ Edited ]

I tried to use blackberry as SPP sever using bt_spp_open_server API which is also not behaving consisstamtly..sometimes it is returning -1 and sometimes positive value.

Please help.... 

 

Contributor
hishamBakr
Posts: 45
Registered: ‎04-11-2012
My Device: Z10 Limited Edition

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

I also have the same issues.
Bluetooth lacks support
I will try to reach RIM Bluetooth developers such as @robbieDubya
When you are young, work to learn. Not to earn !
New Contributor
rajeshsinghal
Posts: 7
Registered: ‎10-11-2012
My Device: Dev Alpha B

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

Thanks for your reply...

Please update if you get any reply from RIM developers..

 

Also have you tried Bluetooth GATT APIs on SDK 10... 

Thanks in advance for your efforts.. 

BlackBerry Development Advisor
idruker
Posts: 4
Registered: ‎12-07-2012
My Device: BB10

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

For service uuid you have to provide a unique UUID that identifies the partucular service your server is delivering. 0x1101 is not Service Id, but Service Type ID for SPP. 

 

When you register server on a remote device (server) you use any unique 16-digits service uuid to pass in bt_spp_open_server. This is the same uuid that you have to pass in bt_spp_open on the client side

New Contributor
rajeshsinghal
Posts: 7
Registered: ‎10-11-2012
My Device: Dev Alpha B

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

Thanks Drucker !!

bt_spp_open was succesfully inititalised by usung SPP UUID as "00001101-0000-1000-8000-00805F9B34FB".

I am now able to get the device data into Blackberry 10 Application. 

BlackBerry Development Advisor
idruker
Posts: 4
Registered: ‎12-07-2012
My Device: BB10

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

You've got the idea. The only problem is your choice of UUID. Bluetooth organization defines UUID's for different service types, the one for SPP is 00001101-0000-1000-8000-00805F9B34FB whose short version is 0x1101 - there is 1-to-1 mapping between short (4 digits) and long (32 digits) versions of UUID. If you make a search ininternet, you'll find 00001101-0000-1000-8000-00805F9B34F widely metioned what makes it hardly unique.

 

As I said, you have to choose an UUID that uniquly identifies your particular service, not service type. For more detail see here http://developer.blackberry.com/native/reference/bb10/com.qnx.doc.bluetooth/topic/bt_spp_open.html

 

Ilya

Retired
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10

Re: Blackberry 10 : Problem in Bluetooth SPP APIs

[ Edited ]

Might be worth checking out this sample, 

bluetoothsppchat

--
Rob is no longer associated with BlackBerry.