Struggling to understand how Universal Unique IDs work (see here) I was wrongly assuming that Core Bluetooth is a framework from Apple that covers all aspects of communication with devices via BT. I was WRONG !
scanForPeripheralsWithServices method and, in general, what I tried to do, for almost a week, is NOT good for my intended pupropse, i.e. to communicate with my Kenwood TH-D74 transceiver via its bluetooth interface. I should have read more carefully this very first phrase from Apple’s documentation:
The Core Bluetooth framework provides the classes needed for your apps to communicate with devices that are equipped with Bluetooth low energy wireless technology.
The problem here is that CB is for low-energy devices, version 4.0. When talking about Bluetooth Low Energy vs. Bluetooth, the key difference is in Bluetooth 4.0’s low power consumption. On the other hand, TH-D74’s BT interface is 3.0 class 2 offering no support for the LE protocol. Most Bluetooth applications are battery-powered Class 2 devices (like this transceiver), with little difference in range; whether the other end of the link is a Class 1 or Class 2 device as the lower-powered device tends to set the range limit.
But bluetooth low energy is a subset of Bluetooth v4.0 with an entirely new protocol stack for rapid build-up of simple links. As an alternative to the Bluetooth standard protocols that were introduced in Bluetooth v1.0 to v3.0, it is aimed at very low power applications running off a coin cell. And Core Bluetooth framework is aimed specifically at this new protocol stack. So I cannot use it with my transceiver. Pity.
However, once bluetooth is activated via menu entry No. 930, my Mac immediately mounts a BT serial port and communication is possible through the serial port.
However, exploring Core Bluetooth is fun and I think I will dive a bit more into it. I have many BLE devices around, a scale, some other phones and the Apple TV. So stay tuned for both. More to come.
- Bluetooth (from Wikipedia)