-
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
Internal inconsistency: Could not find device with connection handle 0 #31
Comments
Hi, it appears that a Connected event has gone missing. I base this on that you receive a Disconnected event. It's not clear however where the event has gotten lost. What you could do is turn the logLevel option in adapter.Open to debug and collect the info for investigation. |
Hi, Please find attached application log, it contains all data from application start to "Disconnect failed" message. The "Status Connecting..." message indicate adapter.connect function. |
Hi again, Okay, I know what's wrong. My problem is in nan module layer,- there is a 64 slots queue for all events. I have around 15 peripheral devices around, sending advertisement and scan response packets. I'm testing this on Intel Edison which isn't able to get all these events in time before queue is full. That's why connection event is occasionally lost. I've temporarily increased events queue to 512 slots and this works fine. Much better solution is to have one queue for advertisement/scan response events and second other events. const auto EVENT_QUEUE_SIZE = 512; and to confirm I added queue full message in driver.cpp:
"Queue is full" message appears occasionally when I have 64 slots. Best regards |
Thanks for the update! Good catch finding the culprit, we should add a fix for it. Your suggestion about two queues sounds like a good solution. |
Hi,
Sometimes when I try to connect to a particular device, the driver stucks in adapter.connect function. There is no connect callback and I don't get connectTimeOut event too.
After a while there is disconnect failed message:
I tried to add additional timeout for connect method but next time I try to connect to a device this message appears:
Do you have any suggestion how to fix this, please?
The text was updated successfully, but these errors were encountered: