Closed DanBendavid closed 3 years ago
BLE Oximeter with SpO2, Pi and BPM. Exemple of code working with connection/pairing
We should be able to send a cmd to the gateway with char and service UUID.
static BLEUUID charUUID("CDEACB81-5235-4C07-8846-93A37EE6B86D"); static BLEUUID serviceUUID("cdeacb80-5235-4c07-8846-93a37ee6b86d");
int bpm; int spo2; float pi;
static void notifyCallback( BLERemoteCharacteristic pBLERemoteCharacteristic, uint8_t pData, size_t length, bool isNotify) { Serial.print("Notify callback for characteristic "); Serial.print(pBLERemoteCharacteristic->getUUID().toString().c_str()); Serial.print(" of data length "); Serial.println(length); Serial.print("data: "); Serial.println((char*)pData); if (pData[0] == 0x81) { bpm = pData[1]; spo2 = pData[2]; pi = pData[3]; } }
Thank you
I suspect that this may have been filed in the wrong project.
Closing this ticket.
BLE Oximeter with SpO2, Pi and BPM. Exemple of code working with connection/pairing
We should be able to send a cmd to the gateway with char and service UUID.
static BLEUUID charUUID("CDEACB81-5235-4C07-8846-93A37EE6B86D"); static BLEUUID serviceUUID("cdeacb80-5235-4c07-8846-93a37ee6b86d");
int bpm; int spo2; float pi;
static void notifyCallback( BLERemoteCharacteristic pBLERemoteCharacteristic, uint8_t pData, size_t length, bool isNotify) { Serial.print("Notify callback for characteristic "); Serial.print(pBLERemoteCharacteristic->getUUID().toString().c_str()); Serial.print(" of data length "); Serial.println(length); Serial.print("data: "); Serial.println((char*)pData); if (pData[0] == 0x81) { bpm = pData[1]; spo2 = pData[2]; pi = pData[3]; } }
Thank you