cancel
Showing results for 
Search instead for 
Did you mean: 

Register for notification

philippe1
Associate II
Posted on April 10, 2015 at 10:26

Hello,

I'm trying to get data from a remote sensor.

The BTLE is master, role 2.

I'm implementing the code right on top of the HCI layer.

I'm able to connect to the sensor and retrieve the service and characteristic info, but I can't get the data linked to the characteristic.

According to the manufacturer's doc, I need to register the notification for the characteristic.

How can I do this ? What are the HCI commands I need?

Here is the call flow I get:

---> Connect (01 9c fc ...)

<-- LE connection complete (04 3e 13 01 ...)

---> Discovering service (01 12 fd ...)

<-- GATT Read by group RS (04 ff 18 0a 0c ...)

<-- GATT procedure complete (04 ff 06 10 ...)

---> Discovering characteristic (01 15 fd ...)

<-- GATT Read by type RS (04 ff 1b 06 0c 01 08 16 15 11 00 12 12 00 ...)

<-- GATT procedure complete (04 ff 06 10  ...)

At this point, I know service and characteristics and the UUIDs.

I now need to get the data for this characteristic (the register for notification phase I presume).

What is the next step to get the data from the remote sensor?

I've tried to send a Read char Val with Attribue = 11 00 (I got it in the GATT Read by type RS above)

--> Read Char Val (01 18 fd 04 01 08 11 00)

<- Status command pending (04-0f-04-00-01-18-fd)

<-- Connection update RQ (04 ff 10 02 08 ...)

--> Connection update RS (01 82 fd ...)

<-- Command complete (04 0e 04 01 82 00)

<-- LE Connection update complete (04 3e 0a 03 00 ...)

 

I never get any info back from the sensor.

The Read char Val command never gets acknowledged (I get a pending answser, no more than that)

What is missing ? What do I do wrong ?

Thank you for your help.
1 REPLY 1
Posted on April 10, 2015 at 16:44

Hi,

you should download the latest version of GUI and using the functionalities under ''Script'' tab, you could connect to your remote sensor and use ''Discovery Service and Characteristic'' functionality.

Regards,

Graziella