- Home /
U3DXT - How to scan for BLE devices with u3dxt.ios.native.corebluetooth?
Hello, I was trying to build a app in unity (Ipad) to communicate with an arduino through BLE.
I looked information regarding this subject in the U3DXT and I only could see the iBeacon example.
Also I saw the API and IOS developer library information U3DXT.iOS.Native.CoreBluetooth Namespace -http://u3dxt.com/docs/api
IOS developer library:https://developer.apple.com/library/ios/samplecode/BTLETransfer/Listings/BTLETransferBTLECentralViewControllerm.html
How to scan for BLE devices with u3dxt.ios.native.corebluetooth? I have some code but its not working: ... private CBCentralManager central;
Void Start() { if(CoreXT.isDevice) { central = new CBCentralManager(); central.DidUpdateState += didState; central.DidDiscover += didDiscover; } }
void didState(object sender, System.EventArgs e) { if ( central.state == CBCentralManagerState.PoweredOn ); central.Scan(null,null); }
void didDiscover(object sender, CBCentralManager.DidDiscoverEventArgs e) { Log(e.peripheral+ " --- " + e.advertisementData + " --- " + e.RSSI); }
Thanks