Closed jayneev closed 2 years ago
Hi @jayneev, we will investigate the problem with data converting. Thanks for your interest in ThingsBoard IoT Gateway!
Hi @samson0v, we are ready for testing the BLE connector for this fixes at our end. Is there any opportunity to test development fixes on this issue? Thanking in advance. Warm Regards, @jayneev
@jayneev, we have investigated the problem with converting data, so for now I am working on fixing it. I will let you know when it is done.
Describe the bug BLE attributes read for BLE UUID "00002A00-0000-1000-8000-00805F9B34FB" (corresponds to standard BLE connected 'device name') reports Exception error. (Please refer corresponding UUID, below ble.json config - "attributes" section) This issue is raised separate based on triage with earlier issue thread named "[HELP] Can't read data with new BLE connector #655"
Connector name (If bug in the some connector): BLE Connector
Error traceback: BLE Device name ====> "name": "CMx9", (Please refer to ble.json config below)
<<<<<<<<<<<<<<<< ThingsBoard gateway Error message logs <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ""2021-12-21 06:34:24" - |INFO| - [device.py] - device - __show_map - 204 - MAP FOR CMX9 | [Service] 00001801-0000-1000-8000-00805f9b34fb (Handle: 10): Generic Attribute Profile | [Characteristic] 00002a05-0000-1000-8000-00805f9b34fb (Handle: 11): Service Changed (indicate), Value: None | [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 13): Client Characteristic Configuration) | Value: b'\x02\x00' | [Service] 1e821400-4a30-45b4-9e17-93f34e283081 (Handle: 14): Unknown | [Characteristic] 1e821401-4a30-45b4-9e17-93f34e283081 (Handle: 15): Unknown (notify), Value: None | [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 17): Client Characteristic Configuration) | Value: b'\x00\x00' | [Characteristic] 1e820101-4a30-45b4-9e17-93f34e283081 (Handle: 18): Unknown (read,write), Value: b'P\x00\x00' | [Characteristic] 1e820102-4a30-45b4-9e17-93f34e283081 (Handle: 20): Unknown (read,write), Value: b'\x00' | [Characteristic] 1e820103-4a30-45b4-9e17-93f34e283081 (Handle: 22): Unknown (read,write), Value: b'\x00' | [Characteristic] 1e820104-4a30-45b4-9e17-93f34e283081 (Handle: 24): Unknown (read,write), Value: b'\x01' | [Characteristic] 1e820105-4a30-45b4-9e17-93f34e283081 (Handle: 26): Unknown (read,write), Value: b'\x03\x00\x02\x00\x02' | [Characteristic] 1e820106-4a30-45b4-9e17-93f34e283081 (Handle: 28): Unknown (read,write), Value: b'\x00\x08\x05\x17\x01'" ""2021-12-21 06:34:24" - |DEBUG| - [scanner.py] - scanner - _parse_msg - 282 - received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_DE_D9_82_1A_78_DC/service000e" ""2021-12-21 06:34:24" - |DEBUG| - [scanner.py] - scanner - _parse_msg - 282 - received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_DE_D9_82_1A_78_DC/service000e" ""2021-12-21 06:34:24" - |DEBUG| - [client.py] - client - _parse_msg - 973 - received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_DE_D9_82_1A_78_DC/service000e/c" Exception in thread CMx9: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/site-packages/thingsboard_gateway/connectors/ble/device.py", line 173, in run self.loop.run_until_complete(self.run_client()) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/usr/lib/python3.8/site-packages/thingsboard_gateway/connectors/ble/device.py", line 169, in run_client await self.timer() File "/usr/lib/python3.8/site-packages/thingsboard_gateway/connectors/ble/device.py", line 86, in timer await self.process_self() File "/usr/lib/python3.8/site-packages/thingsboard_gateway/connectors/ble/device.py", line 125, in process_self data = await self.client.read_gatt_char(char_id) File "/usr/lib/python3.8/site-packages/bleak/backends/bluezdbus/client.py", line 662, in read_gatt_char ra <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<< ble.json <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< { "name": "BLE Connector", "passiveScanMode": false, "showMap": true, "devices": [ { "name": "CMx9", "MACAddress": "DE:D9:82:1A:78:DC", "pollPeriod": 10000, "showMap": true, "timeout": 10000, "telemetry": [ { "key": "TEMPERATURE", "method": "notify", "characteristicUUID": "1E821401-4A30-45B4-9E17-93F34E283081", "byteFrom": 0, "byteTo": 3 } ] "attributes": [ { "key": "name", "method": "read", "characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB", <===== THIS UUID CAUSES BLEAK READ EXCEPTION "byteFrom": 0, "byteTo": -1 } ], "attributeUpdates": [ { "attributeOnThingsBoard": "sharedName", "characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB" } ], "serverSideRpc": [ ] } ] } <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<