Skip to content

Bluetooth Connection after command lost #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

Open
heradon opened this issue Jan 1, 2024 · 5 comments
Open

Bluetooth Connection after command lost #9

heradon opened this issue Jan 1, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@heradon
Copy link

heradon commented Jan 1, 2024

Hello guys.

First, thank you for your work! AWESOME!
But my problem is, after a successful command i cannot send a second command to the Pixel Display.
i must restart my bluetooth daemon (systemctl restart bluetooth) then i can send the second command.

My System:

SYS: ArchLinux
Kernel: 6.6.8-arch1
HW: Asrock x300

Greetz Hera

@derkalle4
Copy link
Owner

Hi Heradon,

many thanks for your bug report!

This is unfortunately my first project with utilizing Bluetooth with Python and somehow Bleak does not work that good (or it has something to do with the display itself that makes it worse).

I have a quite similar problem as well: I need to send the first command twice to be able to send a successful command to the device.

My further plans would be to initiate the connection to the device one time and have the ability to send the next command using the already opened connection. Currently this is not possible. Thought I would integrate a better command line solution as well as a gui.

Keeping this bug open and assign it to myself. Hope to be able to provide you a solution.

Kind Regards,
Kalle

@derkalle4 derkalle4 self-assigned this Jan 3, 2024
@derkalle4 derkalle4 added the bug Something isn't working label Jan 3, 2024
@derkalle4
Copy link
Owner

Hi @heradon,

are you familiar with Python? Then you could check out the early version of the library. Will be available via pip soon: https://github.com/derkalle4/python3-idotmatrix-library

There is a test.py which should work, this will send multiple command over the opened connection.

@derkalle4
Copy link
Owner

Hi @heradon,

I have implemented the library into this project. Could you check again using the --test parameter? This should send multiple commands without reconnecting! It works fine on Linux Mint 22.10.

Example command:

./run_in_venv.sh --address auto --test

Kind Regards,
Kalle

@derkalle4 derkalle4 reopened this Feb 26, 2024
@aviwad
Copy link

aviwad commented Jul 18, 2024

The test works! Can this be integrated for regular commands? Would love to update images on my display without the display symbol for reconnection.

@derkalle4
Copy link
Owner

@aviwad

yeah, there is a planned integration with some kind of open connection. Unfortunately when the python script closes after a command got sent there is no way to keep the connection open (I guess). Maybe the bluetooth library I use can tell the operating system to keep the connection open so we can re-use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants