-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoconnect w/ multiple devices? #96
Comments
It's intended behavior for the basic implementation, the scanner stops while a device is connected and only resumes afterwards. There was never much interest in the autoconnect tool, so a multi device feature was never requested there and I didn't touch it for almost 3 years.
|
Thanks for the explanation! I looked at the code briefly and it doesn't look too bad to implement what you suggest. I am not familiar with Python threading, but I assume it has all the "usual" primitives for inter-thread serialization. Does the runtime quantize print output by line? If so, then your suggestion for prefixing the lines will be fine. I'd prefer them to be labeled by endpoint (e.g. BLE, BLE2, etc) since that's better for human interpretation than MAC addresses. Given the need for cross-platform support, the simpler the better. |
I went with the prefixing line approach. There is now a It required a few more changes because connections fail when the scanner runs continuously, the scanner has to stop for some time ( You can try it with the new 3.0.0 release. |
I'm not sure if this is a bug or the intended behavior. I have two HM-10 devices active and have created a section in the autoconnect.ini file for each. One gets associated with the BLE virtual port and the other with BLE2. I have created both port pairs: BLE<-->COM7 and BL2<-->COM8. Both work individually if I connect manually, but with the autoconnect.py script only one of them (seemingly at random) is ever connected. After the connect it announces that it's entering the main loop and that's it! Shouldn't it continue the scan and also pickup the other device? Or, am I misunderstanding the purpose of the program?
The text was updated successfully, but these errors were encountered: