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 Developer
ZogG
Posts: 13
Registered: ‎09-26-2012
My Device: Z10 STL100-1 DEV edition

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

I thought so too, but as I saw the change log and commits at github. I'll be home i'll link to 1.5.0 fw change log and those commits
New Developer
ZogG
Posts: 13
Registered: ‎09-26-2012
My Device: Z10 STL100-1 DEV edition

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

Ok. I'm home :smileyhappy:

About BLE support. I have 1.5.0 fw and from release notes of fw:

Version 1.4.0 (556):

....

- Ready for Android BLE (Requires MWM app update)

....

- Fix incorrect shutdown of BLE advertising

....

 

As well as you can see some BLE related commits here ­— https://github.com/MetaWatchOpenProjects/MetaWatch-Gen2

 

 

As for my code:

First of all i get BT_DEVICE_TYPE_REGULAR as of device type

Second i tried :

services_array = bt_rdev_get_services(next_remote_device)

wich would return empty array

second i tried 

bt_gatt_connect_service("00:18:33:FA:CA:FD", MY_UUID,
NULL, NULL, NULL) < 0) while setting UUID to 0x8880 ( i even actually tried loop that would generate UUIDs from 100 to 9999 )

And it wouldn't connect as well as there would be no error.

Retired
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

Could you post me a private message please? I have something for you :-)
--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
New Developer
ZogG
Posts: 13
Registered: ‎09-26-2012
My Device: Z10 STL100-1 DEV edition

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

Ok, as today i got Bluetooth 4.0 dongle and i had free time, i actually successfuly connected to watch over BLE and found some GATT services from my linux machine:

First off all :

 

 

$sudo hcitool lescan

Did gave me the result, it actually saw my watch as BLE and showed it's MAC

Second:

$ gatttool -b META_WATCH_MAC --primary
attr handle = 0x0001, end grp handle = 0x0001 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle = 0x0002, end grp handle = 0x0006 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle = 0x0007, end grp handle = 0x0011 uuid: 0000180a-0000-1000-8000-00805f9b34fb
attr handle = 0x0012, end grp handle = 0x0018 uuid: 00008880-0000-1000-8000-00805f9b34fb

 

 

Retired
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

OK, excellent. I will do the same once my MetaWatch arrives and see what that reveals.

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Retired
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

[ Edited ]

I now have a MetaWatch Strata to test with. Initial tests were successful indicating that there is no incompatibility between the BlackBerry 10 bluetooth stack and that used by the MetaWatch. I used two applications, one of which is in GitHub and one of which I will release to GitHub soon.

 

bluetoothgatt: https://github.com/blackberry/Cascades-Samples/tree/master/bluetoothgatt

 

Here are some screen shots from the two apps. They show the following GATT services to be running on the MetaWatch; Generic Access, Generic Attribute, Device Information and a proprietary service with UUID 0x8880

 

I was able to connect to the Device Information service without any problems.

 

bluetoothgatt1_400.png

 

bluetoothgatt2_400.png

 

btdeviceinfo2_400.png

 

btdeviceinfo1_400.png

 

 

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
New Developer
ZogG
Posts: 13
Registered: ‎09-26-2012
My Device: Z10 STL100-1 DEV edition

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

I did use bluethoothgatt application as well. And it shows nothing. Did you pair watch before running it? What fw you have on watch and on blacjberry(btw is it Z10, I have Z10STL100-1/10.2.0.1521)
Retired
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

[ Edited ]

Yes, I paired first...generally you must always do this with BlackBerry 10.

 

I was running the generally available "Dev Alpha build" for STL100-1 which is 10.2.0.1445.

 

MetaWatch is running the latest firmware v1.5.1

 

I've sent messages to @meta_watch on Twitter asking for a spec for their 0x8880 service.

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
New Developer
ZogG
Posts: 13
Registered: ‎09-26-2012
My Device: Z10 STL100-1 DEV edition

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

Ihad metawatch 1.5.0, thought it was the problem, updated to 1.5.1, still no go :smileysad:
here is video
http://www.youtube.com/watch?v=IHtqvpJGuf0
Retired
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10

Re: Bluetooth 4.0 (BLE) compatibility between Z10 and MetaWatch

I'm not sure of the status of MetaWatch's Bluetooth Low Energy support but suspect it's fairly early stage. I've found what seems to be an error in the way it does Bluetooth LE advertising which is causing one of the problems you've reported whereby the device appears twice in the Settings-Bluetooth page of your Z10:

 

air_trace_adv.png

 

The AdvData field contains several “AD structures” including the  first one which is length 2, type 1 and this type means “FLAGS”.  This is defined in the Bluetooth 4.0 specification volume 3, part C, chapter 11 and table 18.1 specifically fyi:

 

adv_flags.png

 

The flags bits in the AdvData from the MetaWatch are decoded as follows:

 

02 
  01 «Flags»
    0E = binary 00001110 : 
         (1) LE General Discoverable Mode, 
        (2) BR/EDR Not Supported (i.e. bit 37 of LMP Extended Feature bits Page 0)
        (3) Simultaneous LE and BR/EDR to Same Device Capable (Controller) (i.e. bit 49 of LMP Extended Feature bits Page 0)

 

So as you can see, bit 2 is set and this means that BR/EDR is *not* supported.

 

 

The Bluetooth 4.0 specification volume 3, part C says

 

A device supporting both BR/EDR and LE physical links shall expose the capa-

bilities of both physical links by performing the following steps:

a) The ‘LE Supported (Controller)’ and ‘LE Supported (Host)’ bits in

the LMP features shall be set as defined in [Vol. 2], Part C Section

3.2.

b) The ‘BR/EDR Not Supported’ bit in the Flags AD type shall be set

to ‘0 as defined in Section 18.1.

c) The ‘Simultaneous LE and BR/EDR to Same Device Capable

(Controller)’ and ‘Simultaneous LE and BR/EDR to Same Device

 

I've sent this information to MetaWatch and hope that this gets fixed in a later firmware release for their watch.

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim