Adding printer to router using Port 910n daemon not working well

I was trying to connect a wi-fi printer to my router using WPS, but the WPS button wasn't working, so i decided to tinker with the routers USB capabilities, so i could use that for the printer.

I followed https://openwrt.org/docs/guide-user/services/print_server/p910ndprinterserver minus the firewall part, where i set up a port fowarding from LAN to 192.168.1.1:9100.

As far as automatic network detection or manual detection via IP, no device is managing to reach the printer.

I can provide logs and screenshots, any help is appreciated.

If your lan IP is 192.168.1, the rule doesn't do anything.

Tried netstat -lp to check if something's listening on port 9100 ?

That's a good point.
As a matter of fact: no, it's not listening on port 9100.
Which is weird because i followed every step of the guide.

Is there more information i can provide to help?

Run /etc/init.d/p910nd restart and run dmesg afterwards, to see if there are any error messages.

Reading the log here... there doesn't seem to be any error message, is there something specific i should be watching out for?

Mostly to see of there were any errors printed....

Check ps, if the process' running.

The weird part is that the only mention of the p910 printer service on it mentions the USB port, i feel like i'm missing something really dumb here

idk if it helps, but here's the output of ps:

root@OpenWrt:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      2380 S    /sbin/procd
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [pool_workqueue_]
    4 root         0 IW<  [kworker/R-slub_]
    5 root         0 IW<  [kworker/R-netns]
    7 root         0 IW<  [kworker/0:0H-kb]
    9 root         0 IW<  [kworker/R-mm_pe]
   10 root         0 IW   [rcu_tasks_trace]
   11 root         0 SW   [ksoftirqd/0]
   12 root         0 IW<  [kworker/R-inet_]
   13 root         0 SW   [oom_reaper]
   14 root         0 IW<  [kworker/R-write]
   15 root         0 SW   [kcompactd0]
   16 root         0 IW<  [kworker/R-kbloc]
   17 root         0 IW<  [kworker/R-blkcg]
   18 root         0 SW   [watchdogd]
   19 root         0 SW   [kswapd0]
   28 root         0 IW<  [kworker/R-kthro]
  122 root         0 SW   [spi0]
  306 root         0 IW<  [kworker/R-mld]
  307 root         0 IW<  [kworker/R-ipv6_]
  308 root         0 IW<  [kworker/R-kstrp]
  383 root         0 IW<  [kworker/0:1H]
  404 root         0 SW   [irq/16-keys]
  405 root         0 SW   [irq/23-keys]
  546 root         0 SWN  [jffs2_gcd_mtd4]
  646 ubus      1536 S    /sbin/ubusd
  655 root      1084 S    /sbin/askfirst /usr/libexec/login.sh
  726 root      1236 S    /sbin/urngd
  838 root         0 IW<  [kworker/R-cfg80]
  873 root         0 IW<  [kworker/R-ath10]
  874 root         0 IW<  [kworker/R-ath10]
  875 root         0 IW<  [kworker/R-ath10]
 1292 logd      2348 S    /sbin/logd -S 128
 1346 root      3784 S    /sbin/rpcd -s /var/run/ubus/ubus.sock -t 30
 1606 root      1300 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p
 1712 root      2936 S    {hostapd} /sbin/ujail -t 5 -n hostapd -U network -G 
 1713 root      2936 S    {wpa_supplicant} /sbin/ujail -t 5 -n wpa_supplicant 
 1715 network   4764 S    /usr/sbin/wpa_supplicant -n -s -g /var/run/wpa_suppl
 1716 network   4984 R    /usr/sbin/hostapd -s -g /var/run/hostapd/global
 1779 root      2768 S    /sbin/netifd
 1893 root      1896 S    /usr/sbin/odhcpd
 2015 root      3072 S    /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -
 2064 root      1916 S    /usr/bin/dbus-daemon --system --nofork
 2116 nobody    2272 S    avahi-daemon: running [OpenWrt.local]
 2523 root      1396 S    udhcpc -p /var/run/udhcpc-eth0.2.pid -s /lib/netifd/
 2533 root      1244 S    odhcp6c -s /lib/netifd/dhcpv6.script -P0 -t120 eth0.
 2662 root      2936 S    {ntpd} /sbin/ujail -t 5 -n ntpd -U ntp -G ntp -C /et
 2669 ntp       1396 S    /usr/sbin/ntpd -n -N -S /usr/sbin/ntpd-hotplug -p 0.
 2963 root         0 SW   [hwrng]
 3522 root      2936 S    {dnsmasq} /sbin/ujail -t 5 -n dnsmasq -u -l -r /bin/
 3523 dnsmasq   1844 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg01411c
