Hi there, As u suggested, i installed Usb monitor module and captured the USB transactions. i refered /urs/src/linux/Documentation/usb/usbmon.txt file.
Here is the output ... dac41b00 3258043428 S Bi:002:04 -115 512 < dad20380 3258043448 S Bi:002:06 -115 512 < db48be80 3261756782 S Bo:002:02 -115 1 = 56 db48be80 3261756926 C Bo:002:02 0 1 > db48be80 3262534489 S Bo:002:02 -115 1 = 43 db48be80 3262534547 C Bo:002:02 0 1 > db48be80 3263127258 S Bo:002:02 -115 1 = 44 db48be80 3263127322 C Bo:002:02 0 1 > db48be80 3263689162 S Bo:002:02 -115 1 = 51 db48be80 3263689227 C Bo:002:02 0 1 > db48be80 3264296399 S Bo:002:02 -115 1 = 57 db48be80 3264296503 C Bo:002:02 0 1 > dac41b00 3270152777 C Bi:002:04 -108 0 dad20380 3270159149 C Bi:002:06 -108 0 dad20380 3270161310 S Co:002:00 -115 0 dad20380 3270161524 C Co:002:00 0 0 I am sending diffrent commands on bulk-out EP such as (0x56 - version #, 0x43 - Calibrate Scanner ...) Its shown here in the captured packets also. But the Scanner is not responding on any one of Bulk-in! Where as same scanner is working properly on Windows OS. As shown in the captured packets, bulk-in call functions are called only while unloading the driver. one more observation, i have allocated memory using kmalloc not usb_alloc_buffer to get this output. if i allocate bulk-out buffer using usb_buffer_alloc, output is different .. d9396e80 1008278891 S Bi:002:04 -115 512 < d9fb8f00 1008278911 S Bi:002:06 -115 512 < d949f200 1011812007 S Bo:002:02 -115 1 D d949f200 1011812104 C Bo:002:02 0 1 D d949f200 1012281878 S Bo:002:02 -115 1 D d949f200 1012282027 C Bo:002:02 0 1 D d949f200 1012937137 S Bo:002:02 -115 1 D d949f200 1012937292 C Bo:002:02 0 1 D d949f200 1013469124 S Bo:002:02 -115 1 D d949f200 1013469204 C Bo:002:02 0 1 D d949f200 1014000969 S Bo:002:02 -115 1 D d949f200 1014001116 C Bo:002:02 0 1 D d9396e80 1018005448 C Bi:002:04 -108 0 d9fb8f00 1018011699 C Bi:002:06 -108 0 d9fb8f00 1018013101 S Co:002:00 -115 0 d9fb8f00 1018013197 C Co:002:00 0 0 Looking at this, allocating buffer by kmalloc is correct i feel. but whatever, this first output shows the command has sent by the driver properly, but device is not responding! Thanks Savita -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Alan Stern Sent: Monday, August 22, 2005 7:55 PM To: Savita H Cc: linux-usb-devel@lists.sourceforge.net; [EMAIL PROTECTED] Subject: Re: [linux-usb-devel] USB Scanner not responding to commands sent on bulk-out endpoint On Mon, 22 Aug 2005, Savita H wrote: > Hi All, > > I need to write Linux driver for USB Scanner device on fedora core4 Os. that > is 2.6.11 kernel. > > Scanner device has three endpoints, one is Bulk-out (ep->EndpointAddress = > 0x02) and two bulk-in ednpoints ( 0x84 and 0x86). > i need to send commands on bulk-out endpoints. I have allocated memory for > this by kmalloc(), then allocated and filled URB as follows... > The return value of usb_submit_urb shows, it has submitted the URB > successfully, but the scanner shows no responce for that command, > ex: i am sending command to turn the LED ON, which is not happening. > > before submitting this URB, i have submitted both bulk-in URBs, these URB's > call back functions are not at all called when the scanner has to respond to > some commands sent to it on bulk-out EP( like firmware version no). > > Why is this happening? Scanner has responded for version no and LED ON, only > once or twice in one months effort, after that no responce. the same code > worked for few minutes well and its not working now. why? > > i have also tried to allocate memory for bulk out using usb_alloc_buffer and > seeting transfer_flags to URB_NO_TRANSFER_DMA_MAP, but no result. NO idea of > whats happening!!!!!! > > Any sort of help or inputs will be greately appreciated. > Thanks in advance. > Savita It's possible that some other program is also communicating with the scanner, and the scanner is being confused by the combination of commands. To see what's really going on, you could use the "usbfs_snoop=y" module parameter for usbcore and you could use the usbmon facility. Alan Stern ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel ************************************************************** Scanned by eScan Anti-Virus and Content Security Software. Visit http://www.mwti.net for more info on eScan and MailScan. ************************************************************** ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel