What's new

EZ Printer sharing problems solution

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

KF2013

New Around Here
Hi,
I'm using Merlin's excelent firmware (34_2_SDK5) on my new RT-N66U. I'm very happy with this device. It meets all my expectations. The only problem so far was disapearring EZ Printer service. After 2 or 3 days my USB GDI Samsung ML1665 printer won't print anymore. The symptoms are well known on this forum - Asus printer utility doesn't find any EZ Printer capable router despite the fact that printer is visible on router's UI network map. I've done some research and have come to conclusion, that it is USB2network port emulator problem. I've noticed, that when the problem happens there is no u2ec service on processes list anymore. So I've restared it manualy by:
service restart_u2ec (just in case, start_u2ec would be enough I think)
and BINGO ! My WinXP plays TaDa sound detecting my printer :). Knowing that I've prepared some scripts to do automatic service restore:
in /jffs/services-start script:
Code:
#!/bin/sh
/jffs/scripts/EZprinterRestartLOOP.sh &
service stop_lpd
(stopping lpd for RAM space - I'm not using it)

in /jffs/scripts/EZprinterRestartLOOP.sh:
Code:
#!/bin/sh   
sleep 60       
while [ true ]; do
  sleep 60
  pidof u2ec >& /dev/null
  if [ $? -ne 0 ]; then
    logger Restarting u2ec
    service restart_u2ec 2>&1 | logger -p daemon.notice -t ${0##*/}[$$]
  fi
done
I've done this using infinite loop rather than cron job, because I couldn't find any way to prevent cron from flooding syslog every minute.
After 3 days from restart I've got 2 incidents triggering service restart and now I can tell you that in my case u2ec is always sitting calm in processes list and gets deleted by something just after I switch my printer on. So using my script I must wait up to one minute after powering on my printer to give the script a chance to jump in and (re)start the u2ec service and I can certainly live with that :)
Sorry for my poor english. I hope this helps other users with their printers problems.
Kuba
 
Last edited:
printer is gone in web page on Network map

Please tell me if you have any hint how to proceed if the printer is not visible in the web page (after entering on router's page 192.168.1.1) ?

I tried to restart LPD service (service stop_lpd / service start_lpd) but no luck.
Also I tried to start/stop u2ec service, with no result.

Appreciate any hint on this.

My problem is that after couple of time(could be days) my printer is not anymore visible. Only after a router restart, printer is back on web page.

Thanks.
 
@KF2013
First of all - thank you for a nice solution of well-known problem.
But I would like to ask for more help. The router is AC68U with 376.47 Merlin's firmware. Printer is EPSON Stylus Photo TX650 and the problem is as you have described.
I have created above mentioned scripts, actuall they are attached - so you can check the correct encoding (UTF-8).
services-start was placed in /jffs while EZprinterRestartLOOP.sh was placed in /jffs/scripts
Both files have rwxr-xr-x permissions.
Anyway it looks like scripts don't work - the connection with printer gets lost and recovers only after router reboot. Also there is no "Restarting u2ec" in syslog.
So what can be a problem and what am I doing wrong?
 

Attachments

  • Scripts.zip
    553 bytes · Views: 428
Last edited:
Please disregard my previous message - I found the problem: looks like Notepad++ is not the best editor, but in-built vi is the best :)

Attached is archive with correct script files. Hope someone will find it useful.
 

Attachments

  • Scripts-correct.zip
    545 bytes · Views: 644
Try to manually restart u2ec service from telnet or ssh (service restart_u2ec).
Never mind - I've just saw your second post :)
 
Last edited:
@KF2013
Anyway - it looks like I was too fast to leave you alone )
The script works, but it floods syslog with something like that:
Oct 11 14:00:19 syslog: usb_control_msg() in return: -22
Oct 11 14:00:19 syslog: usb_control_msg() in return: -9
There are hundreds of such lines so I cannot see anything in syslog but this.
Could you please check?

P.S. This situation starts every time I enable printer. It looks like:
Oct 11 14:21:14 kernel: usb 2-2: new high speed USB device using ehci_hcd and address 3
Oct 11 14:21:14 kernel: usblp0: USB Bidirectional printer dev 3 if 1 alt 0 proto 2 vid 0x04B8 pid 0x0850
Oct 11 14:21:14 kernel: scsi1 : usb-storage 2-2:1.2
Oct 11 14:21:15 kernel: scsi 1:0:0:0: Direct-Access EPSON Stylus Storage 1.00 PQ: 0 ANSI: 2
Oct 11 14:21:15 kernel: sd 1:0:0:0: Attached scsi generic sg1 type 0
Oct 11 14:21:15 kernel: sd 1:0:0:0: [sdb] Attached SCSI removable disk
Oct 11 14:21:23 syslog: usb_control_msg() in return: -22
......... (start of flooding)

I've tried to comment "service stop_lpd" and "logger -p daemon.notice -t ${0##*/}[$$]" but it doesn't change anything.

Similar situation was described here.
 
Last edited:
I think that it's not the script that floods syslog. It sleeps one minute before making next loop and I see from your syslog that these lines occur more often. I can't help you because my syslog is free of them. I'm running Merlin 374.40 and my printer is Samsung ML1665. Maybe this makes a difference...
 
@KF2013
No, it starts to flood right after service restart_u2ec - doesn't matter is it from your script or from ssh.
Anyway, it seems working...
 
It sleeps one minute before making next loop
I found some problem with your script. It is present when printing a huge amount of documents and it takes more than one minute. So minute passes - and printer service restarts leading to hanging on the whole printing process. So I have to power off and on the printer and restart printing job at computer.

Is it possible to add some check and do not restart printer service if printing is active?

P.S. I think the scenario is as described, but I may be wrong. Correct me in this case.
 
Last edited:
It doesn't restart every minute. It CHECKS for u2e process every minute and restarts it only when not present. If it's not present after one minute printing than something is really wrong with your printer configuration. My printer requires service restarting after two or more days and not after one minute.
 
Last edited:
I have a similar problem only that i have to restart u2ec service every time i print something... It crashes every time i print something :| My printer is Samsung scx-3400

Any ideas how to fix this?
 
Following up the topic - I have added a notebook of my wife in a small home network. And OS on this notebook is Ubuntu.

1. I can confirm LPD is very buggy. Let's see: I have an active lpd service at router:
788 admin 1188 S lpd
And yes, nmap show opened port 515. But anyway I cannot install a printer on Windows machine even using official advises.

Sure Ubuntu cannot see this printer also.

2. I don't know what is technology of "ASUS EZ Printing". It works excellent with script of KF2013 - so it would be nice to use with Ubuntu.
Is it a fork of Appsocket/HP JetDirect? Actually I can see the following open ports (after disabling shirtty lpd):
Discovered open port 139/tcp on 192.168.0.1
Discovered open port 443/tcp on 192.168.0.1
Discovered open port 53/tcp on 192.168.0.1
Discovered open port 80/tcp on 192.168.0.1
Discovered open port 445/tcp on 192.168.0.1
Discovered open port 8082/tcp on 192.168.0.1
Discovered open port 33/tcp on 192.168.0.1
Discovered open port 9998/tcp on 192.168.0.1
Discovered open port 8200/tcp on 192.168.0.1
Discovered open port 8081/tcp on 192.168.0.1

image.png


Sure there is a question about 8200 and how to work with it.
 
Last edited:
So I've restared it manualy by:
service restart_u2ec
I have the same problem and using the above command fixed instantly the problem.

I am using a USB hub that has an HDD and a HP multifunction printer, when I turn on the printer it appears on the webUI page of the router but it's still displayed as offline on my laptop.
 
Hi people,

I am desperately looking for help - I experience exactly the same symptoms. I am using multiple (COVID times family home office) Windows PCs, an ASUS GT-AC2900 router with Merlin 386.2_4, and an HP Color Laser 150a printer, connected via USB to the router, and using the LPR service.

When the router has been rebooted recently, printing works fine. If I try it next time (hours, days, we do not print often; cannot say what the minium time is), printing fails. FYI, in the Merlin Dashboard, no connected USB devices are shown in this situation. Rebooting my Windows machine, power cycling the printer does not help.

What does help, is rebooting the router, or disabling and re-enabling the Network Printer Service using the router's Merlin web UI (page "USB Application" in the navigation sidebar); FYI, now, the printer is also shown as USB device on the dashboard.

This is a bit tedious, and I would also like to not need my son and wife administrating the router in order to print :)

