Since upgrading to macOS Monterey, we have been unable to create a Bluetooth SPP connection to any hardware device.
The SPP service does not appear to be supported. When listing the services for the device, the SPP service is not listed at all, as it was in previous OS versions.
SPP Connection to the device is blocked by the operating system (except in extreme cases where we open a socket connection while the device is still connecting to other Bluetooth services)
We are using a headphone-type device that successfully pairs and connects to the computer with A2DP, HFP and a few other standard services. However, it is unable to connect to SPP service, which was previously available up until Big Sur. Has anyone else faced a similar issue -- and are there currently workarounds to establish a stable Bluetooth SPP connection on macOS Monterey?
After communications with Apple support, the issue has been resolved as of Monterey 12.3 Beta 4.
1 - RFCOMM handles are now properly returned.
2 - IOBluetooth.recentDevices() still does not return devices, which was part of the problem described above, but can be circumvented by leveraging IOBluetooth.pairedDevices() instead.
Related
I have a BLE module that i'm trying to update the firmware in, but having a lot of problems connecting the recommended update software (ISupdater). All I get is 'connect failed' message. There seems to be no troubleshooting information available, so I hope that someone has run into the same issues and solved it.
For the hardware setup, I'm connecting to a PC via a USB-USART serial adapter board. I have the 3.3V, GND, reset switch, mode switch, USART connection from the RN4870 BLE module connected as per the microchip connection diagrams (https://microchipdeveloper.com/ble:rn4870-app-example-fw-upgrade). I have verified many many many times that my connections are correct.
Connection Diagram
To test the BLE connection and data transfer I have mobile devices (iOS and Android) with the recommended apps (SmartData, mBIoT). I can see the BLE broadcast in the bluetooth lists, and I can connect to it to use the apps.
For the RN4870 module, I'm able to connect to CoolTerm software to test that I'm getting communication between the terminal and a mobile device. I'm able to send and receive data on the CoolTerm terminal, and on the mobile device apps, so that suggests to me that the USART adaptor is working correctly, and so is the BLE module.
In CoolTerm, I'm able to enter the CMD mode for the RN4870 module to set and read settings of the module, so I can check and set the baudrate to the default 115200.
If I use a BM70 module (which is the same hardware as RN4870 but different firmware), i can't enter any CMD mode, or do any sort of reset. The data is still able to be sent and received, so that confirms the baud rate is correct.
When I attempt to connect to either BLE module using the ISUpdate software that is recommended in the update steps to use as the firmware updater, I'm not able to connect to the module to update the firmware. I've tried many times to get the software to connect, many different ways, without success, and it's frustrating to no end.
I've updated the MCP2200 drivers to the latest ones from the microchip website, as well as using the latest versions of the CoolTerm and ISupdater. I've also tried previous versions, but still they all have 'connect failed'
ISupdater Image
has anyone got any solutions to the issue?
PC: Windows 10, 64-bit
BLE Modules: RN4870, BM70
CoolTerm Version: v1.8.0 (build 861)
ISUpdater Version: v4.0.0.207
IS187x_102_BLEDK3v1.11_UIv1.01 for Windows 10
Mobile Apps: SmartData, LightBlue for iOS, LightBlue for Android, mBIoT
Hmm, well it turns out that the USB-USART serial adaptor (although confirmed to be working correctly) seemed to be the problem.
At first, I only had the 1 adaptor, and I had to borrow a different adaptor. After swapping this FTDI232 USB-USART Serial adaptor, the connection was made first try, and I was able to update the firmware. I have now purchased a new adaptor.
So, if you are having the same trouble, try using a different adaptor.
I just randomly found a Bluegiga BLED112 Bluetooth dongle and I tried to connect it to my Debian 10 laptop as a basic dongle for Bluetooth audio outs.
Unfortunately I wasn't able to solve all the issues I had, starting from the fact that the device is not fully listed once used lsusb and just a mere ID number - namely ID 2458:0001 - pops out and bluetooth or bluez helps weren't successful either.
This given, I tried to follow several of the guides you can find online, also by running available scripts, but again nothing worked.
So if it's possible, what should I do in order to run such a dongle for the basic use I mentioned above - i.e. just for connecting my stereo speakers to my computer?
Thanks
The BlueGiga BLED112 is not a regular Bluetooth USB dongle. It gives you a virtual com port that can be used to access an API that in turn acts as a BLE device.
It is ment to be used for development of IOT solutions.
Also it does not support Bluetooth Classic, it only supports Bluetooth Low Energy.
Qt: 5.10,
Linux Ubuntu 17.10,
Bluez 5.4x
and I´m using QBluetooth to connect with multiple Bluetooth Low Energy Devices. Everything works fine for one Connection. But when I connect to a second Device with QLowEnergyController::connectToDevice() I get the following error and the first Connection gets aborted:
qt.bluetooth.bluez: Cannot connect due to pending active LE Connections
qt.bluetooth.bluez: void QBluetoothSocketPrivate::_q_readNotify() 21 error: -1 "Software caused Connection abort"
After that the second connection gets established.
I`m using one instance of QLowEnergyController in Central Mode per Connection.
After a Research I think it should be possible to create multiple Connections to BLE Peripherals with the Bluez Bluetooth Protocol Stack. But I´m not sure if QBluetooth support this Feature...
Does anybody know something about multiple LE Connections with QBluetooth?
Is this the right way to establish a second Connection?
Does somebody know a good Workaround?
Thanks for your help!
The problem isn't BLE, but its Qt implementation. The documentation says that any attempt to connect simultaneously to two BLE devices using QLowEnergyController will fail. Check it there: http://doc.qt.io/qt-5/qlowenergycontroller.html ; Section "Detailed Description", paragraph 5:
"BlueZ based Linux cannot maintain two connected instances of QLowEnergyController to the same remote device. In such cases the second call to connectToDevice() may fail."
According to this, it should be possible to establish connexion to two different remote devices using two instances of the class, but it simply doesn't work. If you keep on reading the documentation, you'll find out that " This limitation may disappear at some stage in the future.".
I tried a workaround by disconnecting from the first device before connecting to the second device (both TI SensorTag), but since I had to re-discover the services and re-enable the sensors (see disconnectFromDevice() in the documentation) every time I would re-connect the program became way too slow.
If you want to connect to two devices using Qt, you have to use the Bluez API through the D-Bus with Qt's D-Bus classes.
Edit:
I managed to connect to multiple devices using D-Bus classes. The architecture of my program isn't much more complicated, only the syntax got a little more tricky. The only big issue was the BlueZ version: the D-Bus interface changed a lot between 5.3x (default Ubuntu 16.04) that doesn't support Low Energy (experimental...) and later versions. I think that's the reason why Qt's D-Bus Bluetooth hasn' been enabled yet. Since BLE isn't flagged as experimental since BlueZ 5.42, you should be fine using D-Bus with your current version. For the record, I'm perfectly fine using D-Bus with Raspbian's default 5.9 BlueZ.
I am using a Single-Mode Bluetooth Low Energy PAN1720BR BLE dongle which is loaded with the firmware "BlueRadios nBlue 1.2.1.3.1.0-PAN1720" (latest). When plugged to a computer, I can control and configure this PAN1720BR module with AT Commands through a terminal application on the computer.
With a second computer equipped with a standard BLE dongle, I can pair and connect to the PAN1720BR. See configuration below:
PC1 + PAN1720BR <---- BT 4.0 ----> PC2 + Standard BLE dongle + App running on PC2
The problem is that BLE does not have an SPP profile, so to establish a communication between the two PCs, I need to write an application on PC2. The PAN1720BR has a proprietary profile called BlueRadios Serial Port (BRPS) which is not a standard.
BlueRadios provides libraries for iOS and Android so that we can connect a cellphone to a PAN1720BR and communicate wih it. But they are silent about how to connect a PC (Windows) to a PAN1720BR. When establishing the connection, the Battery service (standard) installs properly on PC2, but the service corresponding to BRSP does not install, driver is missing. What is going on here is not very clear to me.
My goal is to write an application to be run on PC2 to enable communication between the two PCs. My question is, how can I access the Bluetooth with my application? Please correct me if I'm wrong, but I believe my app needs to access the ATT/GATT layer in order to read/write data.
Do you have any sample code that would help, in Java (prefered), C/C++, C# or anything else that would help on Windows?
Thank you
For an App with BLE Module from BlueRadios you must use the ATT/GATT Profile or you use the library from BlueRadios with there BRSP Profile.
I'm trying bring up Bluetooth over USB support on a new ARM-based Android device. I think I'm missing some magic piece of configuration in order to successfully open a BT socket connection.
BT is provided through a USB dongle (vs. UART in most Android devices)
I can successfully run "hcitool scan" to discover devices.
I can open a socket via libbluetooth in C
When I try to establish an RFCOMM connection the connection, the connection
is refused because an L2CAP connection cannot be established.
Also,
for some OS's, I'm required to approve a pairing. (Older Ubuntu, some flavors of Windows' BT stack.)
the peripheral device doesn't require a PIN, but in some cases I'm requested to provide one. (Windows has asked for this. Older version of Ubuntu has asked for this. It may also be when using BT 2.0 dongles, vs. BT 2.1 and up?).
Bluetooth provided with Ubuntu 10 on my PC requires neither PIN nor pairing.
Am I missing a piece of config that says, i) auto-pair devices, ii) don't request a PIN if none is required?
Is there a guide to this online? Documentation seems limited.