Hello, Unfortunately the problem is thrown new light upon... However, commenting out that line from kernel source is a solution, customer does not want to patch all the workstations' kernel. Some errors can be excluded with workaround ("silent" query from device that provide other response than the next one..), but now I am facing with a difficult trouble. Just a simple scanf() call from stdin cause that button pressed messages do not arrive. If some other data is queried from the device, the button pressed messages arrive again. I don't know the kernel code sufficiently, but I think there is some communication with the device in the background, and somehow the duplicate message filtering holds up the device to be waken up. But how can I know that scanf() read is complete? During typing it's ok, it goes wrong after pressing enter. Is there a signal or message that I could handle? Leaving the kernel code intact. I fear that this is quite hopeless this way.
Please tell me if you have an idea, Thank you: Berci -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Szilvási Bertalan Sent: Friday, June 22, 2007 5:39 PM To: linux-usb-devel@lists.sourceforge.net Cc: nofilter Subject: Re: [linux-usb-devel] HID device communication problem with kernel2.4 Hi again, After some serious investigation problem is solved. And the key of the solution is contained by this listgroup.. :-). As it turned out from this mail http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg13486.html , duplicate messages are filtered out in kernel 2.4. I do not understand why it works so, and the surrounding kernel code is also strange for me. If I comment out that line, it works fine. Keeping the kernel intact, two queries that provide different answers work also fine, giving opportunity to hack a horrible workaround in the tool. 2.6 kernel code is free from that ominous filtering. Pete, thank you for your reply, and you all take care: Berci -----Original Message----- From: Pete Zaitcev [mailto:[EMAIL PROTECTED] Sent: Friday, June 22, 2007 12:24 AM To: Szilvási Bertalan Cc: linux-usb-devel@lists.sourceforge.net; [EMAIL PROTECTED] Subject: Re: HID device communication problem with kernel 2.4 On Thu, 21 Jun 2007 22:39:32 +0200, Szilvási Bertalan <[EMAIL PROTECTED]> wrote: > Communication is done with blocks of 9 values. I send 9 usage_refs to > the device using HIDIOCSUSAGE and HIDIOCSREPORT ioctl calls, and wait > for the reply. Using cat /dev/usb/hiddev0 I can see that answer has > arrived. But only at the first time! After that, no reply arrives, > until I press a button on the device. Then the button pressed data can > be seen, and after that the serial number query works correctly again > for _one_ time, and stops working until the next button event. Setting > LEDs and reading button events work always. It seems that only messages that > need reply from the device fail. I see your message, but I don't have an immediate answer. Devices routinely communicate blocks of values. This needs looking into. It may be something as simple as a missing wake_up(), but I don't know. Please let me know if you uncover something new and/or come with a patch. -- Pete ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel