mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-23 09:53:26 +00:00
h2zero/NimBLE-Arduino@^2.2.3
This commit is contained in:
parent
bb6364ee0c
commit
4fb7dac6b9
@ -45,7 +45,7 @@ lib_deps =
|
|||||||
${environmental_base.lib_deps}
|
${environmental_base.lib_deps}
|
||||||
${radiolib_base.lib_deps}
|
${radiolib_base.lib_deps}
|
||||||
https://github.com/meshtastic/esp32_https_server.git#896f1771ceb5979987a0b41028bf1b4e7aad419b
|
https://github.com/meshtastic/esp32_https_server.git#896f1771ceb5979987a0b41028bf1b4e7aad419b
|
||||||
h2zero/NimBLE-Arduino@^1.4.3
|
h2zero/NimBLE-Arduino@^2.2.3
|
||||||
https://github.com/dbinfrago/libpax.git#3cdc0371c375676a97967547f4065607d4c53fd1
|
https://github.com/dbinfrago/libpax.git#3cdc0371c375676a97967547f4065607d4c53fd1
|
||||||
lewisxhe/XPowersLib@^0.2.7
|
lewisxhe/XPowersLib@^0.2.7
|
||||||
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
|
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
|
||||||
|
@ -49,7 +49,7 @@ static uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE];
|
|||||||
|
|
||||||
class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks
|
class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks
|
||||||
{
|
{
|
||||||
virtual void onWrite(NimBLECharacteristic *pCharacteristic)
|
void onWrite(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo) override
|
||||||
{
|
{
|
||||||
LOG_DEBUG("To Radio onwrite");
|
LOG_DEBUG("To Radio onwrite");
|
||||||
auto val = pCharacteristic->getValue();
|
auto val = pCharacteristic->getValue();
|
||||||
@ -66,7 +66,7 @@ class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks
|
|||||||
|
|
||||||
class NimbleBluetoothFromRadioCallback : public NimBLECharacteristicCallbacks
|
class NimbleBluetoothFromRadioCallback : public NimBLECharacteristicCallbacks
|
||||||
{
|
{
|
||||||
virtual void onRead(NimBLECharacteristic *pCharacteristic)
|
void onRead(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo) override
|
||||||
{
|
{
|
||||||
uint8_t fromRadioBytes[meshtastic_FromRadio_size];
|
uint8_t fromRadioBytes[meshtastic_FromRadio_size];
|
||||||
size_t numBytes = bluetoothPhoneAPI->getFromRadio(fromRadioBytes);
|
size_t numBytes = bluetoothPhoneAPI->getFromRadio(fromRadioBytes);
|
||||||
@ -125,7 +125,7 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks
|
|||||||
return passkey;
|
return passkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void onAuthenticationComplete(ble_gap_conn_desc *desc)
|
void onAuthenticationComplete(NimBLEConnInfo &connInfo) override
|
||||||
{
|
{
|
||||||
LOG_INFO("BLE authentication complete");
|
LOG_INFO("BLE authentication complete");
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void onDisconnect(NimBLEServer *pServer, ble_gap_conn_desc *desc)
|
void onDisconnect(NimBLEServer *pServer, NimBLEConnInfo &connInfo, int reason) override
|
||||||
{
|
{
|
||||||
LOG_INFO("BLE disconnect");
|
LOG_INFO("BLE disconnect");
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ int NimbleBluetooth::getRssi()
|
|||||||
if (bleServer && isConnected()) {
|
if (bleServer && isConnected()) {
|
||||||
auto service = bleServer->getServiceByUUID(MESH_SERVICE_UUID);
|
auto service = bleServer->getServiceByUUID(MESH_SERVICE_UUID);
|
||||||
uint16_t handle = service->getHandle();
|
uint16_t handle = service->getHandle();
|
||||||
return NimBLEDevice::getClientByID(handle)->getRssi();
|
return NimBLEDevice::getClientByHandle(handle)->getRssi();
|
||||||
}
|
}
|
||||||
return 0; // FIXME figure out where to source this
|
return 0; // FIXME figure out where to source this
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user