Closed cbolgiano closed 7 years ago
@cbolgiano please see: https://github.com/sandeepmistry/arduino-BLEPeripheral/blob/master/API.md#contructor
I think you are just missing the BLEWriteWithoutResponse
, so change:
BLECharacteristic timeCharacteristic = BLECharacteristic("CCC2", BLERead | BLEWrite, 20);
to
BLECharacteristic timeCharacteristic = BLECharacteristic("CCC2", BLERead | BLEWrite | BLEWriteWithoutResponse, 20);
I am unable to write to a local BLECharacteristic in my BLEPeripheral from central. I tried using the BLEWritten event but I never end up in the body of the bound function. Good news though is that I am able to connect successfully to the device from central and handle the connects and disconnects using the BLEConnected and BLEDisconnected events no problem. I figure I am missing something at the fundamental level or misunderstanding how to use this library. I attached the source code of my central which is a cordova android application using https://github.com/don/cordova-plugin-ble-central for my central. The hardware for the peripheral that I am using is: https://tinycircuits.com/collections/all/products/tinyscreenplus and https://tinycircuits.com/collections/all/products/bluetooth-low-energy-nordic-tinyshield. I have been able to write to the peripheral successfully using your UART example using the same setup but I would like to use GATT instead. Please help if you have time. I have been stuck for almost 3 weeks. src.zip
"