Hi all, When writing a driver for the RDTech UM24C, I started to play around with Sigrok's Bluetooth (RFCOMM) interface. When scanning for the device, everything works fine. However, I ran into problems when sampling the device.
It seems like the connect() call that connects the Bluetooth socket to the device sometimes fails with EBUSY. This usually happens if a connection to the device was recently closed. I don't know if this is a general Bluetooth issue on Linux or due to a dodgy interface in the device. Unfortunately, this behaviour is consistently triggered when sampling the device since Sigrok first opens a connection to the device to scan the device, closes it, and then opens a new connection to sample the device. I have hacked around the problem by changing sr_bt_connect_rfcomm to retry a few times if connect returns EBUSY. I'm not sure if this is a good solution though. It seems like a better solution would be to reuse the socket that is used to scan the device, but that probably requires some API changes. What's the prefered solution here? I'm happy to submit my patch to retry if that is a good enough solution for now. Cheers, Andreas
_______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel