adafruit / Bluefruit_LE_Connect_Android

Android port of Adafruit's Bluefruit LE Connect app
MIT License
122 stars 100 forks source link

Characteristic UUID/String Typo? #4

Closed microbuilder closed 9 years ago

microbuilder commented 9 years ago

There seems to be a typo in the string for the Device Information Service.

The Bluefruit LE Friend is sending out UUID 0x2A27, which corresponds to the "Hardware Revision String", but the string says "Software Revision String" (which is UUID 0x2A28).

Looking here, though, the strings seem to be correct, which is odd: https://github.com/adafruit/Bluefruit_LE_Connect_Android/blob/master/app/src/main/java/com/adafruit/bluefruit/le/connect/ble/StandardUUIDs.java#L124

        aMap.put("2A28", "Software Revision String");
        aMap.put("2A27", "Hardware Revision String");

Why are we seeing 'Software Revision String' below (0x2A28) if the device is sending out the 'Hardware Revision String' UUID (0x2A27):

  ble_gatts_char_handles_t hdlHardware;
  char_def.uuid.uuid = BLE_UUID_HARDWARE_REVISION_STRING_CHAR;
  char_def.p_data    = (uint8_t*) strHardwareRevision,
  char_def.min_len   = char_def.max_len = strlen(strHardwareRevision);
  ASSERT_STATUS( custom_add_characteristic(&char_def, &hdlHardware) );

BLE_UUID_HARDWARE_REVISION_STRING_CHAR corresponds to: #define BLE_UUID_HARDWARE_REVISION_STRING_CHAR 0x2A27

screenshot_2015-01-22-14-49-18

microbuilder commented 9 years ago

I can confirm here that 0x2A27 is indeed being sent out, so there is definitely a typo where 'Software Revision String' should be 'Hardware Revision String':

screen shot 2015-01-22 at 15 24 25

antonio-openroad commented 9 years ago

Tested with version 0.4.7 and the characteristics found are 0x2A26 and 0x2A28. Also lightblue for iPhone reports that the characteristic found are 2A26 and 2a28.

Full list of services and characteristics discoverServices() - device: D8:E4:ED:1A:F3:9A onGetService() - Device=D8:E4:ED:1A:F3:9A UUID=00001800-0000-1000-8000-00805f9b34fb onGetService() - Device=D8:E4:ED:1A:F3:9A UUID=00001801-0000-1000-8000-00805f9b34fb onGetService() - Device=D8:E4:ED:1A:F3:9A UUID=00001530-1212-efde-1523-785feabcd123 onGetService() - Device=D8:E4:ED:1A:F3:9A UUID=0000180a-0000-1000-8000-00805f9b34fb onGetService() - Device=D8:E4:ED:1A:F3:9A UUID=6e400001-b5a3-f393-e0a9-e50e24dcca9e onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00002a00-0000-1000-8000-00805f9b34fb onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00002a01-0000-1000-8000-00805f9b34fb onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00002a04-0000-1000-8000-00805f9b34fb onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00001532-1212-efde-1523-785feabcd123 onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00001531-1212-efde-1523-785feabcd123 onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00001534-1212-efde-1523-785feabcd123 onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00002a29-0000-1000-8000-00805f9b34fb onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00002a24-0000-1000-8000-00805f9b34fb onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00002a25-0000-1000-8000-00805f9b34fb onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00002a26-0000-1000-8000-00805f9b34fb onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=00002a28-0000-1000-8000-00805f9b34fb onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=6e400003-b5a3-f393-e0a9-e50e24dcca9e onGetCharacteristic() - Device=D8:E4:ED:1A:F3:9A UUID=6e400002-b5a3-f393-e0a9-e50e24dcca9e onGetDescriptor() - Device=D8:E4:ED:1A:F3:9A UUID=00002902-0000-1000-8000-00805f9b34fb onGetDescriptor() - Device=D8:E4:ED:1A:F3:9A UUID=00002901-0000-1000-8000-00805f9b34fb onGetDescriptor() - Device=D8:E4:ED:1A:F3:9A UUID=00002902-0000-1000-8000-00805f9b34fb onGetDescriptor() - Device=D8:E4:ED:1A:F3:9A UUID=00002901-0000-1000-8000-00805f9b34fb onSearchComplete() = Device=D8:E4:ED:1A:F3:9A Status=0

Any ideas why is not reporting 0x2a27?

microbuilder commented 9 years ago

0x2A28 (SW Revision) was changed to 0x2A27 (HW Revision) in the latest development branch (0.5.0+) ... the Github repo with official firmware images will be updated early next week with 0.5.0 (or maybe this weekend). 0x2A28 will no longer exist since it didn't make sense to have 'Firmware' (0x2A26) and 'Software' (0x2A28) revision strings, even if Apple recommends it. The Bluetooth spec only requires 'any 1 field' in the Device Information Service.