Re: usb printer rejects incoming data [SOLVED]

2009-11-17 Thread Alex Troussov
On Tue, Nov 17, 2009 at 09:16:03AM +0100, Hans Petter Selasky wrote:
> > Recently I upgraded to the latest RELENG_8 and rebuilt world.
> > Now I'm having strange problems with my USB printer (Samsung CLP 315).
> > Digging into it these last days, I found that it seems to refuse
> > incoming data via USB port.
> >
> > >sudo cat tiger.qpdl > /dev/usb/4.3.0
> >
> > cat: stdout: Input/output error
> >
> > I'm sure this file tiger.qpdl contains the data needed, I created it
> > from /usr/local/share/ghostscript/8.64/examples/tiger.eps using gs +
> > foo2qpdl and tested on another PC.
> 
> .0 is the control endpoint. You won't get any data through there :-)
> 
> See:
> 
> usbconfig -u 4 -a 3 dump_curr_config_desc
> 
> for the correct OUT endpoint.

OK, here is what it gives:

>sudo usbconfig -u 4 -a 3 dump_curr_config_desc
ugen4.3:  at usbus4, cfg=0
md=HOST spd=HIGH (480Mbps) pwr=ON

 Configuration index 0

bLength = 0x0009 
bDescriptorType = 0x0002 
wTotalLength = 0x0020 
bNumInterfaces = 0x0001 
bConfigurationValue = 0x0001 
iConfiguration = 0x  
bmAttributes = 0x00c0 
bMaxPower = 0x0001 

Interface 0
  bLength = 0x0009 
  bDescriptorType = 0x0004 
  bInterfaceNumber = 0x 
  bAlternateSetting = 0x 
  bNumEndpoints = 0x0002 
  bInterfaceClass = 0x0007 
  bInterfaceSubClass = 0x0001 
  bInterfaceProtocol = 0x0002 
  iInterface = 0x  

 Endpoint 0
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0002 
bmAttributes = 0x0002 
wMaxPacketSize = 0x0200 
bInterval = 0x000a 
bRefresh = 0x 
bSynchAddress = 0x 

 Endpoint 1
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0081 
bmAttributes = 0x0002 
wMaxPacketSize = 0x0200 
bInterval = 0x000a 
bRefresh = 0x 
bSynchAddress = 0x

I don't know where to look for the right endpoint here...

But I tried every endpoint - /dev/usb/4.3.0, /dev/usb/4.3.1 and
/dev/usb/4.3.2 - and the last one worked.
So, the problem is solved for me.

Just for my curiosity, where can I read more about USB endpoints?

WBR, Alex
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


usb printer rejects incoming data

2009-11-16 Thread Alex Troussov
Hello all,

Recently I upgraded to the latest RELENG_8 and rebuilt world.
Now I'm having strange problems with my USB printer (Samsung CLP 315).
Digging into it these last days, I found that it seems to refuse
incoming data via USB port.
I'm using foo2qpdl filter and it generates a standard QPDL stream for that
printer, the problem occurs when I try to feed that data to the printer.
Here is some details about my environment:

>uname -a
FreeBSD ..net 8.0-PRERELEASE FreeBSD 8.0-PRERELEASE #26: Sun
Nov 15 15:44:11 CET 2009 r...@..net:/usr/obj/usr/src/sys/ERLEY  i386

>sudo usbconfig
ugen0.1:  at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen1.1:  at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen2.1:  at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen3.1:  at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen4.1:  at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=ON
ugen4.2: <802.11 bg WLAN Ralink> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=ON
ugen0.2:  at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen4.3:  at usbus4, cfg=0 
md=HOST spd=HIGH (480Mbps) pwr=ON
ugen1.2:  at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) 
pwr=ON

>sudo ls -l /dev/u* | grep 4.3
lrw-rw-rw-  1 daemon  daemon   9 16 ноя 14:07 /dev/ugen4.3@ -> usb/4.3.0
crw-rw-rw-  1 daemon  daemon  0, 140 16 ноя 14:07 4.3.0
crw-rw-rw-  1 daemon  daemon  0, 142 16 ноя 14:07 4.3.1
crw-rw-rw-  1 daemon  daemon  0, 143 16 ноя 14:07 4.3.2

>sudo cat tiger.qpdl > /dev/usb/4.3.0
cat: stdout: Input/output error

I'm sure this file tiger.qpdl contains the data needed, I created it
from /usr/local/share/ghostscript/8.64/examples/tiger.eps using gs + foo2qpdl
and tested on another PC.

Any ideas?

WBR, Alex

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"