Closed Pan8284 closed 2 years ago
Hi @Pan8284, please, send your ble config file and logs from the device scanner (in device config section set "showMap": true
).
Thanks for your interest in ThingsBoard IoT Gateway.
PFA ble config file. Pls confirm how to get device scanner logs (url)
{ "name": "BLE Connector", "rescanIntervalSeconds": 100, "checkIntervalSeconds": 100, "scanTimeSeconds": 5, "passiveScanMode": true, "devices": [ { "name": "BLETE", "MACAddress": "C0:EE:FB:F3:AA:43", "addrType":"public", "telemetry": [ { "key": "DEVICETOCLOUD", "method": "notify", "characteristicUUID": "dac508b1-ee98-417c-95e1-f4f464568ac3" }, { "key": "DTC", "method": "notify", "characteristicUUID": "1d923677-d04e-4f47-9aea-2cf8b092581e" } ], "attributes": [ { "key": "name", "characteristicUUID": "692330a1-5f10-418c-888b-5426d8b9091d", "method": "read", "byteFrom": 0, "byteTo": -1 } ], "attributeUpdates": [ { "attributeOnThingsBoard": "sharedName", "characteristicUUID": "692330a1-5f10-418c-888b-5426d8b9091d" } ], "serverSideRpc": [ { "methodRPC": "sharedName", "withResponse": true, "characteristicUUID": "692330a1-5f10-418c-888b-5426d8b9091d", "methodProcessing": "write" } ] } ] }
Hi @Pan8284, you have to use "showMap": true
in the device section config, for example:
I have set the showMap:true but from where to find the logs
Hi @Pan8284, you get logs in the place where got them.
Logs are the same as shared earlier even after setting the ShowMap:true
@Pan8284, in the logs, have to be something like that:
Can we connect over call as I am getting the same error still..
Pls find the errors...
Feb 09 18:16:17 smartcity-VirtualBox python3[30587]: [STREAM ONLY] 2022-02-09 18:16:17,757 - ERROR - [device.py] - device - 183 - Characteristic with UUID dac508b1-ee98-417c-95e1-f4f464568> Feb 09 18:16:17 smartcity-VirtualBox python3[30587]: [STREAM ONLY] 2022-02-09 18:16:17,757 - ERROR - [device.py] - device - 183 - Characteristic with UUID 1d923677-d04e-4f47-9aea-2cf8b0925> Feb 09 18:16:17 smartcity-VirtualBox python3[30587]: [STREAM ONLY] 2022-02-09 18:16:17,757 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90> Feb 09 18:16:22 smartcity-VirtualBox python3[30587]: [STREAM ONLY] 2022-02-09 18:16:22,871 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90> Feb 09 18:16:27 smartcity-VirtualBox python3[30587]: [STREAM ONLY] 2022-02-09 18:16:27,976 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90>
while using gatttool I am getting the hex value w.r.t the above uuid's..
here's the out of the gatttool...
[C0:EE:FB:F3:AA:43][LE]> connect C0:EE:FB:F3:AA:43 Attempting to connect to C0:EE:FB:F3:AA:43 Connection successful Notification handle = 0x002a value: 68 6f 70 65 20 74 6f 20 77 6f 72 6b Notification handle = 0x002a value: 68 6f 70 65 20 74 6f 20 77 6f 72 6b Notification handle = 0x002a value: 68 6f 70 65 20 74 6f 20 77 6f 72 6b [C0:EE:FB:F3:AA:43][LE]>
Pls suggest
@Pan8284, why are you sending the tail of the logs? The logs you should get are +- at the head of logs.
sudo systemctl status thingsboard-gateway.service ● thingsboard-gateway.service - ThingsBoard Gateway Loaded: loaded (/etc/systemd/system/thingsboard-gateway.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2022-02-09 18:39:36 IST; 3s ago Main PID: 30925 (python3) Tasks: 10 (limit: 4632) Memory: 28.6M CGroup: /system.slice/thingsboard-gateway.service └─30925 /usr/bin/python3 -c from thingsboard_gateway.tb_gateway import daemon; daemon()
Feb 09 18:39:36 smartcity-VirtualBox systemd[1]: Started ThingsBoard Gateway. Feb 09 18:39:38 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:38,791 - ERROR - [device.py] - device - 183 - Characteristic with UUID dac508b1-ee98-417c-95e1-f4f464568> Feb 09 18:39:38 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:38,791 - ERROR - [device.py] - device - 183 - Characteristic with UUID 1d923677-d04e-4f47-9aea-2cf8b0925> Feb 09 18:39:38 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:38,791 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90> Feb 09 18:39:38 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:38,791 - ERROR - [device.py] - device - 183 - Characteristic with UUID 1d923677-d04e-4f47-9aea-2cf8b0925> Feb 09 18:39:38 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:38,791 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90> Feb 09 18:39:43 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:43,902 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90> Feb 09 18:39:49 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:49,085 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90> Feb 09 18:39:54 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:54,260 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90> Feb 09 18:39:59 smartcity-VirtualBox python3[30925]: [STREAM ONLY] 2022-02-09 18:39:59,449 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b90>
Logs are not creating in var/log/thingsboard-gateway/
I am just sending the output of
sudo systemctl status thingsboard-gateway
when I do systemctl status thingsboard-gateway then output is different to when I do thingsboard-gateway
Why?
@Pan8284, try to use the next commands:
sudo chown thingsboard_gateway. /var/log/thingsboard-gateway -R
sudo systemctl restart thingsboard-gateway
Its the same logs are not getting created.... Can we get on the call to solve it. Its been long pending
Any response ? Waiting to hear from you.
Hi @Pan8284, I was sick, sorry for the late response. We don't know what the problem is. You can send credentials for access to your server on my email vbidochka@thingsboard.io and we will investigate.
I am running this whole thing on VM on my laptop, I am not sure how u can access the same...
@Pan8284, you have to make port forwarding and send me the outer IP address. And please send them to my email (vbidochka@thingsboard.io), not here.
Hi @Pan8284, any updates on this issue? Can we close the issue?
Actually I dont know how to provide you the access on VM as Its on my laptop. Let me check and revert.
We can do the webex I can share the screen and give control to you, pls suggest....
Hi @Pan8284, sorry for the late response, we have some problem with russian assholes) There is some other idea, you can separately run bleak and scan the charId. Please, go to Bleak repository and there are examples. When you finish to scan and take the charId, you can easily paste it to Gateway config file.
I guess my approach to be on webex is good because you will get to operate directly on my machine. It will save both of us time.
I also ran the gatttool and I am getting the output as expected. The same is not happening with Thingsboard gateway.
Pls come on webex issue will be resolved quickly
Any response
Hi @Pan8284, ok, let's do it via Webex. I can at 14:00 (Kyiv time) tomorrow. Waiting for the meet link to my email (vbidochka@thingsboard.io).
I respect you, In such a situation you are still working. My VM is not working now, I am trying to fix the issue. If It got fixed I'll share the invite.
Tc of yourself and your family.
Regards Pankaj Chaudhary
@Pan8284, thanks for your support! 🇺🇦
Hi Team,
Thanks for the response
here is the error I am getting after putting latest build or upgrading the thingsboard-gateway w.r.t ble connector issue
smartcity@smartcity-VirtualBox:/usr/lib/python3/dist-packages/thingsboard_gateway/connectors/ble$ sudo thingsboard-gateway [STREAM ONLY] 2022-02-03 16:58:35,676 - ERROR - [device.py] - device - 183 - Characteristic with UUID dac508b1-ee98-417c-95e1-f4f464568ac3 could not be found! [STREAM ONLY] 2022-02-03 16:58:35,676 - ERROR - [device.py] - device - 183 - Characteristic with UUID 1d923677-d04e-4f47-9aea-2cf8b092581e could not be found! [STREAM ONLY] 2022-02-03 16:58:35,676 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b9091d could not be found! [STREAM ONLY] 2022-02-03 16:58:40,699 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b9091d could not be found! [STREAM ONLY] 2022-02-03 16:58:45,728 - ERROR - [device.py] - device - 171 - Characteristic with UUID 692330a1-5f10-418c-888b-5426d8b9091d could not be found!
I am using BLE Scanner app which has Advertiser to send data. UUID mentioned above are UUID’s in my advertiser.
I used this link https://github.com/thingsboard/thingsboard-gateway/tree/master/thingsboard_gateway/connectors/ble
I have updated every file under
/usr/lib/python3/dist-packages/thingsboard_gateway/connectors/ble directory
pls help