balena-cups – Printer only discoverable for a short time

I’ve followed this guide to set up a balena-cups project on my RaspberryPi 3. I had no issues setting the printer up and accessing it over the network. I was able to print via it from both my MacBook and iOS devices.

However, after a short time (an hour or so), the printer is no longer discoverable on the network, or I get a message when trying to print that the printer is offline. This is the same when I’m trying to print from my MacBook or iOS devices. It seems there’s nothing I can do to get the printer connected again. I’ve tried rebooting the device from the balena dashboard. I’ve tried restarting the MacBook and iOS devices. I’ve tried turning the printer off and on again. It just won’t connect. I’ve also tried to re-add the printer from MacOS prefs, but it does not find it. I’ve verified that all devices are on the same wireless network (I’ve also tried with the RaspberryPi connected with the ethernet cable to the router).

The only way I can get it working is to start the above tutorial again and reflash the RPi memory card. Then, as before, it works for a short while, then it’s not possible to print. I’ve done this 3 times now, and don’t want to keep having to flash the memory card.

I assume that the problem is related to the way the router is connected to the Raspberry Pi, but I’m not sure. But if it is, why does it work for a short while? Are there some settings, or port redirection I need to set on the router?

By the way, I’m able to access the Cups dashboard from the public URL from the balena dashboard. I’m also able to print a test sheet from the Cups dashboard as well.

I’d love to know what steps I should take to troubleshoot this. Thanks in advance for any ideas.

Hi @tbf,

It looks like the CUPS server was installed and is working correctly if you’re able to print that test sheet, but I am curious why it’s going undiscoverable after first print. Would you mind sharing some additional info with me to help me gain some additional context?

  • What model of printer do you have?
  • What PPD are you using?
  • What are its sleep settings configured to (I know this seems silly, as the printer is obviously awake when you attempt to print, but I’ve run into situations where deeper sleep states sometimes make connected devices think they’ve gone offline and then never re-connect upon wake, so I have to at least ask)

Thanks for sharing any other helpful info you can think of and I’ll dig in with you as best I can to determine the issue.

Thanks,
Kenna

Hi Kenna, thanks for looking into this.

The printer model is Canon PIXMA iP2700. For the PPD, I selected CUPS+Gutenprint v5.3.3 (color) which was in the list next to my model. Regarding your question about the printer sleep settings, where would I find that? I’ve looked through the CUPS dashboard and cannot see anything related to sleep settings. It’s also not on the printer itself, since it’s a very simple model, only two buttons – power and paper feed.

Thnanks,
Thomas