I have an application that I developed on a MAC using Bluetooth. The application uses QBluetoothSocket and QBluetoothDeviceDiscoveryAgent. This application works fine on the MAC. When I transfer the source to my Raspberry Pi running Buster it won't connect to the Bluetooth device. Discovery works just fine, but when I try to connect, there are no signals sent beyond the state change to connecting. There are no error messages or notification, everything just stalls in that state. I have a version of the application written in pyqt5 (I hate python) which actually connects with no problem. PyQt5 though uses a lower level socket connection. I also created a program using plain old C sockets similar to PyQt5 and it also connects. The Bluetooth module is a simple HC05 connected to an Arduino. It's used as a simple serial connection no advertised UUID or services. I tried the Qt example of the bluetooth chat program and it doesn't even find any Bluetooth device on the Pi, where as the same code on the MAC does show devices. Any ideas on why QBluetoothSocket fails to connect when simple C sockets work just fine?
Bookmarks