-
-
Notifications
You must be signed in to change notification settings - Fork 35
Web bluetooth breaks callbackResponse #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi,
Please provide your code which is returning the characteristic result.
Thanks
…On Sat, Feb 8, 2020 at 2:46 AM FPSUsername ***@***.***> wrote:
I am trying to get the characteristics using web bluetooth, but I receive
this error when the javascript calls the service.
return device.gatt.connect().
then(server => {
return server.getPrimaryService('b923d807-d8de-469d-89aa-c0d61a4e59a4');
}).
then(service => {
service.getCharacteristic('b923d807-d8de-469d-89aa-c0d61a4e59a5');
})';
Error from the beacon:
Exception in thread HCISocketPoller:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/BluetoothHCI/BluetoothHCI.py",
line 197, in _socket_poller
self._socket_on_data_user_callback(bytearray(data))
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Hci.py",
line 414, in onSocketData
self.emit('aclDataPkt', [handle, cid, pktData])
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Emit.py",
line 17, in emit
handler(*arguments)
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Bindings.py",
line 169, in onAclDataPkt
self._aclStream.push(cid, data)
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/AclStream.py",
line 18, in push
self.emit('data', [cid, data])
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Emit.py",
line 17, in emit
handler(*arguments)
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Gatt.py",
line 228, in onAclStreamData
self.handleRequest(data)
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Gatt.py",
line 271, in handleRequest
response = self.handleReadOrReadBlobRequest(request)
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Gatt.py",
line 681, in handleReadOrReadBlobRequest
callback(result, data)
File
"/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Gatt.py",
line 620, in callback
callbackResponse[1 + i] = data[i]
TypeError: an integer is required (got type str)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://u2567673.ct.sendgrid.net/ls/click?upn=tqQDaGrBSQqIjEc4PHVNCytArFpG0wBWrxX8rj9l5vwuxnO-2Fx1Qp6YpGUPl3oCKw6D7FO8acisQ4NJV-2BEj1iBs0jhhd6pM4jggZCAN-2FlL9NzBdTCkEfYDR1nRi5cxPbxQaUM-2FZn5nwdiQAGX4idRxiCgQztlGy89a02YgSVBCvw4JtrPiX-2F1b5LS1g1-2ByGrt8ZnCnND7HfZfHkAXlcUjE3kfWTpxNliT0tbl9KCIDxuCTCmHi-2BewgOY4LPTtu7Q1qgiY9LkZ6s4wR8GektEf-2Fg-3D-3DJQ7v_U31jt5HgHBh7k3Grc5s4l2CaK8vlz0Mz3vk33oTst5V8UicD8LEunbMVjP2LiFk03ItHF-2BT0uzXit-2B3l6kNEDVS-2BYr0cXAo-2BfqkgRbZJ9s-2FGol956o9O9m6tLvdL1ypkwP814nqee9f3sMSR8PJge5kL6mX68yPZrqHw5-2BDCXOIk-2FkW6x5ltjWSTk14909T-2BjZcVNUBZHISY6NxYj0khs8vS0OomZIVE44xDqHyXEAeRyBA-2B9KGu-2F-2FlwIWMsGpmvL6wkskI-2F8zQg4cOsFgtWiXnHUzLnwP8OHj6voSYxV3g-3D>,
or unsubscribe
<https://u2567673.ct.sendgrid.net/ls/click?upn=tqQDaGrBSQqIjEc4PHVNC16Ei41ODE2E8fJSuorRJxmfrPbL8QxdihhdTrVyaU0-2BAa7WxqmylejDayK-2BHLAScyrvEFVRD9kD6PbwSioFUbMJnv9Yf-2FvT4-2B8oEEbwmVq2ketgz5IXJFd0rjWVWDxQhw-3D-3D_0Iw_U31jt5HgHBh7k3Grc5s4l2CaK8vlz0Mz3vk33oTst5V8UicD8LEunbMVjP2LiFk03ItHF-2BT0uzXit-2B3l6kNEDVS-2BYr0cXAo-2BfqkgRbZJ9s-2FGol956o9O9m6tLvdL1ypkTXO83jDFvljGpJbOXRGYNECT836IjcgRWNPxlGPsQkFHFCrNNc9iqmaUUb680WxCPagCRB-2FYz-2FUJkFDRpcjh4EH4SY6v2kZqFH1K9sxEatZl3YivLMjzZXcfWCHreVlfgiotwDURdZXG0c24KwhjaI1-2FkE0gcUuJvRnP9YIlAbA-3D>
.
|
I only used the I also tried using the Last problem is that the descriptor doesn't work unless I put the uuid and value into a dict. This however produces the same TypeError when doing a read request for the descriptor (which I tried with BLE Scanner) |
I am trying to get the characteristics using web bluetooth, but I receive this error when the javascript calls the service.
Error from the beacon:
Exception in thread HCISocketPoller:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/BluetoothHCI/BluetoothHCI.py", line 197, in _socket_poller
self._socket_on_data_user_callback(bytearray(data))
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Hci.py", line 414, in onSocketData
self.emit('aclDataPkt', [handle, cid, pktData])
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Emit.py", line 17, in emit
handler(*arguments)
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Bindings.py", line 169, in onAclDataPkt
self._aclStream.push(cid, data)
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/AclStream.py", line 18, in push
self.emit('data', [cid, data])
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Emit.py", line 17, in emit
handler(*arguments)
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Gatt.py", line 228, in onAclStreamData
self.handleRequest(data)
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Gatt.py", line 271, in handleRequest
response = self.handleReadOrReadBlobRequest(request)
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Gatt.py", line 681, in handleReadOrReadBlobRequest
callback(result, data)
File "/home/ubuntu/.local/lib/python3.6/site-packages/pybleno/hci_socket/Gatt.py", line 620, in callback
callbackResponse[1 + i] = data[i]
TypeError: an integer is required (got type str)
The text was updated successfully, but these errors were encountered: