Skip to content
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

Stuck on "waiting for connection" #7

Open
ghost opened this issue Jul 8, 2022 · 9 comments
Open

Stuck on "waiting for connection" #7

ghost opened this issue Jul 8, 2022 · 9 comments

Comments

@ghost
Copy link

ghost commented Jul 8, 2022

Followed all instructions, no window pops up, my phone cannot detect anything even though discoverable was turned on

@ghost
Copy link
Author

ghost commented Jul 9, 2022

Update: Phone sees the device, but pairing gives errors

@Alkaid-Benetnash
Copy link
Owner

Hi, if you still have issues pairing, maybe share more information about the errors you saw.

@toxicrecker
Copy link

Hello, I have a similar issue, I do not see the GUI window which I should be seeing according to the guide, pairing or anything gives no errors but it's simply stuck on "waiting for connection", no errors, nothing.

@Alkaid-Benetnash
Copy link
Owner

The part of the code in question is here
I understand that the GUI might not show up until the pairing is done. But I do not understand what you experienced.

Can you confirm that this program only has one instance running at the same time?
Also, the linux distro, kernel number, bluez version, etc. All those information could be helpful too.

@toxicrecker
Copy link

I will get back to this with all the information you asked for and a video of what happens.

@hrdl-github
Copy link

hrdl-github commented Nov 25, 2023

I needed to run bluetoothctl pairable on before pairing (bluez 5.70, Arch Linux).

@jal-frezie
Copy link

jal-frezie commented May 14, 2024

I'm also stuck on 'waiting for connection'.
Ubuntu 24.04, gnome-flashback, kernel 6.8.0-31-generic, bluez 5.72
I see some 'CHG's in the bluetoothctl window when I start the script, but no new window.
Also when executing power on, I get the following in syslog:

2024-05-14T19:22:20.864413+01:00 xxxx bluetoothd[202858]: src/adv_monitor.c:btd_adv_monitor_power_down() Unexpected NULL btd_adv_monitor_manager object upon power down
2024-05-14T19:22:20.894605+01:00 xxxx blueman.desktop[21127]: blueman-applet 19.22.20 WARNING PowerManager:203 on_adapter_property_changed: adapter powered on while in off state, turning bluetooth on
2024-05-14T19:22:24.304126+01:00 xxxx blueman.desktop[6589]: blueman-applet 19.22.24 WARNING PowerManager:203 on_adapter_property_changed: adapter powered on while in off state, turning bluetooth on

...so I killed the processes 6589 and 21127 and tried again, the messages were gone but otherwise no difference

Once I get past this problem I intend to replace the X window with a Tkinter toplevel which should enable me to run it on a Wayland GUI

@Alkaid-Benetnash
Copy link
Owner

Hi all who is stuck on "waiting for connection",

I just did a test with an up-to-date setup and updated the README to reflect the latest behavior.

But in brief, I think there are two issues you are facing:

  1. Be sure to update the MAC address of your bluetooth controller in the source code. This step is very important.
  2. The readme was misleading, the GUI window is actually expected to show up when you completed the whole pairing process with another device. The connection you were waiting for is basically the bluetooth connection from the client which needs a bt keyboard.

Hope it solves your problems!

@Alkaid-Benetnash
Copy link
Owner

Alkaid-Benetnash commented May 14, 2024

And @jal-frezie ,
I don't have a wayland setup. But will be happy to merge your X window => TkInter changes.
If I understand correctly, Tkinter should provide generic I/O support agnostic to linux desktop environment so it also works with X.

Feel free to create another wayland issue/PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants