mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 09:42:35 +00:00
example BLE code approximately works
This commit is contained in:
parent
0c7c3f17e5
commit
4f3a9d8646
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
# Secondary work items
|
# Secondary work items
|
||||||
|
|
||||||
|
- currently using soft device SD140, is that ideal?
|
||||||
- turn on security for BLE
|
- turn on security for BLE
|
||||||
- make power management/sleep work properly
|
- make power management/sleep work properly
|
||||||
- make a settimeofday implementation
|
- make a settimeofday implementation
|
||||||
|
@ -160,19 +160,19 @@ void NRF52Bluetooth::setup()
|
|||||||
Bluefruit.Periph.setDisconnectCallback(disconnect_callback);
|
Bluefruit.Periph.setDisconnectCallback(disconnect_callback);
|
||||||
|
|
||||||
// Configure and Start the Device Information Service
|
// 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.setManufacturer("meshtastic.org");
|
||||||
bledis.setModel("NRF52-meshtastic");
|
bledis.setModel("NRF52-meshtastic");
|
||||||
bledis.begin();
|
bledis.begin();
|
||||||
|
|
||||||
// Start the BLE Battery Service and set it to 100%
|
// 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.begin();
|
||||||
blebas.write(42); // FIXME, report real power levels
|
blebas.write(42); // FIXME, report real power levels
|
||||||
|
|
||||||
// Setup the Heart Rate Monitor service using
|
// Setup the Heart Rate Monitor service using
|
||||||
// BLEService and BLECharacteristic classes
|
// BLEService and BLECharacteristic classes
|
||||||
DEBUG_MSG("Configuring the Heart Rate Monitor Service");
|
DEBUG_MSG("Configuring the Heart Rate Monitor Service\n");
|
||||||
setupHRM();
|
setupHRM();
|
||||||
|
|
||||||
// Setup the advertising packet(s)
|
// Setup the advertising packet(s)
|
||||||
|
Loading…
Reference in New Issue
Block a user