I am trying to connect to a bluetooth low energy device from my PC and Raspberry Pi3 in a QT application, but I get this QT error when trying to connect:
qt.bluetooth.bluez: Unknown l2cp socket error: QBluetoothSocket::UnknownSocketError "Transport endpoint is not connected"
qt.bluetooth.bluez: void QBluetoothSocketPrivate::_q_readNotify() 14 error: -1 "Resource temporarily unavailable"
qt.bluetooth.bluez: Unknown l2cp socket error: QBluetoothSocket::UnknownSocketError "Resource temporarily unavailable"
I don't think its QT, I suspect bluez is the problem. I found out that Linux can find the device with:
sudo hcitool lescan
And it can connect through:
sudo hcitool lecc <address>
So that's good. Problem is that as soon as I try with gatttool (which must be the eqavelent of what QT is trying to do), I get the following:
pi@user:~$ sudo gatttool -I
[ ][LE]> connect <address>
Attempting to connect to <address>
Error: connect error: Transport endpoint is not connected (107)
[<address>][LE]>
The results are the some on both PC and Raspberry. bluez version on PC is 5.37 and on raspberry 5.23.
Any ideas? :(