Skip to content

Commit

Permalink
Add Model characteristics to Device Info Service
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlich committed Jan 26, 2025
1 parent ccc4797 commit d1ed9bd
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 d1ed9bd

Please sign in to comment.