Well it looks like there is some problem that wasn't there before, but
in any case you should open a bug report on the sourceforge site for
this.  I (or anyone else who feels like it...;-) will take a look at
it.

On 7/16/07, David Hooker <[EMAIL PROTECTED]> wrote:
>
> I spoke too soon... what "works" now is that I can see all of the devices
> again... but I'm still having the problem where the machined screeches to
> a halt when the javax-usb library comes up.
>
> After my code walks through the devices and dumps their state to the screen,
> here are the threads running.
>
> Java HotSpot(TM) Client VM[10.1.0.167:8000]
>         Thread [main] (Suspended)
>                 Series6600.init() line: 242
>                 Series6600.main(String[]) line: 210
>         Thread [RunnableManager 2 Thread 1] (Running)
>         Thread [javax.usb Linux implementation Topology Poller] (Running)
>         Thread [UsbDeviceImp <ffff:ffff> RunnableManager Thread 1] (Running)
>         Thread [UsbDeviceImp <0000:0000> RunnableManager Thread 1] (Running)
>         Thread [LinuxDeviceProxy /proc/bus/usb/001/001] (Running)
>         Thread [UsbDeviceImp <0000:0000> RunnableManager Thread 1] (Running)
>         Thread [LinuxDeviceProxy /proc/bus/usb/002/001] (Running)
>         Thread [UsbDeviceImp <0bed:1100> RunnableManager Thread 1] (Running)
>         Thread [LinuxDeviceProxy /proc/bus/usb/002/002] (Running)
>         Thread [UsbDeviceImp <0596:0100> RunnableManager Thread 1] (Running)
>         Thread [LinuxDeviceProxy /proc/bus/usb/002/003] (Running)
>         Thread [UsbDeviceImp <0000:0000> RunnableManager Thread 1] (Running)
>         Thread [LinuxDeviceProxy /proc/bus/usb/003/001] (Running)
>         Thread [UsbDeviceImp <0000:0000> RunnableManager Thread 1] (Running)
>         Thread [LinuxDeviceProxy /proc/bus/usb/004/001] (Running)
>         Thread [UsbDeviceImp <088c:2030> RunnableManager Thread 1] (Running)
>         Thread [LinuxDeviceProxy /proc/bus/usb/004/002] (Running)
>
> At this point, I haven't even opened any endpoints or pipes, but the
> system is slow to the point of near-unresponsiveness.
>
> I'm running a 2.6.6 kernel - would this cause any problems?  I'm going to
> move over to Fedora Core 7 and see if that helps.
>
> Here is the dump from my code:
>
> Initializing usb services
> Getting root hub
> Root hub: javax.usb OS-independent Reference Implementation Virtual Root 
> UsbHub has 4 ports.
> Finding USB devices...
>    Attached devices: 4
>    Device: Linux 2.6.9-1.667 ehci_hcd EHCI Host Controller: 0000:00:03.3
>       Attached devices: 0
>    Device: Linux 2.6.9-1.667 ohci_hcd OHCI Host Controller: 0000:00:03.0
>       Attached devices: 2
>       Device: Silicon Labs MEI (TM) Cashflow-SC Bill/Voucher Acceptor: 
> 18781501820
>        bcdDevice: 256
>        bcdUSB: 272
>        idProduct: 4352
>        idVendor: 3053
>        bDescriptorType: 1
>        bDeviceClass: 0
>        bDeviceProtocol: 0
>        bDeviceSubClass: 0
>        bLength: 18
>        bMaxPacketSize0: 64
>        iManufacturer: 1
>        iProduct: 2
>        iSerialNumber: 3
>        1 configurations.
>         Confifuration: null is active.
>         - wTotalLength: 32
>         - bConfigurationValue: 1
>         - bDescriptorType: 2
>         - bLength: 9
>         - bmAttributes: -128
>         - bMaxPower: 50
>         - iConfiguration: 0
>         - bNumInterfaces: 1
>         Interface
>         (Active setting: 0)
>          -- bInterfaceClass: -1
>          -- bDescriptorType: 4
>          -- bInterfaceNumber: 0
>          -- bInterfaceProtocol: 0
>          -- bInterfaceSubClass: 0
>          ** Endpoints **
>          [-127] Direction: -128
>          [-127] Type: 2
>          [-127] wMaxPacketSize: 64
>          [-127] bDescriptorType: 5
>          [-127] bEndpointAddress: -127
>          [-127] bInterval: 0
>          [-127] bLength: 7
>          [-127] bmAttributes: 2
>          [-127] pipe active: true
>          [-127] pipe open: false
>          [1] Direction: 0
>          [1] Type: 2
>          [1] wMaxPacketSize: 64
>          [1] bDescriptorType: 5
>          [1] bEndpointAddress: 1
>          [1] bInterval: 0
>          [1] bLength: 7
>          [1] bmAttributes: 2
>          [1] pipe active: true
>          [1] pipe open: false
>       Device: 3M 3M MicroTouch USB controller: null
>        bcdDevice: 1
>        bcdUSB: 272
>        idProduct: 256
>        idVendor: 1430
>        bDescriptorType: 1
>        bDeviceClass: 0
>        bDeviceProtocol: 0
>        bDeviceSubClass: 0
>        bLength: 18
>        bMaxPacketSize0: 8
>        iManufacturer: 3
>        iProduct: 1
>        iSerialNumber: 0
>        1 configurations.
>         Confifuration: null is active.
>         - wTotalLength: 34
>         - bConfigurationValue: 1
>         - bDescriptorType: 2
>         - bLength: 9
>         - bmAttributes: -96
>         - bMaxPower: 25
>         - iConfiguration: 0
>         - bNumInterfaces: 1
>         Interface
>         (Active setting: 0)
>          -- bInterfaceClass: 3
>          -- bDescriptorType: 4
>          -- bInterfaceNumber: 0
>          -- bInterfaceProtocol: 0
>          -- bInterfaceSubClass: 0
>          ** Endpoints **
>          [-127] Direction: -128
>          [-127] Type: 3
>          [-127] wMaxPacketSize: 8
>          [-127] bDescriptorType: 5
>          [-127] bEndpointAddress: -127
>          [-127] bInterval: 10
>          [-127] bLength: 7
>          [-127] bmAttributes: 3
>          [-127] pipe active: true
>          [-127] pipe open: false
>    Device: Linux 2.6.9-1.667 ohci_hcd OHCI Host Controller: 0000:00:03.1
>       Attached devices: 0
>    Device: Linux 2.6.9-1.667 ohci_hcd OHCI Host Controller: 0000:00:03.2
>       Attached devices: 1
>       Device: Swecoin AB  TTP 2030: null
>        bcdDevice: 260
>        bcdUSB: 256
>        idProduct: 8240
>        idVendor: 2188
>        bDescriptorType: 1
>        bDeviceClass: 7
>        bDeviceProtocol: 2
>        bDeviceSubClass: 1
>        bLength: 18
>        bMaxPacketSize0: 64
>        iManufacturer: 1
>        iProduct: 2
>        iSerialNumber: 0
>        1 configurations.
>         Confifuration: null is active.
>         - wTotalLength: 32
>         - bConfigurationValue: 1
>         - bDescriptorType: 2
>         - bLength: 9
>         - bmAttributes: 64
>         - bMaxPower: 0
>         - iConfiguration: 0
>         - bNumInterfaces: 1
>         Interface
>         (Active setting: 0)
>          -- bInterfaceClass: 7
>          -- bDescriptorType: 4
>          -- bInterfaceNumber: 0
>          -- bInterfaceProtocol: 2
>          -- bInterfaceSubClass: 1
>          ** Endpoints **
>          [1] Direction: 0
>          [1] Type: 2
>          [1] wMaxPacketSize: 64
>          [1] bDescriptorType: 5
>          [1] bEndpointAddress: 1
>          [1] bInterval: 0
>          [1] bLength: 7
>          [1] bmAttributes: 2
>          [1] pipe active: true
>          [1] pipe open: false
>          [-126] Direction: -128
>          [-126] Type: 2
>          [-126] wMaxPacketSize: 64
>          [-126] bDescriptorType: 5
>          [-126] bEndpointAddress: -126
>          [-126] bInterval: 0
>          [-126] bLength: 7
>          [-126] bmAttributes: 2
>          [-126] pipe active: true
>          [-126] pipe open: false
>
> -----Original Message-----
> From: David Hooker [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 16, 2007 3:49 PM
> To: [EMAIL PROTECTED]; 'Dan Streetman'
> Cc: javax-usb-devel@lists.sourceforge.net
> Subject: RE: [javax-usb-devel] Help - javax-usb very slow
>
>
>
> Seems my usbfs was mounted without write permissions.  I remounted 0666 and 
> it seems to work now.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of David
> Hooker
> Sent: Monday, July 16, 2007 12:16 PM
> To: 'Dan Streetman'
> Cc: javax-usb-devel@lists.sourceforge.net
> Subject: Re: [javax-usb-devel] Help - javax-usb very slow
>
>
> No, my code only creates one thread, which sleeps 10 seconds then attempts to 
> send a packet to a USB device.
>
> My code before that looks like this:
>
>             inEndpoint = 
> DeviceManager.getInstance().getInEndpoint("3053/4352");
>             outEndpoint = 
> DeviceManager.getInstance().getOutEndpoint("3053/4352");
>             inEndpoint.getUsbInterface().claim();
>             inPipe = inEndpoint.getUsbPipe();
>             inPipe.open();
>             inPipe.addUsbPipeListener(this);
>             outPipe = outEndpoint.getUsbPipe();
>             outPipe.open();
>
> The "DeviceManager" is a class I wrote which recursively goes through the USB 
> hierarchy of hub/devices, creating a hashmap of product/vendor ids to 
> configured endpoints.  Oh, and it prints out the entire tree and descriptors 
> for everything.
>
> Once the pipes are open, I see in the debugger a number of threads, all with 
> names which appear to be set within the javax-usb library.
>
> I'd post those names, but now, for some reason, my searching for usb devices 
> can't find any:
>
>   Initializing usb services
>   Getting root hub
>   Root hub: javax.usb OS-independent Reference Implementation Virtual Root 
> UsbHub has 1 ports.
>   Finding USB devices...
>      Attached devices: 0
>
> I don't know why it can no longer find ANY USB devices.  I did download and 
> compile the "libusb" library, and ran the tests associated with it - and it 
> finds all of the USB devices just fine.  I rebooted, thinking that it somehow 
> masked them from the javax-usb library, but even after a reboot the java code 
> can't see anything.  I didn't "install" the library - just compiled it and 
> ran the tests.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dan
> Streetman
> Sent: Monday, July 16, 2007 11:22 AM
> To: [EMAIL PROTECTED]
> Cc: javax-usb-devel@lists.sourceforge.net
> Subject: Re: [javax-usb-devel] Help - javax-usb very slow
>
>
> Maybe if you posted your code we could help more.  Your description is
> pretty vague, especially of what you are doing when the problem
> happens.  Maybe your code is creating all the threads?
>
> On 7/15/07, David Hooker <[EMAIL PROTECTED]> wrote:
> >
> > So, I spent all day downloading the javax.usb packages, compiling them... 
> > then writing code to use them.  Now, when I run my program, the machine 
> > grinds to a halt!  Here's all that I've learned, and if someone could tell 
> > me what's going on that would be fantastic!
> >
> > Latest released javax.usb code (1.0.1), compiled today on this machine.
> >
> > OS: Linux localhost.localdomain 2.6.9-1.667 #1 Thu Aug 11 16:18:41 CDT 2005 
> > i686 athlon i386 GNU/Linux
> > (Fedora Core 3 - I think)
> >
> > gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
> >
> > java version "1.5.0"
> > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> > Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)
> >
> > So... my code simply goes through the usb topology, recursively printing 
> > out all the information for all the objects it sees.  That works fine.  
> > When it sees a UsbInterface that is configured/active, it gets the in/out 
> > UsbEndpoints and puts them in Hashtables, with the devices vendor/product 
> > ids (concatenated to a string) as the key.  That way, I can just ask the 
> > hashtable for the "in" endpoint for device "123/456".  Which works.  Once 
> > it does that, it get's a particular device, claims the interface, get's the 
> > output pipe, and sends a string.  Then it quits.
> >
> > What seems to happen is that once I've walked through the device tree, the 
> > whole computer slows to a crawl until the program ends.  Hooking up a 
> > remote debugger (Eclipse) shows a bunch of threads fired up... and the 
> > debugger even has trouble getting the jvm to respond because the machine is 
> > so hosed.
> >
> > I tried fiddling with the settings in javax.usb.properties - setting the 
> > polling to true, then false, chaning the poll time... nothing affects this 
> > weird behvior.  JNI tracing doesn't seem to do anything, either.  (I've 
> > searched my whole machine for any conflicting libraries, jar files, and 
> > property files - it's clean).
> >
> > Any ideas???
> >
> > Thanks in advance!!!
> > -------------------------------------------------------------------------
> > 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/
> > _______________________________________________
> > javax-usb-devel mailing list
> > javax-usb-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/javax-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/
> _______________________________________________
> javax-usb-devel mailing list
> javax-usb-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/javax-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/
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to