17441 root         0 IW   [kworker/u2:1-ev]
17514 root         0 IW   [kworker/u2:3-ev]
17907 root         0 RW   [kworker/u2:0-ev]
27723 root         0 IW   [kworker/0:1-eve]
30751 root      1320 R    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p
30760 root      1400 S    -ash
30981 root         0 IW   [kworker/0:2-eve]
31415 p910nd    1088 S    {p910nd} /usr/sbin/p9100d -d -b -f /dev/usb/lp0 -i 1
31690 root      1404 R    ps

What is the printer in question here?

Let's take a look at the configs:

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/firewall
cat /etc/config/p910nd

Right, i think i redacted all the things that could lead to a public IP, minus internal IPV4 addresses from LAN. The printer in question is a EPSON L3150

root@OpenWrt:~# ubus call system board
{
	"kernel": "6.6.93",
	"hostname": "OpenWrt",
	"system": "Qualcomm Atheros QCA9558 ver 1 rev 0",
	"model": "TP-Link Archer C7 v2",
	"board_name": "tplink,archer-c7-v2",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "24.10.2",
		"revision": "r28739-d9340319c6",
		"target": "ath79/generic",
		"description": "OpenWrt 24.10.2 r28739-d9340319c6",
		"builddate": "1750711236"
	}
}
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr 'redacted'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'redacted'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1.1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option device 'eth0.2'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth0.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '2 3 4 5 0t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '1 6t'

root@OpenWrt:~# cat /etc/config/firewall

config defaults
	option syn_flood '1'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'

config zone
	option name 'lan'
	list network 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'

config zone
	option name 'wan'
	list network 'wan'
	list network 'wan6'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'

config forwarding
	option src 'lan'
	option dest 'wan'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'redacted'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

config redirect
	option dest 'lan'
	option target 'DNAT'
	option name 'minecraft'
	option src 'wan'
	option dest_ip 'redacted'
	option dest_port 'redacted'
	option src_dport 'redacted'
	option family 'ipv4'

config redirect
	option dest 'lan'
	option target 'DNAT'
	option name 'printer'
	option src 'lan'
	option src_dport '9100'
	option dest_ip '192.168.1.1'
	option dest_port '9100'

root@OpenWrt:~# cat /etc/config/p910nd


this isn't needed and can be deleted:

This part...

One of three situations seems to apply:

  • I asked for the wrong file (or path)
  • The file doesn't exist or is empty
  • This part didn't get copy/pasted properly.

Can you check again? Or failing that:

uci show p910nd

About that command, i think i might have accidentally cut it off, both of them look quite similar, but here's their output:

root@OpenWrt:~# uci show p910nd
p910nd.@p910nd[0]=p910nd
p910nd.@p910nd[0].device='/dev/usb/lp0'
p910nd.@p910nd[0].port='0'
p910nd.@p910nd[0].bidirectional='1'
p910nd.@p910nd[0].enabled='1'
p910nd.@p910nd[0].usbvidpid='04b8/1143'
p910nd.@p910nd[0].mdns_sn='583545563635333441'
p910nd.@p910nd[0].driver_file='/opt/p910nd_drivers/EPSON_L3150_Series_04b8_1143.bin'
p910nd.@p910nd[0].mdns_cls='PRINTER'
p910nd.@p910nd[0].mdns_cid='EpsonRGB'
p910nd.@p910nd[0].mdns_mfg='EPSON'
p910nd.@p910nd[0].mdns_note='Located near router'
p910nd.@p910nd[0].mdns_cmd='BDC,D4,D4PX,END4,ESCPL2,ESCPR1'
p910nd.@p910nd[0].mdns='1'
p910nd.@p910nd[0].mdns_mdl='L3150 Series'
p910nd.@p910nd[0].mdns_ty='EPSON L3150 Series'
p910nd.@p910nd[0].mdns_product='(EPSON L3150 Series)'
p910nd.@p910nd[0].bind='192.168.1.1'
p910nd.@hotplug[0]=hotplug
p910nd.@hotplug[0].driver_home='/opt/p910nd_drivers'
root@OpenWrt:~# cat /etc/config/p910nd

