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)
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)