I was happy to see the suggested solution above with the scripts. I enabled SSH on the router, created the mentioned scripts above (corrected version) using vi, put them into /jffs/scripts, set the file permissions to 755, enabled custom JFFS scripts using the Merlin web UI (Adminstration/System page), and rebooted the router.

Conclusion: Same problem as before. Printing worked fine yesterday, this morning, it fails again.
Only after I disabled and re-enabled Network Printer Service I am finally able to print again.

Interestingly, I would have expected to see the restart_u2ec every few minutes in the system log; this happend twice yesterday evening, but then stopped (perhaps because I powered down the printer?).
I powered up the printer this morning about 5 minutes before I tried to print, without success. There were no log entries regarding restart_u2ec, these only appeared (at the end of the log) when I disabled and re-enabled Network Printer Service again using the webUI.

Code:
Jun  6 19:30:43 rc_service: httpd 1798:notify_rc restart_lpd;restart_u2ec;
Jun  6 19:30:51 rc_service: httpd 1798:notify_rc restart_lpd;restart_u2ec;
Jun  6 19:46:26 cfg_server:  event: wl_chanspec_changed_action
Jun  6 19:46:26 cfg_server: skip event due no re
Jun  6 20:06:13 wlceventd: wlceventd_proc_event(527): eth5: Auth D8:68:C3:C4:3F:67, status: Successful (0), rssi:0
Jun  6 20:06:13 wlceventd: wlceventd_proc_event(556): eth5: Assoc D8:68:C3:C4:3F:67, status: Successful (0), rssi:0
Jun  6 20:13:10 kernel: usb 3-2: device descriptor read/64, error -110
Jun  6 20:13:14 kernel: usb 3-2: device descriptor read/64, error -71
Jun  6 20:51:11 wlceventd: wlceventd_proc_event(527): eth5: Auth 48:5D:60:95:50:B4, status: Successful (0), rssi:0
Jun  6 20:51:11 wlceventd: wlceventd_proc_event(556): eth5: Assoc 48:5D:60:95:50:B4, status: Successful (0), rssi:0
Jun  6 21:06:15 kernel: eth4 (Ext switch port: 3) (Logical Port: 11) Link DOWN.
Jun  6 21:36:16 kernel: eth4 (Ext switch port: 3) (Logical Port: 11) Link UP 1000 mbps full duplex
Jun  6 21:36:18 kernel: eth4 (Ext switch port: 3) (Logical Port: 11) Link DOWN.
Jun  6 21:54:16 wlceventd: wlceventd_proc_event(508): eth5: Disassoc 48:5D:60:95:50:B4, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jun  6 23:59:26 wlceventd: wlceventd_proc_event(508): eth5: Disassoc 4E:AE:E0:E0:32:D9, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jun  7 00:06:31 wlceventd: wlceventd_proc_event(527): eth5: Auth 4E:AE:E0:E0:32:D9, status: Successful (0), rssi:0
Jun  7 00:06:31 wlceventd: wlceventd_proc_event(556): eth5: Assoc 4E:AE:E0:E0:32:D9, status: Successful (0), rssi:0
Jun  7 00:06:31 kernel: 4E:AE:E0:E0:32:D9 not mesh client, can't update it's ip
Jun  7 00:06:32 kernel: 4E:AE:E0:E0:32:D9 not mesh client, can't update it's ip
Jun  7 00:18:55 wlceventd: wlceventd_proc_event(508): eth5: Disassoc 4E:AE:E0:E0:32:D9, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jun  7 00:32:39 wlceventd: wlceventd_proc_event(491): eth5: Deauth_ind D8:F3:BC:33:5B:A7, status: 0, reason: Deauthenticated because sending station is leaving (or has left) IBSS or ESS (3), rssi:0
Jun  7 00:32:39 wlceventd: wlceventd_proc_event(508): eth5: Disassoc D8:F3:BC:33:5B:A7, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jun  7 04:32:20 watchdog: New firmware version 386.2_6 is available.
Jun  7 07:16:49 wlceventd: wlceventd_proc_event(527): eth5: Auth 4E:AE:E0:E0:32:D9, status: Successful (0), rssi:0
Jun  7 07:16:49 wlceventd: wlceventd_proc_event(556): eth5: Assoc 4E:AE:E0:E0:32:D9, status: Successful (0), rssi:0
Jun  7 07:16:50 kernel: 4E:AE:E0:E0:32:D9 not mesh client, can't update it's ip
Jun  7 07:16:51 kernel: 4E:AE:E0:E0:32:D9 not mesh client, can't update it's ip
Jun  7 07:52:07 wlceventd: wlceventd_proc_event(527): eth6: Auth 04:ED:33:69:AD:E3, status: Successful (0), rssi:0
Jun  7 07:52:07 wlceventd: wlceventd_proc_event(556): eth6: Assoc 04:ED:33:69:AD:E3, status: Successful (0), rssi:0
Jun  7 07:52:12 dnsmasq-dhcp[4953]: Ignoring domain it.oegb.net for DHCP host name W029MZKVA02
Jun  7 07:52:26 wlceventd: wlceventd_proc_event(527): eth6: Auth 66:84:5B:31:00:1D, status: Successful (0), rssi:0
Jun  7 07:52:26 wlceventd: wlceventd_proc_event(556): eth6: Assoc 66:84:5B:31:00:1D, status: Successful (0), rssi:0
Jun  7 08:05:31 wlceventd: wlceventd_proc_event(491): eth5: Deauth_ind D8:68:C3:C4:3F:67, status: 0, reason: Disassociated due to inactivity (4), rssi:0
Jun  7 08:05:31 wlceventd: wlceventd_proc_event(508): eth5: Disassoc D8:68:C3:C4:3F:67, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jun  7 08:31:39 wlceventd: wlceventd_proc_event(491): eth5: Deauth_ind 4E:AE:E0:E0:32:D9, status: 0, reason: Disassociated due to inactivity (4), rssi:0
Jun  7 08:31:39 wlceventd: wlceventd_proc_event(508): eth5: Disassoc 4E:AE:E0:E0:32:D9, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jun  7 08:51:12 wlceventd: wlceventd_proc_event(527): eth5: Auth 4E:AE:E0:E0:32:D9, status: Successful (0), rssi:0
Jun  7 08:51:12 wlceventd: wlceventd_proc_event(556): eth5: Assoc 4E:AE:E0:E0:32:D9, status: Successful (0), rssi:0
Jun  7 08:51:13 kernel: 4E:AE:E0:E0:32:D9 not mesh client, can't update it's ip
Jun  7 08:51:14 kernel: 4E:AE:E0:E0:32:D9 not mesh client, can't update it's ip
Jun  7 08:58:41 miniupnpd[2854]: upnp_event_process_notify: connect(10.0.0.32:2869): Connection timed out
Jun  7 08:58:41 miniupnpd[2854]: upnp_event_process_notify: connect(10.0.0.32:2869): Connection timed out
Jun  7 08:58:41 miniupnpd[2854]: upnpevents_processfds: 0x3b90c8, remove subscriber uuid:df726a72-77d7-459f-9454-1747fa83c129 after an ERROR cb: http://10.0.0.32:2869/upnp/eventing/ysokkwrkxm
Jun  7 08:58:59 miniupnpd[2854]: upnp_event_process_notify: connect(10.0.0.32:2869): Connection timed out
Jun  7 08:58:59 miniupnpd[2854]: upnp_event_process_notify: connect(10.0.0.32:2869): Connection timed out
Jun  7 08:59:03 miniupnpd[2854]: upnp_event_process_notify: connect(10.0.0.32:2869): Connection timed out
Jun  7 08:59:03 miniupnpd[2854]: upnp_event_process_notify: connect(10.0.0.32:2869): Connection timed out
Jun  7 08:59:03 miniupnpd[2854]: upnpevents_processfds: 0x3b9730, remove subscriber uuid:b9636c51-172b-4dce-9c32-5fd02213ed5a after an ERROR cb: http://10.0.0.32:2869/upnp/eventing/ikdhmzggtp
Jun  7 08:59:54 kernel: eth4 (Ext switch port: 3) (Logical Port: 11) Link UP 10 mbps full duplex
Jun  7 08:59:55 kernel: eth4 (Ext switch port: 3) (Logical Port: 11) Link DOWN.
Jun  7 08:59:57 kernel: eth4 (Ext switch port: 3) (Logical Port: 11) Link UP 1000 mbps full duplex
Jun  7 09:00:09 kernel: eth4 (Ext switch port: 3) (Logical Port: 11) Link DOWN.
Jun  7 09:00:12 kernel: eth4 (Ext switch port: 3) (Logical Port: 11) Link UP 1000 mbps full duplex
Jun  7 09:00:14 kernel: usb 3-2: device descriptor read/64, error -110
Jun  7 09:05:25 rc_service: httpd 1798:notify_rc restart_lpd;restart_u2ec;
Jun  7 09:05:26 admin: Restarting u2ec
Jun  7 09:05:26 rc_service: service 14374:notify_rc restart_u2ec
Jun  7 09:05:26 EZprinterRestartLOOP.sh[2167]: Done.
Jun  7 09:05:33 rc_service: httpd 1798:notify_rc restart_lpd;restart_u2ec;
Jun  7 09:09:01 kernel: usb 3-2: device descriptor read/64, error -110
Jun  7 09:09:05 kernel: usb 3-2: device descriptor read/64, error -71

Any help highly appreciated!
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top