config p910nd
	option device '/dev/usb/lp0'
	option port '0'
	option bidirectional '1'
	option enabled '1'
	option usbvidpid '04b8/1143'
	option mdns_sn '583545563635333441'
	option driver_file '/opt/p910nd_drivers/EPSON_L3150_Series_04b8_1143.bin'
	option mdns_cls 'PRINTER'
	option mdns_cid 'EpsonRGB'
	option mdns_mfg 'EPSON'
	option mdns_note 'Located near router'
	option mdns_cmd 'BDC,D4,D4PX,END4,ESCPL2,ESCPR1'
	option mdns '1'
	option mdns_mdl 'L3150 Series'
	option mdns_ty 'EPSON L3150 Series'
	option mdns_product '(EPSON L3150 Series)'
	option bind '192.168.1.1'

config hotplug
	option driver_home '/opt/p910nd_drivers'

Ok... I think that looks fine.

Let's make sure the device is actually there with the correct path:

ls /dev/
ls /dev/usb/

Looks fine to me (i could be wrong tho):

root@OpenWrt:~# ls /dev/
bus        mtd0ro     mtd5       port       tty        ttyS2      usb
console    mtd1       mtd5ro     ppp        ttyS0      ttyS3      watchdog
fd         mtd1ro     mtdblock0  ptmx       ttyS1      ttyS4      zero
full       mtd2       mtdblock1  pts        ttyS10     ttyS5
gpiochip0  mtd2ro     mtdblock2  random     ttyS11     ttyS6
hwrng      mtd3       mtdblock3  shm        ttyS12     ttyS7
kmsg       mtd3ro     mtdblock4  stderr     ttyS13     ttyS8
log        mtd4       mtdblock5  stdin      ttyS14     ttyS9
mtd0       mtd4ro     null       stdout     ttyS15     urandom
root@OpenWrt:~# ls /dev/usb/
lp0

Everything looks fine.

What is the operating system on the devices that are attempting to use the printer? How are you configuring the printer in the setup process?

Also, have you installed the avahi daemon on the router? You've got the p910nd config telling it to advertise via mdns, but avahi is required for that to actually work (without Avahi, the setting does nothing, but doesn't cause any harm either).

On that note: the avahi daemon is installed in root and up to date.
I've attempted to connect to the printer using system-config-printer, which didn't detect the printer.

And with a Xiaomi smartphone, which also didn't detect the printer and claimed there were no printers on the ip:192.168.1.1... So, i've tried using 192.168.1.1:9100 and it began printing some technical info, and the smartphone claims no printers were found on the ip. Which is weird.

Edit: it's almost like the smartphone tries communicating something to the printer, but it just prints it directly instead.

I don't know about the Xiaomi phone and how it handles printing, but I can tell you that iOS does not work with P910nd (iOS/iPad OS only works with AirPrint which is entirely different than P910nd).

I've never setup a printer on (modern) Windows systems. On the Mac, assuming that P910nd and avahi are both setup correctly, it just shows up as a bonjour available printer, no fuss. Without avahi, you need to set it up manually.

Well, i was trying to set it up so i could connect it to Linux, mainly by using system-config-printer
As well as avahi, which i wanted to use to make it easier to use.
By the way: to use avahi on the router, do i need to install it on my Linux computer too? that could be the issue.

Similar story on android, you'd need a high-level -driverless- printserver, not a websocket and printer specific drivers.

Update: i found a command for terminal to test the printer: cat filename | netcat -w 1 ip 9100
And it does work, albeit it doesn't tell the printer when it's finished printing so it just keeps waiting until i run it enough times to fill the page.

This seems quite unusual.