Re: Connecting to a known BT address with BLE
Jimmy, the UUID is not dependent of the BdAddr and is generated only when you connect to the device for the first time. It is also different when you connect from a different iPhone. The reason for this seems to be that when you have a bond, and the device address changes, that then the UUID should stay the same, allowing you to connect to the known device again. Connecting to a device by BdAddr is not currently supported by the CoreBluetooth framework API. One solution would be to broadcast your BdAddr in your Advertising packets, and then use the scanning facilities to detect your device. However, it is rather a hacky solution. Please note that only a limited amount of data can be stored in advertising data (should be around 31 bytes with AD_TYPE headers). Etan On 05.09.2012, at 00:49, Jimmy Adler <d99fish@gmail.com> wrote:
Hi,
I was wondering how to go about connecting (or attempt to connect) to a BLE device that I know the address to.
It seems I should do [centralManager connectPeripheral:peripheral options:nil] with a peripheral that I construct myself, but that is not legal since all the properties in the object are readonly.
Is there any way of doing this?
I have tried scanning for my device and printing the resulting UUID for the peripheral, but that does not match with the given address of the device. (the address is printed on the device and scanned using barcode scanner to initiate pairing).
Should I not receive the correct address when printing the UUID of the peripheral received in "didDiscoverPeripheral"?
Br,
Jimmy _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/etan.kissling%40oberon...
This email sent to etan.kissling@oberon.ch
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Etan Kissling