Click here to Skip to main content
15,867,834 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I'm trying to using xamarin for do a test app. This app must search bluetooth devices, view them into a list and connect to them for read or write data. I choose xamarin Portable Class Library for my project.

I see a lots of examples but I can't see devices in my list.

I try Monkey Robotics (project 'Robocontroller' and project 'BLE') but scanning I can't see devices!

Robocontroller:
05-30 15:14:21.048 D/Mono    (11792): [0x7f6946d000] worker starting
05-30 15:14:21.063 I/mono-stdout(11792): BluetoothLEManager: Scan timeout has elapsed.
BluetoothLEManager: Scan timeout has elapsed.
05-30 15:14:21.065 D/BluetoothAdapter(11792): stopLeScan()
05-30 15:14:21.067 D/BluetoothAdapter(11792): 622203304: getState(). Returning 12


BLE:
Adapter: Starting a scan for devices.
05-30 15:23:53.549 D/BluetoothAdapter(17688): startLeScan(): null
05-30 15:23:53.647 D/BluetoothLeScanner(17688): onClientRegistered() - status=0 clientIf=5
adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
05-30 15:23:53.755 I/mono-stdout(17688): adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
[0:] adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
05-30 15:23:53.768 I/Choreographer(17688): Skipped 152 frames!  The application may be doing too much work on its main thread.
Thread started: <Thread Pool> #7
05-30 15:24:03.718 D/Mono    (17688): [0xba2bcf40] worker starting
BluetoothLEManager: Scan timeout has elapsed.
05-30 15:24:03.801 I/mono-stdout(17688): BluetoothLEManager: Scan timeout has elapsed.
05-30 15:24:03.808 D/BluetoothAdapter(17688): stopLeScan()


I use asus k01a with bluetooth 4.0 and android 5 for test. I tried change device but same issue.
Devices that must be discovered are: lumia 950xl, mac mini, arduino bluetooth module, other android phone.


Any suggestions? Thanks

What I have tried:

I tryed others projects like 'estimotes', 'xamarin BLE' (the one with old code that redirect to Monkey.Robotics) and 'BluetoothLEExplorer'. I'm using latest version of xamarin with vs2015 pro.
Posted
Updated 15-Jun-16 21:34pm

1 solution

I used the wrong method, I had read that the ble could see devices with normal bluetooth but it's not true. I have tried other projects like GitHub - angelcalvasp/Blacksun.XamForms running on Android but are not implemented for iOS, someone has to suggest me other samples with iOS?
Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900