example BLE code approximately works

pull/111/head
geeksville 2020-04-23 18:11:32 -07:00
rodzic 0c7c3f17e5
commit 4f3a9d8646
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -15,6 +15,7 @@
# Secondary work items
- currently using soft device SD140, is that ideal?
- turn on security for BLE
- make power management/sleep work properly
- make a settimeofday implementation

Wyświetl plik

@ -160,19 +160,19 @@ void NRF52Bluetooth::setup()
Bluefruit.Periph.setDisconnectCallback(disconnect_callback);
// Configure and Start the Device Information Service
DEBUG_MSG("Configuring the Device Information Service");
DEBUG_MSG("Configuring the Device Information Service\n");
bledis.setManufacturer("meshtastic.org");
bledis.setModel("NRF52-meshtastic");
bledis.begin();
// Start the BLE Battery Service and set it to 100%
DEBUG_MSG("Configuring the Battery Service");
DEBUG_MSG("Configuring the Battery Service\n");
blebas.begin();
blebas.write(42); // FIXME, report real power levels
// Setup the Heart Rate Monitor service using
// BLEService and BLECharacteristic classes
DEBUG_MSG("Configuring the Heart Rate Monitor Service");
DEBUG_MSG("Configuring the Heart Rate Monitor Service\n");
setupHRM();
// Setup the advertising packet(s)