-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Revised bluetooth configurator, second attempt #3193
Conversation
…yay!), just needs some minor UX improvements.
…nto better-bluetooth
…nto better-bluetooth
And, even if you ultimately still don't want to take these changes, I think there's been value (both for me in getting acclimated to your coding conventions and preferred working style, and for you in having a number of real issues brought to your attention and one working fix approach to them put in front of you) in pursuing this, so I really don't resent the time investment. Besides, I can always use my own branch as a workaround for the issues until they ultimately get fixed however they officially get fixed. |
In the meanwhile, I'll look at what's available in |
Per https://github.com/khvzak/bluez-tools, it provides the following tools:
So I will look into revising my branch to have |
Looks like the latest release of |
So, bad news... upon further investigation, that version of I don't know if this has been corrected by changes committed to |
There have only been two commits to I have filed an issue in the |
Additionally, the I perused the source code for |
I've filed an issue on the lack of "capability" command-line option here: khvzak/bluez-tools#42 |
I'm fluent in C/C++ and will spend some time trying to come up with reasonable fixes to |
Is this PR ready to be tested/reviewed ?
|
That’s strange... maybe my file rename didn’t get picked up correctly by `git add -u`? I’ll double check and follow up.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Cristi Mitrana <[email protected]>
Sent: Friday, July 10, 2020 11:01:24 PM
To: RetroPie/RetroPie-Setup <[email protected]>
Cc: Keith F. Kelly <[email protected]>; Author <[email protected]>
Subject: Re: [RetroPie/RetroPie-Setup] Revised bluetooth configurator, second attempt (#3193)
Is this PR ready to be tested/reviewed ?
It looks like it's missing some files - trying to pair a device immediately throws an error and the log shows
stdbuf: failed to run command ‘/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/pair-device’: No such file or directory
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRetroPie%2FRetroPie-Setup%2Fpull%2F3193%23issuecomment-656997214&data=02%7C01%7C%7Ca24765337a9a4e1bc37008d8255fd7d8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637300440848403546&sdata=0IxJd97%2B5tArMNX2rBD%2BGC4542rxFjVmZ8mfWoxaV5U%3D&reserved=0>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF2EYJCIN6XF3DEV3YB7RNLR2753JANCNFSM4OWL2OPA&data=02%7C01%7C%7Ca24765337a9a4e1bc37008d8255fd7d8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637300440848403546&sdata=DuXNk9X%2FexYzWhh49D6rvGeKoLHcNYnsZg%2BbL4Y8QZA%3D&reserved=0>.
|
Yep, crap, that's what happened -- I assumed |
Fixed. Please try again. |
I'm also about to push another small commit to address my own minor review items above. |
PIN/passkey entry scenarios are still busted due to problematic prompting in the main pairing loop in |
…d PIN/passkey prompting during main pairing loop
Fixed. This is now working again on my end. |
…nto better-bluetooth
I re-tested with the latest changes.
3.(UI related) - We don't use really use progress dialogs in the scriptmodules. Besides the scanning dialog - which should give an indication of a scan in progress - I don't think we need a Working progress dialog for the 'Display all connected BT devices' or for 'Removing a BT device', these operation are not long lasting actions.
I'll have to try the PS3 pairing, this is - by far - the largest source of complaints regarding Bluetooth gamepads in the forum. As a general comment on the PR, it should have a list of changes from the previous version. Thank you for your time. |
Thank you for taking some time to try it out and provide feedback.
By design. Large, mostly-empty dialogs don’t make visual sense, and are thus a bad convention.
I acknowledge this is subjective. I’ll revert those text changes if it improves the chances of this change eventually getting accepted.
A progress dialog is a dialog that shows a progress meter/bar. These are just informational message boxes. Any time a user initiates an action but gets zero visual feedback for longer than about 0.25 seconds is a bad user experience, as it creates the feel of a sluggish and unresponsive UI. Honestly, the current UI/UX screams “I was designed by engineers who treat usability as an afterthought”. This proposed change is trying to help remedy that for at least this specific area. If it leads to a broader discussion about design principles, even better :)
I do not have a single PS3 controller to try to repro with. If you’re willing to grant me
Yes, it’s intentional. That dialog isn’t for “connection mode”, it’s for a developer-internal concept (bluez pairing agent capability), which should never need to be shown to the user. Most users have no clue what they’re being asked or what the implications of the choice are anyway. With my changes, it is automatically determined based on whether the user has a keyboard, a gamepad, or no input device already attached.
Yep — once I get this wrestled into a condition you all deem acceptable, then I’ll go back and reconstruct the end result through a cleaner and clearer series of incremental changes in another branch. I just don’t want to burn my time on that until everything else is squared away first.
Thanks — I agree :)
That’s really not true. The current UX (which includes the reliability — or lack thereof — of the back end pairing script) is broken in a number of ways. Just trying to successfully scan for and pair a single device (especially something requiring a PIN or passkey) is a major exercise in frustration today. You can see a detailed description of the problems in my first PR on this topic (which has been closed). |
I agree, but that's not a reason to cram 3 words on 2 lines.
Sorry, progress dialog was a bad choice. What I meant is that the operations waiting for those info boxes are not 'expensive' enough to warrant an info box.
Let's see how PS3 works now, I'll test the devices that I have.
I'm not an expert in this field, but most OS-es have similar prompts when pairing a device, so it's not something that a user hasn't encountered before. Technically though, aren't we excluding some devices from pairing - i.e. keyboard needing a PIN or some gamepads needing a confirmation ?
I'm looking at the module as a whole when I'm saying that seems largely unchanged. |
Finding a genuine SONY dualshock3 sixaxis controller is difficult, but I think I managed to find a real one on eBay. It should arrive in about a week. |
Pairing seems to work fine - tested both controllers and an old 8Bitdo SN30. I removed the existing PS3 paired devices and the issue of them appearing as online during scanning doesn't seem to occur. |
After re-pairing your PS3 controllers and turning them both off, does a subsequent pairing scan still show them as devices available to pair? If so, that’s going to be a bug in either the |
No, it doesn't - I mentioned that. But I intend to re-test by pairing it via the current version and then running again with the PR pairing. I haven't looked at the Python scripts, Is there a way to turn on debugging and see more info ? That might shed some light. |
OK, re-did the PS3 connection tests and I think the issue comes from the fact that it's not listed as Paired. bt-device -i E0:75:0A:A0:92:6C [E0:75:0A:A0:92:6C]
Name: Sony PLAYSTATION(R)3 Controller
Alias: Sony PLAYSTATION(R)3 Controller [rw]
Address: E0:75:0A:A0:92:6C
Icon: input-gaming
Class: 0x508
Paired: 0
Trusted: 1 [rw]
Blocked: 0 [rw]
Connected: 1
UUIDs: [HumanInterfaceDevice] Note that that it appears Trusted/Connected, but not Paired. The controller works fine like this (EmulationStation and games). As a result, the controller doesn't show on the list of Paired controller or in the Removal dialog and I think that the fact that's not Trusted makes it appear on the scan result. |
The PS3 controller I ordered is scheduled to arrive on July 18, so I'll be able to try reproducing it then. The displayed Name value indicates your controller should be genuine. |
As for your question about debugging info: yes, you can get helpful debug spew by passing the |
Got a notification just now that my PS3 controller has been delivered ahead of schedule. I’ll check it out and report back in the next day or two. |
Got the controller, verified it’s genuine. Installed the I dropped to bash, ran
So it seems I’m reproducing the same issue on my end. I’ll investigate. |
The problem appears to be with
Because the device is “deleted” automatically (from bluez’s perspective) immediately after being found, all subsequent commands to try to pair, connect, or trust the device fail, because the device is not recognized by I’m not sure how I managed to get the device to pair at all on my second attempt, but it seems more like a fortuitous accident than a reliably successful outcome. |
Looks like the issue I was observing was caused by my having “enabled support for third-party controllers” during the installation of |
Alright, I think I see how my changes have broken this odd scenario. I’m working on a fix. |
Very bizarre behavior and properties reported by the I’ll dig into that driver a bit to see what I can find, but if it’s not something that can be easily fixed or patched on the fly by way of using |
No simple change to However, I think I’m seeing an opportunity here to eliminate all the custom Python code and just use |
Just to warn you this isn't going to be accepted. I am sorry, but want to make this clear before more time is spent. I appreciate you have put time into this, but you started work on this without any initial discussion or agreement and you also said:
so I hope you are not too upset by this. I'm also unsure why you would want to continue this (at least here), after your comment on the other PR of "Good luck with your bug farm". Unfortunately I don't feel this will ultimately work out sorry. |
Alright then — I didn’t want to have to maintain my own public fork, but since that’s what it’s going to take, that’s what I’ll do. |
I've fixed a couple defects in my own previous work in this branch, and I also went through and addressed all the points of concern you raised about function naming, function locals, and not restricting to only input devices. While this does continue (for now) to use my rewritten Python script for the pairing agent on the backend, that in no way prevents you from moving to some other backend tool or pairing agent script in the future, and it buys immediate UX and reliability improvements for the user while you (we?) figure out a longer-term plan for the back end. I (and plenty of other users I know) would very much appreciate if you would take a second look at this.
If the commit history alone is still too messy for your tastes, I'm happy to reconstruct the end result in a more incremental series of more clearly-labeled commits in a new branch. I just don't want to go to that trouble before knowing the end result is acceptable to you.