rhummelmose / BluetoothKit

Easily communicate between iOS/OSX devices using BLE
Other
2.27k stars 267 forks source link

Question: how to find out when a BKRemotePeripheral is ready for send/receive #33

Closed Daij-Djan closed 8 years ago

Daij-Djan commented 8 years ago

Hi, I wonder about how to find out when a BKRemotePeripheral is ready for send/receive.

I scanned and discovered it, connected but AFAICS I need to wait for the discovery of its services and characteristics before I sendData..

I wonder if there already is a mechanism or if I should provide a delegate function on BKRemotePeripheralDelegate for it?

Daij-Djan commented 8 years ago

if I use sendData too early, dataCharateristic is nil - obviously ;) and It fails. btw I made the SendDataTask consider that - before it failed silently.

rhummelmose commented 8 years ago

Makes sense. Another event should be omitted or it shouldn't make the connected callback before services and characteristics are discovered.

calebkleveter commented 8 years ago

Seems this thread can be closed now.