Android Question BLE2 + BluetoothAdmin

Status
Not open for further replies.

Josias

Member
Licensed User
I am using Ble2 library to connect to my device. No problem. Enhancing my program I decided to change the program such that when the user opens my program it should automatically enable the BT adaptor if not enabled and start a scan for BLE devices.
I am using both the BLE2 library and BluetoothAdmin. BluetoothAdmin is used to enable the adaptor and Ble2 is used for Tx/RX. Both libraries have got a 'StateChanged' event. It seems that two libraries are not playing nice together. Is there a way not to use BluetoothAdmin and to enable the BT adaptor or what are my options?
 

Josias

Member
Licensed User
THe majority of my code is snippets that I got from the various examples on the forum.

Public manager As BleManager2
Public admin As BluetoothAdmin

admin.Initialize("admin")
manager.Initialize("manager")
 
Upvote 0

Josias

Member
Licensed User
Should the name be the same or different? What effect does it have?
What should be initialized first? manager or admin? Does it make a difference?
 
Upvote 0

Josias

Member
Licensed User
It seems to loose synchronization. The one will report that Bluetooth is off and the other will report that it is on.
 
Upvote 0

Josias

Member
Licensed User
It seems that my understanding of the libraries is not complete.
It seems that I am fighting something that is happening in the background as I was trying to enable the BT adaptor myself if it is not enabled. But it seems that something else is trying to enable the BT adaptor every 60 seconds. Can it be BleManager2 that is doing it? I've disabled BluetoothAdmin. If BleManager2 is trying to enable BT, what is the reason and what is trying to achieve?
 
Upvote 0

DonManfred

Expert
Licensed User
Upvote 0
Status
Not open for further replies.
Top