-
Notifications
You must be signed in to change notification settings - Fork 9
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
Bluetooth Read Characteristic fails #32
Comments
Hmm, it should only allow the second power state read when the first one has finished. I do know that this sometimes happens when an old device is still reading while a new scan is happening. But the error is handled and I don't think it is the problem. What I'm wondering is. Is it spamming this stack trace or is it just once (for every device)? If this is not the case then I think the problem might be that the older firmware revisions don't report back their power-state. Or have different values for their states. |
It's once per read, per lighthouse device. Both of my lighthouses have firmware 3002. I haven't figured out a way to update them yet without a working Windows setup. I might be able to borrow a laptop from a friend in a week or so, but it isn't something I can do right away. I am able to use the CLI version of lighthouse-v2-manager to turn them on/off from my PC. If there's any other information I could provide that might help, please let me know! |
According to this Stackoverflow post this happens when another transaction is still going on. Though I can't find in the code where this transaction may hang. If you want to also try and have a look then you should take a look in However I do see that I should probably use atomic locks for this instead of a boolean since write operation is also supposed to wait. |
I've pulled and built 01eaceb, but unfortunately, it still persists with the same unknown value and error in logcat. Mutex locking was a good idea though! I'll try this on another android phone this weekend to try to figure out if it's the lighthouses themselves or the phone's BT implementation that might be causing the issue. |
I hope the new Play store release that has been released today can help with this problem. Maybe not the state not working but at least making the app usable. |
Sorry, I've been busy with work and haven't had a chance to respond. I did test the latest version and can confirm that even though the state is still 0xFF, I can now turn on and off the lighthouses with this app. Thanks! |
This is on a cheap Samsung J3 Orbit (SM-S367VL) running Android 9. I can read the Characteristic using BLE Scanner, so the hardware appears to be working fine. When I scan for available lighthouses using the latest code ( commit 331ddd3 ) it successfully finds the available V2 Lighthouse devices, but does not succeed in reading the power state. The backtrace below is generated when reading the Bluetooth characteristic is attempted:
The text was updated successfully, but these errors were encountered: