Hi all. I've written an App which talks to a BLE device and exchanges data. When the relevant B4X page appears, a BLEManager2 is initialized and a scan is initiated. When the device of interest is encountered in the DeviceFound event, a Connect2() is executed. From that point, I can send and receive data, also thanks to the SetNotify() function.
Now, I would like to talk to a few different devices concurrently: they are identical, but I can have, say, 3 or 4 of each one, and each should have a different name I suppose. The App should show a page with data from them all (of course they are configured - the App knows the different devices).
Once I've done a scan, and collected all the visible devices, is it sufficient from then on to issue Connect2(), SetNotify(), send/receive data, to each device? Or should I shutdown something before passing to the next device? Or may be even the scan can be avoided? In that case the app would try to connect() to each known device in turn, wait for some time to see if the connection is established, then pass to the next device. I have some confusion about this...
Now, I would like to talk to a few different devices concurrently: they are identical, but I can have, say, 3 or 4 of each one, and each should have a different name I suppose. The App should show a page with data from them all (of course they are configured - the App knows the different devices).
Once I've done a scan, and collected all the visible devices, is it sufficient from then on to issue Connect2(), SetNotify(), send/receive data, to each device? Or should I shutdown something before passing to the next device? Or may be even the scan can be avoided? In that case the app would try to connect() to each known device in turn, wait for some time to see if the connection is established, then pass to the next device. I have some confusion about this...