Wireless print server with ad-hock connection

Please point me how to configure OpenWrt as wireless print server.
Actually I have TP-Link TL-WR902AC device with dual WiFi.
My intention is to have ad-hock connection eg. from android when there is no WiFi network.
And will be good to have possibility to connect it to WiFi in case when WiFi available. Still have ad-hock WiFi in case to move or reconfigure.
I have LAN option for initial configuration.

May be useful for usb printer
p910nd print server

What is the printer?
Have you checked whether your android device supports the printer model?

Thanks for input.
I have no problem with P910nd or CUPS working, but bit messed with router config mode. I did once before, but now when I disconnect cable, can't access Luci nor print server wirelessly.
So I want to start from new and generally I'm not clear about router mode.
Bridged AP or ?
Because there is no wan no need firewall, all must be on same network

fwiw, you could try using relayd if they have to be on the same network. I have used relayd with p910nd to connect an old usb1 laser to an existing wifi network in the past. However, relayd is difficult to reconfigure if you have to switch wifi networks frequently imho.

https://openwrt.org/docs/guide-user/network/wifi/relay_configuration

if you use router mode, I vaguely recall you can send print job to WAN IP address of the router if p910nd is set up correctly. Forwarding port 9100 from WAN to LAN may have worked for me in past when I briefly tested router method. I could be wrong.

Thinking about adhoc....

You could configure the OpenWrt in router mode with p910nd. Configure WAN (eg. 2.4 GHz) to connect to the local main Wifi. Your devices when connected to the local main Wifi should send their print jobs to the OpenWrt's WWAN IP address.

When there is no local Wifi, so you are in adhoc mode, your device should connect to the OpenWrt's router's own Wifi (eg. 5 GHz wifi bridged to LAN) and you send print jobs to the OpenWrt's LAN IP address.

Hope that makes sense.

1 Like

Still problem exist.
These small routers have only 1 Ethernet socket. So I must go throw it to make setup and enable WiFi. But problem is when I disconnect LAN wire, print server port close also close web admin from wan side even FW rule was opened it and just worked before I disconnect LAN.

I made router mode, LAN is on lan side, wifi client is on wan and connected to main router wifi. Also wifi AP configured on lan side. When connected lan cable, I can access web admin on both internal and external IP. Also printserver port is visible on both IP. But when disconnect LAN cable, I see IP address on main router lease, but all ports are closed. Nor ping, nor web admin, nor print server visible on external IP. But still can manage it when I connect to local wifi (on android) - internet is still here. I do not see any change in configuration.

Why I test router mode.
I have this working on similar GL-inet travel router GL-MT300N on its factory OpenWrt, just added Luci and P910nd print server. Try to copy similar configuration. I was not sure maybe wan wifi goes down when both LAN and Wifi was configured on same device (lan, br-lan) after LAN unpluged. Seems problem is anywhere else.
Also tested travelmate addon - did not help.
Must mention, that LAN have fixed default IP 192.168.1.1 I do not changed it after install

Any ideas how solve it?

have tried an older version of OpenWrt? eg. 19?

Solved. there. Was overlapped WWAN and LAN IP addresses :wink: Seems newbie mistake!
Just changed to 192.168.2.1 router lan and voila.
So router mode is working as expected. I remember that other repeater with oem firmware working this way. It's safe to connect via wifi and then configure it, e.g connect to wwan.

Will play with other router modes.

And especially no idea will it work "direct" wifi connect and print from phone. Current TSC label printer unable to add because app do see it on LAN nor automatic, nor manual way. Was no problem with LAN capable printer.
Will try to add Zebra label printer later.

Did not tested old openwrt versions.

Also tried raspberry pi zero w as printserver. Got working on Raspberian OS. Somewhere stuck with Openwrt on it. Configuration made via ssh on GPIO because it do not have LAN port and wifi is off by default. I like just little 0,5W power. TP-Link MR3020 take twice more, WR902AC triple as RPi

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.