AirPrint only works briefly after rebooting router

Could you please explain your theory why/how this is going to help? Not saying it can not help, but I really see no direct connection between how airtime fairness works and avahi/mdns failures.

Airtime Fairness is the most common source of problems with wireless printers so far.

1 Like

Mmmh, thanks, so certainly worth testing.

1 Like

I just moved the printer into the basement. It's now connected via ethernet and I confirmed that it is not connected via wifi.

Same issue. I cannot see the printer until I reboot the router.

Edit: I'm being throttled because this is a new account so I'm adding some additional info to this comment.

I ran tcpdump again after rebooting the router, there's clearly a difference and it's not limited to just the printer.

When I run tcpdump normally, the only Bonjour responses I see are for services broadcast by the OpenWRT router (i.e. ssh). Now, however, I see a large number of services including the printer, homekit responses from our iOS devices, google cast groups from multiple Google home devices, and responses from our chromecast devices.

ALL these services have been getting filtered out! It's not just the printers.

2 Likes

That's not normal. OpenWrt shouldn't do that by default, and it shouldn't even really be possible on a switched network (except for wifi with client isolation enabled or multicast blocked, or certain types of higher end managed switches).

I'd recommend completely resetting your router to defaults (take a backup first). Set only the absolute minimum stuff (SSID, password).

Also, if you have any windows machines (and possibly Synology) in the mix, check the firewall settings as it may have been set to strict mode, assuming a public/untrusted network when it detected a different router than it had known to be safe/trusted previously.

2 Likes

Good work-around, the throttling does not take long, mayby @tmomas could accelerate your account maturation, please?

There is generally little that we as moderators can do, but there is also little that a new user needs to do to take the step from "new user" to "basic user". Usually it helps to simply visit the forum, look around through different topics, see where you can help, .... stuff like that.

2 Likes

I don't want to leave everybody hanging. I have not yet fixed the issue. I am planning to factory reset the router and start from zero as soon as I can find some time over the next couple days. I'll report back with my findings once I'm done.

1 Like

I wiped the router and started from zero. So far I'm at 2.5 hours and Bonjour is still working. What's interesting is that I do not have any mdns/avahi/bonjour related packages installed. It's very bare bones right now.

I'm going to give it 24 hours, and then slowly start adding stuff I was using previously back in (such as QoS). If I find something that starts interfering with Bonjour I'll update this thread with my findings.

3 Likes

The only change I recall making to my router since my last update 5 days ago was turning on QOS/SQM. Today I went to check and the printer wasn't available for the first time. I uninstalled QOS/SQM and rebooted the router and I can see the printer now.

I'm going to wait a bit and see what happens next. If it goes away, I'll reset the router again and keep a log of every change I make and when I make it. If it stays available, I'll reinstall QOS/SQM and see if I can reproduce.

@bmurphy1976 - thanks for the update. I'm really curious how this could possibly interfere, but great work finding potential culprit! Let us know what else you find.

Alright, sorry it's been so long to update on my progress. This is a tough problem and it's highly disruptive to my family to do any work on it.

I'm at my wits end again, ready to jump ship back to the manufacturers firmware. This issue is still happening. I reboot the router and everything works great. After a period of time Bonjour packets get sent to /dev/null for no obvious reason I can discern. Here's the log of all the changes I made this last attempt:

  • 2020-06-19 11:30pm
    • Factory Reset
    • Flash v19.07.3
      • Packages
        block-mount, diffutils, e2fsprogs, fdisk, kmod-fs-ext4, kmod-usb-net, kmod-usb-net-cdc-ether, kmod-usb-net-rndis, kmod-usb-ohci, kmod-usb-storage, kmod-usb-uhci, kmod-usb2, luci, usb-modeswitch, usbutils
      • Note: these additional packages were added because I would eventually like to connect a raspberry pi zero to the USB port in OTG mode running pi hole as well as add some extra storage to the device. I have made no progress on either of these plans because I can't get my Bonjour problem resolved.
    • Enable radio0
    • Set root password
    • Configuration Change
      • Change br-lan IPv4 address from 192.168.1.1 to 10.10.1.1
      • Change DNS Servers to 1.1.1.1 and 1.0.0.1
      • Add static leases:
        • B8:27:EB:xx => 10.10.1.5 => home
        • 90:70:65:xx => 10.10.1.6 => lutron
        • DC:A6:32:xx => 10.10.1.7 => crittercam
        • 38:22:E2:xx => 10.10.1.17 => hp
  • 2020-06-19 11:45pm
    • Configuration Change
      • radio0
        • ESSID => censored
        • Encryption => WPA2-PSK
        • Shared Key => censored
      • radio1
        • ESSID => censored
        • Encryption => WPA2-PSK
        • Shared Key => censored
        • Enabled
  • 2020-06-20 12:30am
    • Configuration Change
      • Forward 80 => 10.10.1.5
      • Forward 443 => 10.10.1.5
  • 2020-06-21 01:45pm
    • Configuration Change
      • Forward 8081 => 10.10.1.5

