e-sr / moonboard

GNU General Public License v3.0
96 stars 43 forks source link

Bluetooth problem?? #18

Open marcelbesoeu opened 3 years ago

marcelbesoeu commented 3 years ago

moonboard_BLE_service.py is running, Moonboard app is conecting but only once (btmon is showing some activity) Simple_client.py is not showing anything. Next connection try, finish with "Unable to find MoonBoard". What could be wrong? Hardware is raspberry pi 3B+, clean install + requiremets Maybe you can make image of working RPI system SD??

reinarrow commented 3 years ago

Exact same issue here. The BT connection from the phone only works once. When the user disconnects (by clicking on the BT symbol on the app or exiting the app), then it will never be able to connect again. The message "Unable to find MoonBoard" is obtained.

The only way to make it work is restarting the moonboard_BLE_service.py or rather doing systemctl restart com.moonboard if running as a systemd service.

Any idea on how to fix it?

marcelbesoeu commented 3 years ago

My phone on first connection doesn't return "Unable to find MoonBoard", but BT symbol on the app is not activated and holds are not send. I just register some activity on bluetooth comunication. Next connections return "Unable to find MoonBoard" until moonboard_BLE_service.py is restarted. I will try on diferent android phone with clean instalation of MoonBoard app.

reinarrow commented 3 years ago

Mine does show the BT icon and also send the problems correctly (the LEDs are light up). The biggest issue is that after disconnecting, it is not able to connect again.

El dom., 13 dic. 2020 16:45, marcelbesoeu notifications@github.com escribió:

My phone on first connection doesn't return "Unable to find MoonBoard", but BT symbol on the app is not activated and holds are not send. I just register some activity on bluetooth comunication. Next connections return "Unable to find MoonBoard" until moonboard_BLE_service.py is restarted. I will try on diferent android phone with clean instalation of MoonBoard app.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/e-sr/moonboard/issues/18#issuecomment-744026209, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDKABASPXKJXDAJIT5HH2LSUTOSZANCNFSM4USM535A .

reinarrow commented 3 years ago

Any news on this?

marcelbesoeu commented 3 years ago

I cleared all network settings and my phone few times was able to connect and send problems, but now is not conneting anymore, second phone is connecting all the time, but only problems with 4 or less holds are processed properly.

reinarrow commented 3 years ago

I forked this repo: https://github.com/grasnag/moonboard and the Bluetooth issues went away. Just run the installation scripts and it was running. There were a couple of minor errors that I was able to fix and created a merge request.

reinarrow commented 3 years ago

Now I have the exact same issue that you mention on my 2 phones...

8cH9azbsFifZ commented 3 years ago

Maybe I am just lucky? I have no problem so far with any of my iPhones (5, 8, 11, X) on Raspi W Zero. But... I had one report that there were timing problems with Android and a Pi 3 B. He reported, that the first part of the messages (i.e. long routes) was received properly in "process_bytes" in "moonboard_app_protocol.py". And the 2nd part is lost in 4/5 of the cases. Cf. #21

reinarrow commented 3 years ago

Maybe I am just lucky? I have no problem so far with any of my iPhones (5, 8, 11, X) on Raspi W Zero. But... I had one report that there were timing problems with Android and a Pi 3 B. He reported, that the first part of the messages (i.e. long routes) was received properly in "process_bytes" in "moonboard_app_protocol.py". And the 2nd part is lost in 4/5 of the cases. Cf. #21

I'm experiencing that timing problem as you can see from issue #21. I thought it was Raspi Zero not having enough resources to handle it, but I'm glad to hear that you have the system running correctly using it.

I'm doing a full reinstall on a newly flashed OS because I fucked everything up trying to do a Bluez version update. Fingers crossed to have it working at last...

8cH9azbsFifZ commented 3 years ago

Raspian 10 with nightly updates in my case...

reinarrow commented 3 years ago

Raspian 10 with nightly updates in my case...

Is that the newly named 'Raspberry Pi OS'? I'm using the latest version of Raspberry Pi OS Lite (no desktop or recommended software).

reinarrow commented 3 years ago

BTW, I completed the reinstall and the problem persists. it's not only that sometimes the problem does not get displayed. I even get the system displaying a wrong problem because of intermediate packets lost when more than 2 are sent... Any clues?

8cH9azbsFifZ commented 3 years ago

Raspian 10 with nightly updates in my case...

Is that the newly named 'Raspberry Pi OS'? I'm using the latest version of Raspberry Pi OS Lite (no desktop or recommended software).

Yes.