Changeset f6768ced in subsurface


Ignore:
Timestamp:
Jul 4, 2017, 7:46:07 AM (3 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
6031692
Parents:
6fe0388
git-author:
Jan Mulder <jlmulder@…> (07/03/17 11:27:57)
git-committer:
Dirk Hohndel <dirk@…> (07/04/17 07:46:07)
Message:

OSTC over BLE: Select the right service

The current "select the correct BLE service to talk to" is flawed.
It assumes that the first found non-standard UUID is the right one
and apparently it is for some DCs. But not for the HW devices.
The HW devices use a "standard" ie. approved by the Bluetooth
SIG, controller, that comes with a UUID that our code currently
considers standard so not to be the right one.

This (simple) commit selects the right service for HW. The UUID
is hard coded, and this is ok, because it is tied to the hardware
used by HW. Futher, it does not change anything for other BLE
devices.

Signed-off-by: Jan Mulder <jlmulder@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/qt-ble.cpp

    r6fe0388 rf6768ced  
    7777        bool isStandardUuid = false;
    7878        newService.toUInt16(&isStandardUuid);
     79        if (device_is_hw(device)) {
     80                /* The HW BT/BLE piece or hardware uses, what we
     81                 * call here, "a Standard UUID. It is standard because the Telit/Stollmann
     82                 * manufacturer applied for an own UUID for its product, and this was granted
     83                 * by the Bluetooth SIG.
     84                 */
     85                if (newService != QUuid("{0000fefb-0000-1000-8000-00805f9b34fb}"))
     86                        return; // skip all services except the right one
     87        } else
    7988        if (isStandardUuid) {
    8089                qDebug () << " .. ignoring standard service";
Note: See TracChangeset for help on using the changeset viewer.