DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-08-06 19:19:23

xarumanx
New member
Registered: 2007-08-06
Posts: 3

Multiple Printers

After adding an USB Hub to the DNS323 it should be possible to attach multiple different USB printers. So far, after adding both printers, the DNS seems to mount the last detected printer (so the one in the "higher" usb port) and share it as lp to the network.
what can i do to attach a second printer as lp1 or something?

usb 1-1.3: new full speed USB device using ehci_platform and address 3
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid 0x03F0
pid 0x1017
usb 1-1.4: new full speed USB device using ehci_platform and address 4
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x03F0
pid 0x1604

above you can see the output of dmesg, detecting both printers but assigning them both the usblp0 device

i'm using the latest 1.03 firmware from the german support page and the actual fun_plug from fonz if this is any help.

thanks in advanced
maik


[edit: added relevant dmesg output]

Last edited by xarumanx (2007-08-06 19:28:24)

Offline

 

#2 2007-09-02 16:14:46

xarumanx
New member
Registered: 2007-08-06
Posts: 3

Re: Multiple Printers

anyone?

Offline

 

#3 2008-03-21 00:10:09

geddy1001
New member
Registered: 2008-03-21
Posts: 2

Re: Multiple Printers

I would also like to know if there is an answer to this.  m having the same difficulty  Thaks!

Offline

 

#4 2008-03-27 02:58:39

dsullivan
New member
Registered: 2008-03-27
Posts: 1

Re: Multiple Printers

Same here.  I tried manually creating the usblp1 device via mknod, but that didn't seem to make a difference.

usb 1-1: new high speed USB device using ehci_platform and address 6
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usb 1-1.1: new high speed USB device using ehci_platform and address 7
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 7 if 0 alt 0 proto 2 vid 0x04A9 pid 0x10BC
usb 1-1.2: new full speed USB device using ehci_platform and address 8
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 8 if 1 alt 0 proto 2 vid 0x03F0 pid 0x2911
usb 1-1.3: new high speed USB device using ehci_platform and address 9

I'm using a cheap iDotConnect USB 2.0 hub (not powered) and it looks like it sees the two printers (and the USB HDD - that works fine using the instructions on this forum).  If I knew *why* this isn't possible, I'd be happy. smile

Last edited by dsullivan (2008-03-27 03:31:06)

Offline

 

#5 2008-04-14 05:16:51

kmtrue
New member
Registered: 2008-04-14
Posts: 4

Re: Multiple Printers

I was able to get 2 printers working on the dns-323, here is what I do in a startup script called from fun_plug 0.5... i have a hp lj 1020 (GDI) and hp psc 2400


  echo "Creating USBLP1"
  mknod /dev/usblp1 c 180 1

  echo "Sending firmware to printer."
  cat /mnt/HD_a2/backup/printer/sihp1020.dl > /dev/usblp0
  echo "Sent firmware."

  echo "Killing LPD"
  kill `pidof lpd`

  echo "copying new printcap"
  cp /mnt/HD_a2/backup/printer/printcap /usr/local/LPRng/etc/

  echo "restart lpd"
  lpd

  echo "Restart NMBD/SMBD"
  kill `pidof smbd`
  kill `pidof nmbd`
  smbd
  nmbd


Here is my modified printcap


hp-lj-1020|HP LaserJet 1020:\
        :sh:\
        :ml=0:\
        :mx=0:\
        :sd=/mnt/HD_a4/.lpd:\
        :lp=/dev/usblp0

hp-psc-2400|HP PSC 2400:\
        :sh:\
        :ml=0:\
        :mx=0:\
        :sd=/mnt/HD_a4/.lpd2:\
        :lp=/dev/usblp1
         

I also had to create the "/mnt/HD_a4/.lpd2" directory

Offline

 

#6 2008-09-08 19:20:09

xdigital
Member
Registered: 2008-09-03
Posts: 8

Re: Multiple Printers

I have 2 printers: Epson R260 and Brother DCP-7020
* I'm able to print to the Epson (via USB Hub) but not the Brother. Even I plugged only the Brother into the HUB.
Where can I look/check to see if the Brother is recognized by the NAS ?
Thank

Offline

 

#7 2008-09-08 20:07:33

xdigital
Member
Registered: 2008-09-03
Posts: 8

Re: Multiple Printers

While I'm waiting for help smile I'm a Linux newbie.

Here is what I see the differences between the Epson printer and the Brother DCP-7020 (all-in-one) printer
by cat /proc/bus/usb/devices

This is Epson

Code:

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b8 ProdID=0007 Rev= 1.00
S:  Manufacturer=EPSON
S:  Product=USB2.0 Printer (Hi-speed)
S:  SerialNumber=W61P4070420210XXXX
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

