|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Unable to Read from my usb device using libusb on rhel4I am having a hard time figuring out why I cannot read from my usb device using my Java application which works fine on windows and rhel3. The usb device is internally designed and has been used for quite some time on windows and rhel3 with no problems.
I have had the administrator install libusb on the box and downloaded the source code for the dll and compiled it since I heard that the kernel between rhel3 and 4 is very different. I installed a script in the map file so that when the device is plugged in it will create the node with permissions that are more open so that my Java application will be able to talk to it. When I plug the device in it is recognized by the system using hotplug. I can verify that everything looks good to start with by review the data from running lsusb. I then launch my Java application and I can see the device, open it, configure it, claim the interface, and write a command to the device, which I have verified is received by the device, but I can't read from the device. The bulk_read returns a -1 for the bytes written. I have also enabled libusb debugging and I see no errors when calling the bulk_read method. This all works on rhel3. I have downloaded(libusb version 0.1.12) everything fresh, compiled it, distributed it correctly, and made sure the permissions are correct, but still no worky. I cannot change the version of Linux since it is the approved deployed version in my area. Thanks in advance. |
|
|
Re: Unable to Read from my usb device using libusb on rhel4Please avoid sending the same post more than once. It is a good way
to annoy people and reduce the chance that you will get help. StudentB wrote: > .. cannot read from my usb device using my Java application .. > .. The bulk_read returns a -1 for the bytes written. In order to minimize the effort for those who can help from, you should try to reproduce your problem with a C program that uses the library directly and then post that program here, preferably also with usbmon output from running the program. Anything less than that means that you are pushing a lot of work onto others, which I don't think is really reasonable. There is a lot of neccessary information missing in your email. How many bytes are you writing and how many are you reading, for starters? What timeout are you using? > This all works on rhel3. Great. Then you can compare usbmon output from the two Linux systems. Maybe you have to set up a new development environment based on RHEL3, but with usbmon enabled, and the same for your current environment. > I have downloaded(libusb version 0.1.12) everything fresh, libusb-0.1 is all but fresh. While there are few catastrophic problems with the library, you should try to use libusb-1.0 instead. 1.0 has better performance, more complete API, is more streamlined, and is actually maintained. > I cannot change the version of Linux Set something up in a lab environment so that you can work. Then figure out how to get that into whatever target you want. You (management actually) must of course also be prepared for the situation where changes ARE required to the target in order to make something work. Management usually isn't. Good fun. //Peter ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Libusb-devel mailing list Libusb-devel@... https://lists.sourceforge.net/lists/listinfo/libusb-devel |
|
|
Re: Unable to Read from my usb device usinglibusb on rhel4Peter wrote:
>> StudentB wrote: >> > .. cannot read from my usb device using my Java application .. >> > .. The bulk_read returns a -1 for the bytes written. >> >> In order to minimize the effort for those who can help from, you >> should try to reproduce your problem with a C program that uses the >> library directly and then post that program here, preferably also >> with usbmon output from running the program. Please also post what is printed to the console when -1 is returned. You may need to tell libusb to print debugging info. Michael ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Libusb-devel mailing list Libusb-devel@... https://lists.sourceforge.net/lists/listinfo/libusb-devel |
|
|
Re: Unable to Read from my usb device usinglibusb on rhel4I could not get the Sysadmin folks to enable the debug modules to use usbmon so I got a USB Protocol Analyzer and used that instead. What I found was that it looks like the device is enumerating as a Human Interface Device becuase there is constant packets(Interrupts) being sent to the device as if it were polling a keyboard or mouse. I do not see this chatter on rhel3.
The interfaceClass is set to 255, i.e. Vendor Specific. I am curious which driver the OS actually uses for this type of class. At this point I don't believe my problem has anything to do with the libusb library, but rather that the device driver being used is bad or the wrong driver is being called out. Since my admins will not apply any patches to the rhel4 boxes I am going to see if it works on a rhel5 box which they said they will patch whatever is necessary.
|
| Free embeddable forum powered by Nabble | Forum Help |