Keep losing wi-fi connection

Hi!
So I have made an adapter to a BT05 temperature logger based on https://github.com/tim-hellhake/xiaomi-temperature-humidity-sensor-adapter which uses Bluetooth.
I was able to get it to work but I am constantly losing my wi-fi connection (can only get it back by rebooting my raspberry pi) and I wonder if it has anything to do with my adapter. I think it was not happening before.
Are there any known problems that I should be aware of?

Ps: I am using a raspberry 3 b+. Right now I am only reading info from advertisements that are broadcast every 2 seconds or so. I’ll happily provide adapter code if needed.

Wi-Fi and Bluetooth are on the same chip on the Raspberry Pi and can cause a lot of issues if used in tandem. My recommendation would be to either use ethernet and disable wi-fi, or get a separate Bluetooth dongle and disable the one on the board.

Instructions for disabling things are available here.

1 Like

I believe the RPi4 eliminates this problem by separating the USB from the Bluetooth/WiFi and Ethernet. Please, someone correct me if I am wrong. I have a RPi4 that I was planning to use as a wall controller with 7" touch screen. I may swap it with my RPi3 which is currently running my Gateway. Much more throughput, from what I have read.

1 Like

Oooh that’s unfortunate!
Guess I’ll have to use a dongle or update to the rpi 4 then… Thanks @mrstegeman and @lacojim

So, I have now tested in a RPI 4 and it’s happening the same…
I have my sensor working and I am connected to my home wi-fi.
At first everything works fine, I can ping different addresses from the rpi4 and I can see my gateway homepage on my laptop. After some time I stop being able to ping any address BUT I am still connected to my home wi-fi and I can still see the temperature values updating on my gateway homepage… Also, for example, adding new addons always fail now…
If I reboot everything will be normal again for a couple of minutes…
Any idea of what is happening @mrstegeman ?
Thanks again for the help!

PS:Also ssh works fine all the time.

If you SSH into the Pi and run ifconfig, does your wlan0 have an IPv4 address?

Also, I believe the RPi 4 still has the Bluetooth and Wi-Fi on the same chip, so the same problem may still exist.

Your problem seems very odd. If you are still getting temp updates and the WebGUI is still active, then it would appear you are still indeed connected to your WiFi. Perhaps try temporarily turning off the bluetooth and test if the problem persists. You might also consider changing the WiFi channel on your router.