Skip to content

Commit

Permalink
Merge pull request #412 from jmlich/device-info-service-hw
Browse files Browse the repository at this point in the history
Add Model characteristics to Device Info Service
  • Loading branch information
d03n3rfr1tz3 authored Jan 26, 2025
2 parents ccc4797 + d1ed9bd commit 953243e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hardware/ble/deviceinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ void deviceinfo_setup( void ) {
pManufacturerNameStringCharacteristic->setValue("Lily Go");
NimBLECharacteristic* pFirmwareRevisionStringCharacteristic = pDeviceInformationService->createCharacteristic( FIRMWARE_REVISION_STRING_CHARACTERISTIC_UUID, NIMBLE_PROPERTY::READ );
pFirmwareRevisionStringCharacteristic->setValue(__FIRMWARE__);
NimBLECharacteristic* pModelStringCharacteristic = pDeviceInformationService->createCharacteristic( MODEL_STRING_CHARACTERISTIC_UUID, NIMBLE_PROPERTY::READ );
pModelStringCharacteristic->setValue(HARDWARE_NAME);
pDeviceInformationService->start();
pAdvertising->addServiceUUID( pDeviceInformationService->getUUID() );
#endif
Expand Down
1 change: 1 addition & 0 deletions src/hardware/ble/deviceinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define DEVICE_INFORMATION_SERVICE_UUID (uint16_t)0x180A /** @brief Device Information server UUID */
#define MANUFACTURER_NAME_STRING_CHARACTERISTIC_UUID (uint16_t)0x2A29 /** @brief Device Information - manufacturer name string UUID */
#define FIRMWARE_REVISION_STRING_CHARACTERISTIC_UUID (uint16_t)0x2A26 /** @brief Device Information - firmware revision UUID */
#define MODEL_STRING_CHARACTERISTIC_UUID (uint16_t)0x2A24 /** @brief Device Information - model UUID */
/**
* @brief setup gadgetbridge transmit/recieve over ble
*/
Expand Down

0 comments on commit 953243e

Please sign in to comment.