* [9fans] usb or lp @ 2004-11-28 8:54 Sergey Reva 2004-11-29 2:29 ` Kenji Okamoto 0 siblings, 1 reply; 10+ messages in thread From: Sergey Reva @ 2004-11-28 8:54 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Hello 9fans, With "latest sources" (about month ago) I can't print on my Canon S200 printer with USB interface. What happened? How fix this? /sys/src/cmd/usb/misc/usbprint have error: for (c in '{seq 16}) where $c used in usb$c, it only generate number from 1 to 16, how about usb0? In my old sources I have usbprint like this: for (c in /dev/usb?[0-9]*) But I don't used this and printer works well. No when I try print something I get only this: cat: write error copying /tmp/xyz: ken has left the building And finally in usbprint all version for printing used ep2data but in my case work only ep1data. With best regards Sergey Reva -- http://rs-rlab.narod.ru mailto:rs_rlab@mail.ru ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-28 8:54 [9fans] usb or lp Sergey Reva @ 2004-11-29 2:29 ` Kenji Okamoto 2004-11-29 3:00 ` Russ Cox 2004-11-29 13:21 ` Sergey Reva 0 siblings, 2 replies; 10+ messages in thread From: Kenji Okamoto @ 2004-11-29 2:29 UTC (permalink / raw) To: 9fans [-- Attachment #1: Type: text/plain, Size: 868 bytes --] I feel somthing is wrong in your usb printer setting... Yes, usb device driver was changed, however, for printers I think there is no difference. I don't know what type of printer of Canon S200, however, do you have correct entry in /sys/lib/lp/devices and neccessary initializer for that printer? >No when I try print something I get only this: >cat: write error copying /tmp/xyz: ken has left the building I think this means you have not binded safely /n/lp to the correct usb printer device. 1) search the /dev/usb tree, and find the strings of '0x020107', which is the usb printer. And then, echo 'ep 3 bulk w 64 32' > /dev/usb3/$i/ctl where ep '3" is the endpoint number of USB printer's data endpoint, and $i stands for the usb device number found. Then, bind /dev/usb3/$i/ep3data /n/lp, and then print the data to /n/lp. Kenji [-- Attachment #2: Type: message/rfc822, Size: 3828 bytes --] From: Sergey Reva <rs_rlab@mail.ru> To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: [9fans] usb or lp Date: Sun, 28 Nov 2004 10:54:45 +0200 Message-ID: <73278964.20041128105445@mail.ru> Hello 9fans, With "latest sources" (about month ago) I can't print on my Canon S200 printer with USB interface. What happened? How fix this? /sys/src/cmd/usb/misc/usbprint have error: for (c in '{seq 16}) where $c used in usb$c, it only generate number from 1 to 16, how about usb0? In my old sources I have usbprint like this: for (c in /dev/usb?[0-9]*) But I don't used this and printer works well. No when I try print something I get only this: cat: write error copying /tmp/xyz: ken has left the building And finally in usbprint all version for printing used ep2data but in my case work only ep1data. With best regards Sergey Reva -- http://rs-rlab.narod.ru mailto:rs_rlab@mail.ru ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-29 2:29 ` Kenji Okamoto @ 2004-11-29 3:00 ` Russ Cox 2004-11-29 13:21 ` Sergey Reva 1 sibling, 0 replies; 10+ messages in thread From: Russ Cox @ 2004-11-29 3:00 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs if the seq is causing problems that using for(c in /dev/usb?[0-9]*) solves, then i would just use the good for loop instead and we can put it back. or at least change it to for(c in /dev/usb^`{seq 0 16}) instead of for(c in /dev/usb/^`{seq 16}) if not having usb0 is really the problem. it's hard to tell what you're saying the problem is. On Mon, 29 Nov 2004 11:29:26 +0900, Kenji Okamoto <okamoto@granite.cias.osakafu-u.ac.jp> wrote: > I feel somthing is wrong in your usb printer setting... > Yes, usb device driver was changed, however, for printers > I think there is no difference. > > I don't know what type of printer of Canon S200, however, > do you have correct entry in /sys/lib/lp/devices and neccessary > initializer for that printer? > > >No when I try print something I get only this: > >cat: write error copying /tmp/xyz: ken has left the building > > I think this means you have not binded safely /n/lp to the correct > usb printer device. > > 1) search the /dev/usb tree, and find the strings of '0x020107', > which is the usb printer. And then, > echo 'ep 3 bulk w 64 32' > /dev/usb3/$i/ctl > where ep '3" is the endpoint number of USB printer's data endpoint, > and $i stands for the usb device number found. > Then, bind /dev/usb3/$i/ep3data /n/lp, and then print the data > to /n/lp. > > Kenji > > > > ---------- Forwarded message ---------- > From: Sergey Reva <rs_rlab@mail.ru> > To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> > Date: Sun, 28 Nov 2004 10:54:45 +0200 > Subject: [9fans] usb or lp > Hello 9fans, > > With "latest sources" (about month ago) I can't print on my Canon S200 printer with USB > interface. What happened? How fix this? > > /sys/src/cmd/usb/misc/usbprint have error: > > for (c in '{seq 16}) > where $c used in usb$c, it only generate number from 1 to 16, how about usb0? > > In my old sources I have usbprint like this: > for (c in /dev/usb?[0-9]*) > But I don't used this and printer works well. > > No when I try print something I get only this: > cat: write error copying /tmp/xyz: ken has left the building > > And finally in usbprint all version for printing used ep2data but in my > case work only ep1data. > > With best regards Sergey Reva > -- > http://rs-rlab.narod.ru mailto:rs_rlab@mail.ru > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-29 2:29 ` Kenji Okamoto 2004-11-29 3:00 ` Russ Cox @ 2004-11-29 13:21 ` Sergey Reva 2004-11-30 0:56 ` Kenji Okamoto 1 sibling, 1 reply; 10+ messages in thread From: Sergey Reva @ 2004-11-29 13:21 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Hello 9fans, Monday, November 29, 2004, 4:29:26 AM, Kenji wrote: KO> I don't know what type of printer of Canon S200, however, KO> do you have correct entry in /sys/lib/lp/devices and neccessary KO> initializer for that printer? Here is my /sys/lib/lp/device, it's equal to my old (working) installation: canon - - /dev/usb0/1/ep1data - gs!bjc600+nohead generic nospool - - - - KO> 1) search the /dev/usb tree, and find the strings of '0x020107', KO> which is the usb printer. And then, KO> echo 'ep 3 bulk w 64 32' > /dev/usb3/$i/ctl KO> where ep '3" is the endpoint number of USB printer's data endpoint, KO> and $i stands for the usb device number found. KO> Then, bind /dev/usb3/$i/ep3data /n/lp, and then print the data KO> to /n/lp. Yes, usbprint do the same but this don't work in all version of Plan 9 which I have. In my case writing endpoint is 1, I see it when run usb/usbd -v -d. I have only 2 endpoints. When I try bind (in old or new) I get this: term% bind /dev/usb0/1/ep1data /n/lp bind ep1data /n/lp: inconsistent mount Binding ep2data take same result. Any ideas. Sergey P.S. Yes I know, my English is terrible, try understand me :) -- http://rs-rlab.narod.ru mailto:rs_rlab@mail.ru ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-29 13:21 ` Sergey Reva @ 2004-11-30 0:56 ` Kenji Okamoto 2004-11-30 15:07 ` Sape Mullender 0 siblings, 1 reply; 10+ messages in thread From: Kenji Okamoto @ 2004-11-30 0:56 UTC (permalink / raw) To: rs_rlab, 9fans > In my case writing endpoint is 1, I see it when run usb/usbd -v -d. > I have only 2 endpoints. When I try bind (in old or new) I get this: > > term% bind /dev/usb0/1/ep1data /n/lp > bind ep1data /n/lp: inconsistent mount After echo -n 'ep 1 bulk w 64 32' >/dev/usb0/1/ctl ? > Binding ep2data take same result. > > Any ideas. No, sorry. In my HP psc2550, working version is as follows: term% cd /dev/usb3 term% ls -l d-r-xr-xr-x M 37 diorite diorite 0 Nov 1 13:50 0 d-r-xr-xr-x M 37 diorite diorite 0 Nov 1 13:50 1 --rw-rw-rw- M 37 diorite diorite 0 Nov 1 13:50 new --rw-rw-rw- M 37 diorite diorite 0 Nov 1 13:50 port term% ls -l 1 --rw-rw-rw- M 37 diorite diorite 0 Nov 1 13:50 1/ctl --r--r--r-- M 37 diorite diorite 0 Nov 1 13:50 1/ep1data --r--r--r-- M 37 diorite diorite 0 Nov 1 13:50 1/ep2data ---w--w--w- M 37 diorite diorite 0 Nov 1 13:50 1/ep3data --r--r--r-- M 37 diorite diorite 0 Nov 1 13:50 1/ep4data --r--r--r-- M 37 diorite diorite 0 Nov 1 13:50 1/ep5data --r--r--r-- M 37 diorite diorite 0 Nov 1 13:50 1/ep7data --r--r--r-- M 37 diorite diorite 0 Nov 1 13:50 1/ep8data --rw-rw-rw- M 37 diorite diorite 0 Nov 1 13:50 1/setup --r--r--r-- M 37 diorite diorite 0 Nov 1 13:50 1/status term% cd 1 term% cat status Enabled 0x00ccff 0 0x00ccff 170 bytes 26 blocks 1 0x00ccff 0 bytes 0 blocks 2 0x00ccff 0 bytes 0 blocks 3 0x020107 0 bytes 0 blocks 4 0x020107 0 bytes 0 blocks 5 0x500608 0 bytes 0 blocks 7 0x00d4ff 0 bytes 0 blocks 8 0x00d4ff 0 bytes 0 blocks term% In this case the above 3 0x020107 is for data output endpoint. I hope this may help you... > Yes I know, my English is terrible, try understand me :) Add me, too. Thanks for your help to my understanding of WinXP world. I felt it's the world for money though.☺ Kenji ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-30 0:56 ` Kenji Okamoto @ 2004-11-30 15:07 ` Sape Mullender 2004-11-30 16:28 ` Sape Mullender 0 siblings, 1 reply; 10+ messages in thread From: Sape Mullender @ 2004-11-30 15:07 UTC (permalink / raw) To: 9fans >> bind ep1data /n/lp: inconsistent mount mntgen creates /n/xxx files on demand. If you try to bind to /n/xxx, mntgen will create a directory to bind to (in the mntgen file system). ep1data is not a directory but a file, so the bind fails. Create the (empty) file /n/lp by hand. Sape ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-30 15:07 ` Sape Mullender @ 2004-11-30 16:28 ` Sape Mullender 2004-11-30 19:08 ` Sergey Reva 0 siblings, 1 reply; 10+ messages in thread From: Sape Mullender @ 2004-11-30 16:28 UTC (permalink / raw) To: 9fans >>> bind ep1data /n/lp: inconsistent mount > > mntgen creates /n/xxx files on demand. If you try to bind to /n/xxx, > mntgen will create a directory to bind to (in the mntgen file system). > ep1data is not a directory but a file, so the bind fails. Create the > (empty) file /n/lp by hand. I fixed the problem on sources by moving /n/lp to /dev/lp and updating usb/usbprint and the man page. You don't have to create a bind point in /dev. usb/usbprint does that for you. If you use usbprint, you probably need to adjust your /sys/lib/lp/devices. Sape ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-30 16:28 ` Sape Mullender @ 2004-11-30 19:08 ` Sergey Reva 2004-11-30 20:21 ` Sape Mullender 2004-12-01 17:20 ` Sape Mullender 0 siblings, 2 replies; 10+ messages in thread From: Sergey Reva @ 2004-11-30 19:08 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Hello 9fans, I find problem! New usb driver not configure file epXdata for writing or inputing, old driver do this. Why this happen? When I run usb/usbd -v -d I can see this: .... maxpkt 64 interval 0ms [OUT] [Bulk] #usbd know about direction on this endpoint .... maxpkt 64 interval 0ms [IN] [Bulk] But when I ls -l /dev/usb0/1 I get this: --r--r--r U 0 rlab rlab 0 Sep 13 22:55 /dev/usb0/1/ep1data #but not set direction for files --r--r--r U 0 rlab rlab 0 Sep 13 22:55 /dev/usb0/1/ep2data In old installation this looks like: ---w--w--w- U 0 rlab rlab 0 Sep 13 22:55 /dev/usb0/1/ep1data --r--r--r-- U 0 rlab rlab 0 Sep 13 22:55 /dev/usb0/1/ep2data When I set direction manually all works well: echo -n 'ep 1 bulk w 64 32' >/dev/usb0/1/ctl Thanks for help! Sergey -- http://rs-rlab.narod.ru mailto:rs_rlab@mail.ru ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-30 19:08 ` Sergey Reva @ 2004-11-30 20:21 ` Sape Mullender 2004-12-01 17:20 ` Sape Mullender 1 sibling, 0 replies; 10+ messages in thread From: Sape Mullender @ 2004-11-30 20:21 UTC (permalink / raw) To: rs_rlab, 9fans > New usb driver not configure file epXdata for writing or inputing, old > driver do this. Why this happen? > > When I run usb/usbd -v -d I can see this: > > .... maxpkt 64 interval 0ms [OUT] [Bulk] #usbd know about direction on this endpoint > .... maxpkt 64 interval 0ms [IN] [Bulk] I saw that too yesterday. I'll look into it tonight. Hopefully you'll have an update tomorrow. Sape ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] usb or lp 2004-11-30 19:08 ` Sergey Reva 2004-11-30 20:21 ` Sape Mullender @ 2004-12-01 17:20 ` Sape Mullender 1 sibling, 0 replies; 10+ messages in thread From: Sape Mullender @ 2004-12-01 17:20 UTC (permalink / raw) To: rs_rlab, 9fans > New usb driver not configure file epXdata for writing or inputing, old > driver do this. Why this happen? > > When I run usb/usbd -v -d I can see this: > > .... maxpkt 64 interval 0ms [OUT] [Bulk] #usbd know about direction on this endpoint > .... maxpkt 64 interval 0ms [IN] [Bulk] > > But when I ls -l /dev/usb0/1 I get this: > > --r--r--r U 0 rlab rlab 0 Sep 13 22:55 /dev/usb0/1/ep1data #but not set direction for files > --r--r--r U 0 rlab rlab 0 Sep 13 22:55 /dev/usb0/1/ep2data > > In old installation this looks like: > ---w--w--w- U 0 rlab rlab 0 Sep 13 22:55 /dev/usb0/1/ep1data > --r--r--r-- U 0 rlab rlab 0 Sep 13 22:55 /dev/usb0/1/ep2data > > When I set direction manually all works well: > echo -n 'ep 1 bulk w 64 32' >/dev/usb0/1/ctl This is not really a problem because you have to send a string like ep 1 bulk w 64 32 to the control device before you can use the endpoint anyway. I fixed a problem in usbaudio related to checking maxpkt. There's an update on sources. Sape ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-12-01 17:20 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-11-28 8:54 [9fans] usb or lp Sergey Reva 2004-11-29 2:29 ` Kenji Okamoto 2004-11-29 3:00 ` Russ Cox 2004-11-29 13:21 ` Sergey Reva 2004-11-30 0:56 ` Kenji Okamoto 2004-11-30 15:07 ` Sape Mullender 2004-11-30 16:28 ` Sape Mullender 2004-11-30 19:08 ` Sergey Reva 2004-11-30 20:21 ` Sape Mullender 2004-12-01 17:20 ` Sape Mullender
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).