Wi-Fi problems with Lightburn Bridge on Raspberry Pi 3B+ and Lower


I’m sure this will get a little long winded so I’ll put my asks for the dev team up front:

Can you make an addition to the lightburn bridge that sends keepalive traffic to avoid being dropped from crowded wi-fi networks?

Can you disable the power saving features of the Rpi’s wi-fi chip by default in the LBB image?

I have been using Lightburn Bridge running on a raspberry pi 3B+ for close to a year with great success, but I’ve recently been having problems connecting from my PC to the LBB that make it almost unusable.

I tried connecting from multiple PCs both using the official methods of contact through Lightburn/web interface as well as more traditional Linux ping/ssh methods came back with destination host unreachable errors at the LBB IP address.

When I connected a screen to the pi it showed a clean bill of health as well as a connection to my Wi-Fi with the expected IP, and my router also had it properly listed in the device table, leaving me at a loss for why I couldn’t get a connection to the LBB from anything on my local network.

I own several raspberry pi boards, mostly 3B and 3B+ models but also a 2, and I was able to reproduce the issue reliably on all of them with the most recent version of lightburn bridge.

After lots of troubleshooting I figured out that my issue was a combination of two things:


My router (not a special or uncommon router, it’s the default one Centurylink hands out) has a feature where if it has a lot of devices connected to it, it will remove some of the connections it hasn’t heard from in awhile to save bandwidth.

From what I understand this is a common feature in most routers, and with IoT and smart device usage in homes skyrocketing there’s a good chance that if you don’t have enough wi-fi devices to cause your router to do this yet, you will at some point.

Under normal circumstances when a dropped device wants to talk on the network it will just automatically reconnect to the router. Similarly, if something on the network, say a PC running lightburn, tries to talk to a dropped device the router just sends a quick message to the dropped device and reestablishes the connection. In both cases the device never even realizes they were dropped to begin with.

So my router was dropping the LBB when I wasn’t using the laser often enough, and due to the issue I’ll get into under item 2 with power management features of the Rpi, when my PC running lightburn wanted to talk to the LBB and the router went to reestablish the dropped connection it got no response from the LBB.

The solution for this ended up being easy, I just added a cron job to the LBB that sends some traffic over the wi-fi interface every once in awhile. it doesn’t have to be anything heavy, The script I wrote just sends a single icmp ping packet to google.com every 15 minutes and it’s been enough to keep my router from dropping the connection for the last week, when the issues started I used to see it at least daily. I would think some sort of phone-home or keepalive script would be an easy thing to add to your LBB image and would save your customers a lot of heartburn trying to diagnose network issues.


The second cause of my issue was that the LBB image leaves the pi’s wi-fi power management options turned on by default. This means that if the LBB goes a certain amount of time without any packets crossing the wi-fi interface it will “go to sleep” and turn off the wi-fi.

Once that happens, inbound traffic to the LBB from things like a PC running lightburn or a router trying to reestablish a dropped connection will be lost, and the only thing that will wake it up again is the LBB itself sending some sort of traffic out over the wireless interface.

I believe the reason I started seeing this issue now and not sooner is I just recently added a few more devices to my network that pushed me over the threshold where my router started dropping idle connections to save resources that I talked about in problem 1, so the LBB was getting random things like broadcast packets coming across its wi-fi interface often enough to keep it from falling asleep but once the router dropped its connection it stopped seeing those packets.

After putting a keyboard and monitor on the LBB I verified that when I pinged out from the LBB the interface woke up and I was able to connect Lightburn again as well as ping/ssh from devices on my local network to the LBB. I then manually turned off the power saving features in the wi-fi interface with the command iw wlan0 set power_save off and verified that even after being dropped by the router for inactivity I could still connect Lightburn to the LBB on the first try, no wakeup required.

In theory just implementing the keepalive I requested in item 1 would also be enough to keep the interface from falling asleep and from what I understand the sleeping wi-fi is fixed at the hardware level from the Rpi4 onward, but I think just shipping the image with the power saving features turned off by default at the OS level is a much more complete solution and better supports customers running the LBB on pi3+ and lower devices.

If you’ve made it this far thanks for reading! If the dev team doesn’t want to take on the work hopefully this post will at least help someone at some point down the line.