Is it possible to have multiple blemanager objects?
I am quickly running into a problem that I am not entirely sure how to manage. the iPad totally hates being run as both a peripheral and a central.
So, I am trying to keep the iPad as a central only.
But I ran into a brickwall there too, because when manager_disconnect fires, there is no way to keep track of which device disconnected.
Basically, I am connecting to a BLE serial device using the Nordic profile, which works fine. But at the same time, I am trying to connect to a phone as a peripheral as well. so somehow the iPad has to be able to juggle both connections which seems easy at first, but things get hairy when one of the two disconnects.
No way to know which one disconnected.... So I cant run the appropriate routines. If I leave it in SCAN mode all the time for the Phones, thats fine. but then if the BLE Serial device disconnects im screwed as I will have no idea that it did.
Even this wouldnt be too big of an issue, except I am sending very different data to the two different peripherals. So I have to have some way to keep track of which peripheral is connected, and if a disconnect event fires, knowing which one disconnected.
any ideas?
I am quickly running into a problem that I am not entirely sure how to manage. the iPad totally hates being run as both a peripheral and a central.
So, I am trying to keep the iPad as a central only.
But I ran into a brickwall there too, because when manager_disconnect fires, there is no way to keep track of which device disconnected.
Basically, I am connecting to a BLE serial device using the Nordic profile, which works fine. But at the same time, I am trying to connect to a phone as a peripheral as well. so somehow the iPad has to be able to juggle both connections which seems easy at first, but things get hairy when one of the two disconnects.
No way to know which one disconnected.... So I cant run the appropriate routines. If I leave it in SCAN mode all the time for the Phones, thats fine. but then if the BLE Serial device disconnects im screwed as I will have no idea that it did.
Even this wouldnt be too big of an issue, except I am sending very different data to the two different peripherals. So I have to have some way to keep track of which peripheral is connected, and if a disconnect event fires, knowing which one disconnected.
any ideas?