That's it! I've run the last two weeks with this setup and the issue keeps happening. There's nothing useful in any logs I can find.

I really have no idea what else I can do to diagnose this at the moment.

1 Like

I just want to back up bmurphy1976's experience. I also experience the same exact symptoms, and have followed the same total reset and reload of openwrt process. I can't find anything relevant in my logs, nor in the network traffic that would be helpful (can't report what isn't there to begin with). After some time (usually less than 3 hours) bonjour devices just stop appearing to other devices.

My Brother HL-5450DN, via ethernet, Jet Direct Port (socket://192.168.1.3:9100) is rock stable. No avahi discovery.

Apple bought CUPS, I think around 2008, Jet Direct should be an option for your Apple, wired or wireless.

@shep that works great on my laptop, but it doesn't work so great on my wife's iPhone. Certain apps such as the email app will only print via an AirPrint printer that is discoverable at the time of printing using Bonjour. I've found no other way to print from her email app. That's a big inconvenience for her, which in turn means it's a big inconvenience for me even though I use an Android device.

I also believe there are other subtle issues this is causing unrelated to the printer. For example, multiple Google Home's that are within listening distance have been responding to a single request lately. This used to not be a problem. I suspect the Google Home's are using Bonjour to find each other. If they can't find each other, they can't coordinate on who is handling a particular request. I can prove they are using Bonjour to do something as I can see them responding to Bonjour requests using tcpdump (at least when OpenWRT isn't sending them to /dev/null).

I'm also pretty sure Bonjour is used by Android to find Google casting devices and I've had some problems establishing and maintaining a connection when casting to some of my devices.

So, yeah, I can work around an issue or two, but there's a systemic problem here that is breaking my home network. If I can't identify the root cause, I'm going to have to say goodbye to OpenWRT until I can. That sucks because I really like OpenWRT and the flexibility and power it gives me to control my home network.

I don't have any expertise w/ iphones but perhaps an alternative printer app printing ad-hoc, ?guest?, for your wife?
https://www.printernet.co.uk/blog/5-of-the-best-mobile-printing-apps-for-ios-767/
https://toolbox.iskysoft.com/iphone-recovery/iphone-printer-app.html

1 Like

Mmmh, looking at https://en.wikipedia.org/wiki/Multicast_DNS indicates that mDNS/Bonjour uses multicast packets. And that in turn makes https://forum.openwrt.org/t/multicast-to-unicast/44318/7 https://openwrt.org/docs/guide-user/network/wan/udp_multicast to be potentially relevant, as I strongly assume the iPhone to connect exclusively via wifi. So maybe configuring full multicast to unicast or completely disabling it might work.
Also, as much as I am puzzled about the potential mechanism, have you tried to disable airtime fairness yet? It would be good to know whether that helps at all.

1 Like

@moeller0 I did try changing airtime fairness at some point, no luck. I'll try again though, can't hurt. I'm skeptical though, I'm not aware of any devices on my network that are legacy devices.

I'll review the multi-cast stuff when I have some time. I'm pretty sure I already went down that path but as this has been going on for multiple months now I don't have a good recollection of everything I tried.

My money is on that. That said, I use an Airprint printer (canon tr8550) attached via the 2.4 GHz radio, and I just used the Bonjour Browser in HE's network tools and it just showed up. This is with a pretty stock installation of openwrt master, so maybe trying master instead of 19.x might help?