This is Brother

Code:

T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04f9 ProdID=0183 Rev= 1.00
S:  SerialNumber=000H7J502XXX
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  16 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=03(O) Atr=02(Bulk) MxPS=  16 Ivl=0ms
E:  Ad=84(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=85(I) Atr=03(Int.) MxPS=   8 Ivl=100ms

Brother DCP-7020 supports USB 2.00 but it seems only recognized as an USB 1.0 device!

Last edited by xdigital (2008-09-08 20:55:08)

Offline

 

#8 2008-09-09 02:49:01

xdigital
Member
Registered: 2008-09-03
Posts: 8

Re: Multiple Printers

I don't know how kmtrue did it,
but I still struggle in mapping the second printer to /dev/usblp1 !!!
- Print to /dev/usblp1 giving me "non-existent printer" error message.
- dmesg.out indicates both printers are recognized but were mapped to usblp0
- Downloaded source-code from DLINK, I found usblp module (usblp.c) has been changed

Here is usblp.c found on Google - From Line: 936

Code:

 
936         usb_set_intfdata (intf, usblp);
937 
938         usblp->present = 1;
939 
940         retval = usb_register_dev(intf, &usblp_class);
941         if (retval) {
942                 err("Not able to get a minor for this device.");
943                 goto abort_intfdata;
944         }
945         usblp->minor = intf->minor;
946         info("usblp%d: USB %sdirectional printer dev %d "
947                 "if %d alt %d proto %d vid 0x%4.4X pid 0x%4.4X",
948                 usblp->minor, usblp->bidir ? "Bi" : "Uni", dev->devnum,
949                 usblp->ifnum,
950                 usblp->protocol[usblp->current_protocol].alt_setting,
951                 usblp->current_protocol,
952                 le16_to_cpu(usblp->dev->descriptor.idVendor),
953                 le16_to_cpu(usblp->dev->descriptor.idProduct));
954 
955         return 0;

Which is different than the DLINK source code (usb_register_dev is called after the info). I don't know it makes any different !

Code:

    info("usblp%d: USB %sdirectional printer dev %d "
        "if %d alt %d proto %d vid 0x%4.4X pid 0x%4.4X",
        usblp->minor, usblp->bidir ? "Bi" : "Uni", dev->devnum,
        usblp->ifnum,
        usblp->protocol[usblp->current_protocol].alt_setting,
        usblp->current_protocol,
        le16_to_cpu(usblp->dev->descriptor.idVendor),
        le16_to_cpu(usblp->dev->descriptor.idProduct));

    usb_set_intfdata (intf, usblp);

    usblp->present = 1;

    retval = usb_register_dev(intf, &usblp_class);
    if (retval) {
        err("Not able to get a minor for this device.");
        goto abort_intfdata;
    }
    usblp->minor = intf->minor;

    return 0;

Can someone crosscompile the usblp.c file from http://www.gelato.unsw.edu.au/lxr/sourc … lp.c?a=arm for me ? TIA

Last edited by xdigital (2008-09-09 02:53:51)

Offline

 

#9 2008-09-09 06:05:59

kmtrue
New member
Registered: 2008-04-14
Posts: 4

Re: Multiple Printers

Here is what my dmesg log looks like:

Code:

usb 1-1.1: new high speed USB device using ehci_platform and address 3
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x03F0 pid 0x2B17
usb 1-1.2: new full speed USB device using ehci_platform and address 4
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 4 if 1 alt 0 proto 2 vid 0x03F0 pid 0x3611

It does not show usblp1, but after running the mknod command and updating the printcap, i am able to use usblp1.  Is the Brother printer a GDI printer?

Offline

 

#10 2008-09-12 08:20:45

xdigital
Member
Registered: 2008-09-03
Posts: 8

Re: Multiple Printers

Yes it's GDI, DCP-7020 USB version. But it works fine alone (and with hub with no Epson plugged in) without sending any firmware to it.

Offline

 

#11 2008-09-16 05:33:16

kmtrue
New member
Registered: 2008-04-14
Posts: 4

Re: Multiple Printers

i thought you said that the brother did not work by itself

xdigital wrote:

I have 2 printers: Epson R260 and Brother DCP-7020
* I'm able to print to the Epson (via USB Hub) but not the Brother. Even I plugged only the Brother into the HUB.
Where can I look/check to see if the Brother is recognized by the NAS ?
Thank

Offline

 

#12 2009-09-17 06:50:51

dlrmurray
New member
Registered: 2009-09-17
Posts: 1

Re: Multiple Printers

I can't seem to get my two printers working. I have a HP Deskjet 930C and an Epson Stylus Photo R320 via a Hub.  The only thing I don't have is the firmware to either printer.  The deskjet works fine, if only it is connected to the hub.  Any thoughts?  Let me know if you need additional information.  Thanks.

Offline

 

#13 2009-09-30 01:34:12

sparks
Member
From: Germany
Registered: 2009-06-26
Posts: 11

Re: Multiple Printers

After giving up trying to get my two printers to work on a hub attached to the unit's usb port (original post is here), I decided to give it another try after seeing kmtrue's approach in this thread.

Here is my script "printerhub.sh" in the fun_plug's start folder:

Code:

echo "Creating USBLP1"
mknod /dev/usblp1 c 180 1

echo "Killing LPD"
kill `pidof lpd`

echo "copying new printcap"
cp /mnt/HD_a2/myNASconfig/printcap /usr/local/LPRng/etc/

echo "restart lpd"
lpd

echo "Restart NMBD/SMBD"
kill `pidof smbd`
kill `pidof nmbd`
smbd
nmbd

Here is my modified printcap:

Code:

hp-ps-1250|HP Photosmart 1250:\
        :sh:\
        :ml=0:\
        :mx=0:\
        :sd=/mnt/HD_a4/.lpd:\
        :lp=/dev/usblp0

brother-hl-1430|Brother HL-1430:\
        :sh:\
        :ml=0:\
        :mx=0:\
        :sd=/mnt/HD_a4/.lpd2:\
        :lp=/dev/usblp1

After I restart with everything plugged in, it still only shows the one lp share available. I noticed some errors in the ffp.log, but don't understand them:

* /ffp/start/printerhub.sh ...
/ffp/start/printerhub.sh: line 3:
: not found
/ffp/start/printerhub.sh: line 6:
: not found
Creating USBLP1
mknod: invalid number '1
'
/ffp/start/printerhub.sh: line 9:
: not found
Killing LPD
sh: bad pid '1708
'
/ffp/start/printerhub.sh: line 12:
: not found
copying new printcap
/ffp/start/printerhub.sh: line 15:
: not found
restart lpd
/ffp/start/printerhub.sh: line 17: lpd
: not found
/ffp/start/printerhub.sh: line 18:
: not found
Restart NMBD/SMBD
sh: bad pid '1616
'
sh: bad pid '1620
'
/ffp/start/printerhub.sh: line 22: smbd
: not found

Does anyone have an idea what could be going wrong?

Offline

 

#14 2009-10-01 23:29:38

sparks
Member
From: Germany
Registered: 2009-06-26
Posts: 11

Re: Multiple Printers

Good news! A Linux guru friend of mine came over to help me figure out how to get my printers to be recognized, and after going over everything, he discovered that the problem just boiled down to me forgetting to set the text format of the scripts to Linux. It was the Windows line breaks fouling the scripts up! Once that was changed, no more errors appeared in the fun_plug log, and the two printers suddenly appeared when browsing the NAS file system instead of "lp."

The only additional difficulty was that the print commands to the Brother printer were getting sent to the HP printer. This problem was resolved by simply switching the device designations "usblp0" and "usblp1" in the printcap file and restarting.

If anyone feels like adding this to the wiki, please feel to. From scanning the past threads, it certainly seems like an issue which occasionally arises. I would do it myself, but I don't feel sufficiently knowledgeable to explain the steps properly.

Any volunteers?

Offline

 

#15 2010-12-25 23:56:09

GailH
Member
Registered: 2010-12-13
Posts: 21

Re: Multiple Printers

Can you gurus help a Linux newbie?

I have connected an HP LaserJet 1200 and Canon S-900 printers to the DNS-323 through a USB hub.
I have just copied and tried the method described by kmtrue in #5 and sparks in #13 above.

The results are a bit strange: in dmesg, this appears for the HP printer:
"drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid 0x03F0 pid 0x0317"
but no similar entry for the other printer.

In proc/bus/usb/devices, this entry appears for the (first) HP printer:
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
P:  Vendor=03f0 ProdID=0317 Rev= 1.00
S:  Manufacturer=HewLett Packard Product=HP LaserJet 1200 SerialNumber=00CNC2338793
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=07(print) Sub=01 Prot=03 Driver=usblp
But again, no similar entry exists for the other printer.

On the other hand, from Windows PCs on the LAN, one can see both printers on the dlink-aabbcc device. And in /dev, the file usblp1 does appear. Printing on the first printer (usblp0) works fine. I haven't trued printing on the second printer yet.

Thanks in advance - Gail

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB