Closed krimp closed 10 months ago
Ahhh. Solved it: Had to NOT convert the byteArray in the notification callback, due to binary data. Had to access the received data by
byteArr->data
and
byteArr->len
Ok, good that you got it to work!
I am trying to use this library to implement a Central for the Nordic Uart GATT on a RPi4B 64bit, Bullseye, Bluez 5.70. I am using the Central-example as the starting point and the following uuid:
The Central is very simple: The RX has a notification only, and the TX a write:
The adapter code in main (restricted to this RPi only):
The data sent from the Peripheral is 88 bytes binary. However, it seems like the data does not reach the notification callback. The log_debug in characteristc.c does indeed print out a 176 bytes long hex string (2x88 bytes), but it seems like it is not accessible in the callback. I have located the problem to be in the binc_internal_signal_characteristic_changed(...) in characteristc.c, handling the CHARACTERISTIC_PROPERTY_VALUE
The log debug in characteristc.c, handling the CHARACTERISTIC_PROPERTY_VALUE gives this output:
The log debug in the notification callback:
I have a feeling my issues is related to that my Peripheral transmits binary data, which might is a problem for the glib gvariant... library?
Another thing is that the 176 bytes in log_info in chracteristic.c are always the same, which might indicate another problem?
GLib-version used: