This commit is contained in:
richonguzman 2023-07-11 14:41:22 -04:00
parent f06888a18e
commit 8db5066752
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#ifdef ESP32
#include <esp_bt.h>
#endif
//#ifdef ESP32
//#include <esp_bt.h>
//#endif
#include <Arduino.h>
#include <NimBLEDevice.h>
#include <OneButton.h>

View File

@ -1,5 +1,6 @@
#include "ble_utils.h"
#include <NimBLEDevice.h>
#include "lora_utils.h"
#define SERVICE_UUID "0000180A-0000-1000-8000-00805F9B34FB"
#define CHARACTERISTIC_UUID "00002A29-0000-1000-8000-00805F9B34FB"
@ -26,6 +27,11 @@ class MyCallbacks : public NimBLECharacteristicCallbacks {
Serial.println("Sending message to CD2RXU-7...");
pCharacteristic->setValue("Sending message to CD2RXU-7...");
pCharacteristic->notify();
} else if (receivedString=="test") {
Serial.println("Sending Test message to CD2RXU-15...");
LoRa_Utils::sendNewPacket("CD2RXU-7>APLRT1,WIDE1-1::CD2RXU-15:wrl");
pCharacteristic->setValue("Sending Test message to CD2RXU-15...");
pCharacteristic->notify();
}
}
};