-
Notifications
You must be signed in to change notification settings - Fork 139
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
bluetooth fails to connect after some time #120
Comments
Just got my miflora sensor and I think I have the same issue. After some time it dies. Running sudo hciconfig hci0 down and sudo hciconfig hci0 up everything works again for a while... |
Had the same issues with Debian 9 (but not Raspberry) half a year ago. Like @chairman2s said, The problem was bluez, had to use the recent version. http://www.bluez.org/download/ and https://learn.adafruit.com/install-bluez-on-the-raspberry-pi/installation Maybe this helps. |
I am currently compiling and installing the latest version of bluez (5.54). I was running 5.50, not sure if this will make a difference, we'll find out. As a temporary solution, I have added
before the sleep command, so it resets the bluetooth adapter each cycle. That seems to keep the bluetooth connection available. I am using a 15 min interval. |
Ok, I tried to install bluez 5.54 but to no avail. Compiling and installing returns no errors, but I am left without a working bluez installation (no bluetoothhd deamon, no hcitool etc). For now I will stick with version 5.50 and use the workaround of reseting the adapter each cycle. I am not even sure that upgrading to 5.54 will fix the problem. |
Sorry, Im not so into coding. On what line did you but it? Is it at the end on line 402? |
|
I have exactly the same issue as discussed here. After a while, the connection fails. My system looks as follows:
I suspect that the problem only occurs since the kernel was updated from 4.14 to 4.19. All my packages (including the firmware) are up to date. The workaround with |
I have noticed that this often works, but unfortunately not always. At some point, there will be a error here too.
The installation via the link given here does not work with Stretch and my Raspberry Pi 3. Before the installation I have the following version: After the installation it looks the same: With this installation guide it worked for me as well. https://scribles.net/updating-bluez-on-raspberry-pi-from-5-43-to-5-50/ I'm testing the version right now: I hope this makes things more stable... |
Unfortunately the update to Bluez 5.54 did not help much. The solution for me was a firmware update to the last 4.19 version. See here: |
I am experiencing this issue since last year. I reduced the Bluetooth speed as I have a Raspberry pi v3 standard I.e. non plus. |
Hey all, Was any of you able to implement a detection for the error? A detection in the daemon would be a good start to get closer to a solution. Feel free to open a PR for it. |
I have recently updated to Bluez v5.54 (https://scribles.net/updating-bluez-on-raspberry-pi-from-5-43-to-5-50/) and upgraded RPi firmware to 4.19.118-v7+ (#83 (comment)) and removed the temporary fix of resetting the bluetooth adapter (sudo hciconfig hci0 reset). I have had no issues for almost a week now, so it seems to have solved the problem. |
I did it exactly the same way. And now it' s going better for me than ever before. |
I'm glad that worked for you.. unfortunately for me, running the new firmware and bluez 5.5 I still have the issue on a Pi 0. After 7-8 hours I have to reboot the Pi. The hcireset trick didn't work for me either. Not sure what's going on. |
Upgrading from stretch to buster appears to have fixed this for my pi 3b. The dist upgrade included new bluez and updated firmware. |
I do have the same problem as @Buckeyes1995 on my Rpi 4, after a firmware update I just get a nameless exception: |
Experiencing the same problem on raspberry 4, Linux version 5.4.72-v7l+ with bluez 5.54. Until a few days all worked seamlessly. |
Experiencing the same issue on my pi 3b. Running a docker container on another linux maschine which is working without any problems, while i need to reboot the pi every day.
|
I installed a Bluetooth dongle, and since then it never happened anymore |
I am using your script on a Raspberry Pi 3B+. I have adapted it to include an option to directly pass the data to InfluxDB. All of that works great. I log the sensors ever 15 minutes (900s). However, after certain amount of time (a number of hours typically), the scripts fails to connect to the devices. I have had a similar problem I believe when I used Node-red to connect to the sensors. Everything would work fine, until a few hours later it kept failing to get data. I have the idea that it has something to do with the bluetooth stack, because resetting the adapter generally fixed the problem. Any ideas what could be the cause and how to fix it? Anyone else dealing with a similar issue?
The text was updated successfully, but these errors were encountered: