Repository navigation
fix bluetoothctl handling for bluez 5.87 - #1
Merged
Merged
Conversation
The prompt is "[bluetoothctl]>" now and appears only after the first input, so every command ran into the timeout - in the main thread, which is where the spinners came from. Three more that came out of comparing against the 5.87 sources: a timed out session stayed marked as ready, the disconnect message was renamed after 5.70, and 5.87 wraps devices that advertise as non-discoverable in color escapes that ended up in the name.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



oe-alliance-core moved to bluez 5.87 in oe-alliance/oe-alliance-core@76f04241fce, and the plugin no longer talks to
bluetoothctl.The prompt changed from
[bluetooth]#to[bluetoothctl]>(PROMPT_ONinclient/main.c) and 5.87 emits it only after the first input.send()matched on"#", so every command ran into the 10 s timeout - in the main thread, which is where the spinners in oe-alliance/oe-alliance-core@76f04241fce#commitcomment-197284156 come from. The log there shows it directly:bluetoothctl failed after scan on,... after devices,... after paired-devices.Three more came out of comparing every
expect()string against the 5.87 sources:Successful disconnectedtoDisconnection successful, so disconnecting always looked like it failed. Both spellings are kept.print_devicegained a branch that wraps devices advertising as non-discoverable inCOLOR_BOLDGRAY. Those escapes ended up in the device name, which is the normal case for a BLE remote.Tested on a gbquad4kpro running 5.87: the scan lists devices and the spinners are gone.
connect,disconnectand pairing itself are not tested yet, and whether this also fixes enigma2 refusing to shut down after a failed scan is unconfirmed.