read data from a BLE device using gatt-client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am currently writing a small Bluez-5.35 Linux app to interact with a
BLE device.
I used as starting point and example the code in btgatt-client.c and
most things work.

But I have trouble to find out how to implement the "reading of data
sent" by the device after having sent the command "REQUEST_THIS_DATA".
Things are working because I can see the data displayed by the
att_debug_cb function.

# my (added) function
[GATT client]# request-day-prog <device> <day>
[GATT client]# att: ATT op 0x12
[GATT client]# att: < 12 11 04 20
04                                   ... .           
[GATT client]# att: >
13                                               .               
[GATT client]# att: ATT response received: 0x13
[GATT client]# 
Write successful
# displayed by att_debug_cb, it's ok, the bytes make sense.
[GATT client]# att: > 1b 21 04 21 04 22 24 2a 36 22 66 2a 8a 22 90
22  .!.!."$*6"f*."."
[GATT client]# att:   90 22
90                                         .".             
[GATT client]# att: ATT PDU received: 0x1b

what I don't know, is what I have to setup ( call some
bt_att_register_????() ? )
in order for a callback function of my app. to be called.

Any pointer to  example, documentation, or even google search keywords
will be appreciated.
( I don't want to go into DBUS or Python,  just stay with simple C
calling bt_att_... and/or bt_gatt_... functions )


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux