I have a printer that I have trouble fitting near the computer, instead I'll put it somewhere nice and put an ethernet cable maybe. Or the router's USB ports.
Which is better? For example I use Linux on the PC, the printer company provides Linux printer drivers for it. I think by hooking up the printer with ethernet it'll just use the driver as if it was hooked up to the PC via USB?
I see some people just use the router's USB port too. Then does openwrt need the printer's drivers? Or they just use the driver for PC, and send stuff to the printer with that driver? Am I right?
OpenWrt supports only appsocket aka 9100 raw via p910d print daemon. Your PC will generate the print codes which will be directly sent to printer. Unlike cups or windows or lpd which will queue multiple print jobs.
If your printer comes with a wired ethernet port, use it - that's usually the least troublesome option long term. Wireless support (WPA3??!) might be nice to have, but the wireless hardware used in printers and their integration into the printer firmware (as in how to set it up, enter the wifi credentials) is most of the time $NOT_GOOD (imagine a waterfall of expletives here).
Things to consider when shopping for a printer:
native PostScript (or PDF) support
maybe a good PCL 5/ 6 emulation, if you can't get postscript (you should)
wired ethernet
a USB port in addition is always good to have
think about automated duplex support (very nice to have)
think about laser (no dried up ink)
check the costs of the consumables (ink/ toner, printer heads/ drums, etc.)
For me, the first two bullet points (PS && ethernet) are not up for discussion and the second two part of my personal requirements.
@bosukes - it sounds like you already have a printer. What is it (brand + model)? What connectivity does it have (USB, Ethernet, wifi)? If it has additional features (such as a scanner), do you expect to use those?
Usb and ethernet there is. Its a Kyocera Ecosys P2135DN. I've tried with ethernet, it worked so far for 1 hours. Then went to a break, then it didn't work again had to move laptop to do prints with USB. Typical damn printer problems..
How is the ethernet connected -- is it directly connected to your main network, or is there something between them (such as another router)? Is your network flat, or do you have VLANs?
Check the printer's configuration to make sure it keeps the ethernet port awake (sleep timing, etc.). And also check that it is fully up to date with the firmware.
Ethernet is connected directly to the router. On the Linux PC it says "print job was not accepted" then I went closer and did it with USB cable anyway.
It has a http web interface, quite detailed actually. Just wondering, maybe openwrt should be made for printers aswell. This printer probably runs Linux under the hood.
No, there is no support to run OpenWrt on any printers.
Ideally, your printer's ethernet port should 'just work', but if there are problems with the printer's networking stack, we wouldn't be able to solve them here (obviously check the config and the firmware; maybe contact the manufacturer for support).
There are two ways that most printers work with the network:
mdns/auto-discovery
IP based printing.
If you used the auto-discovery, you might try setting up the printer on your computer via IP and see if that helps.
In terms of running the printer via USB connected to OpenWrt... yes it's possible and may work -- P910d, already discussed here. I've done that for an older non-networked printer, and it worked well. Because your device is not a multi-function system, I would imagine it would work fine, but no guarantees.
Sure... a static IP or a DHCP reservation could help. It's not terribly likely that the IP is changing as it is, but that's not outside the realm of possibility.
The difference with IP direct vs mdns is that the mdns services may not be working well on the printer and/or your computer, whereas IP is typically quite solid.
DHCP is fine, at least with a fixed DHCP reservation. Static IPs are often a cause of grief, whenever something in your network changes (and it will, not often, but often enough to remember).
Personally my network currently has 508 (around half of those are indeed only reservations for VMs, with DHCP+DNS entries, which may 'never' come online) fixed DHCP reservations (and quite a few other DHCP/ DNS specialties), but not a single static IP (apart from the router itself and its virtual wireguard peers). Having to renumber your network is painful, but sometimes unavoidable - better to have the policies in one place where they can be updated (if necessary even in a scripted fashion). With a strong emphasis on DHCP, I only have to cut the power (technically only to my switches and APs) after networking changes and everything will adapt itself and come up fine on the other side. I would consider any client that would require a static IP (because it glitches otherwise) broken.