0

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?

Ali Nouri
  • 67
  • 7
  • Since you just want to write towards your led device notifications are not necessary as far as I can tell. What exactly fails? Building the nordic_UART example? Running it? Writing to your characteristic? – Michael Kotzjan Feb 11 '21 at 20:48
  • Ok now the problem is solved (was an issue with my characteristic creation on BLE side ), I can write without response to my BLE device and turn on or off the LED. I also used the one of the functions that opens a stream and write without response continuously. But I am surprised how slow it is! Basically I can not provide LED pulses shorter than 40ms.... – Ali Nouri Feb 11 '21 at 22:56
  • I personally never tested the speed of Bluetooth Low Energy. It's, as the name suggests, not designed for speed. – Michael Kotzjan Feb 12 '21 at 05:27

0 Answers0