Using Gattlib package to Write without response to BLE device- RN4871

255 Views Asked by At

I am trying to control an LED via RN4871 BLE from microchip (http://ww1.microchip.com/downloads/en/DeviceDoc/50002466B.pdf) and I would like to provide brief pulses (below 10ms).

For this purpose I installed gattlib package for C from https://github.com/labapart/gattlib

First on my RN4871 side I define a characteristic with Write property (Write value of characteristic with acknowledgment from client to server) and using the read_write.c example from the library works just fine.

However, since I want to have a fast communication to provide short pulses of LED then I have to use write without response function. On my BLE device side, I create only one characteristic with the property of "Write without response" and associate the digital out with the UUID handle.

PS,59c88760536411e7b114b2f933d5fe66   
PC,59c889e0536411e7b114b2f933d5fe66,06,01

and for the script:

@PW_ON
SHW,0072,18
@CONN
|O,08,%0072

Now when I use the example from the library (nordic_UART) to have write without response, it fails. I removed the parts for notify and rx. I am only using the tx uuid.

My question is more on the basic level, am I following the right direction for configuring my BLE device for write without response? Should I add additional characteristics (like notify)? Or the problem is how I am managing the gattlib package examples?

0

There are 0 best solutions below