09-24-2013 02:41 PM
Ok. I'm home
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
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
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.
09-24-2013 02:45 PM
09-24-2013 07:25 PM
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
$ 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
09-25-2013 02:30 AM
OK, excellent. I will do the same once my MetaWatch arrives and see what that reveals.
09-30-2013 06:00 AM - edited 09-30-2013 06:00 AM
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.
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.
09-30-2013 06:40 AM
09-30-2013 07:28 AM - edited 09-30-2013 07:32 AM
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.
10-03-2013 05:57 AM
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:
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:
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
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.