Unfortunately with the current Linux implementation, it does require you to
have read/write access to at least all the hub nodes on the way to your
device, and your device.  It's easiest to just give access to all devices.

With the libusb implementation, this may not be the case.  It should also
work on Linux.  You can go here for more information.
http://cobain.arktekk.no/~trygvis/wiki/Implement_javax.usb_with_libusb

On Tue, Nov 30, 2010 at 4:58 PM, Klaus Gradinger
<klaus.gradin...@gmail.com>wrote:

> thanks, figured it out a while ago and now everything's working as a charm.
>
> one slight off topic question: I start at the virtual usb hub and iterate
> my way down while searching for the device i'm looking for... with the
> result that the whole /dev/bus/usb folder must be set to 775 + ownership for
> the group that executes the java program... is there a better way to do
> this? if i'm just looking for one single device?
>
> thanks,
>
>
> On Tue, Nov 30, 2010 at 5:38 PM, Dan Streetman <ddstr...@ieee.org> wrote:
>
>> Sorry, I forgot to cc the mailing list.
>>
>> Also, you should be able to use asyncSubmit() in a sync manner with:
>>
>> usbScannerPipe.asyncSubmit(currentDui);
>> currentDui.waitUntilComplete();
>>
>>
>> On Tue, Nov 30, 2010 at 11:34 AM, Dan Streetman <ddstr...@ieee.org>wrote:
>>
>>> You need to use asyncSubmit() instead of syncSubmit().
>>>
>>> On Thu, Nov 4, 2010 at 9:53 AM, Klaus Gradinger <
>>> klaus.gradin...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> I've been running into the following Problem: I'm communicating using a
>>>> USB Handheld Barcode Scanner (USB HID Keyboard Device). Everything is fine,
>>>> i've opened the IN Endpoint using the UsbPipe and access it the following
>>>> way:
>>>>
>>>>   currentDui = new DefaultUsbIrp(buffer);
>>>>   currentDui = new DefaultUsbIrp(buffer);
>>>>   currentDui.setAcceptShortPacket(true);
>>>>
>>>>   usbScannerPipe.syncSubmit(currentDui);
>>>>
>>>> I receive the data i'm expecting and everything works fine UNTIL i want
>>>> to abort and cancel everything:
>>>>
>>>>   usbScannerPipe.abortAllSubmissions();
>>>>   usbScannerPipe.close();
>>>>   usbScannerPipe = null;
>>>>   usbScannerInterface.release();
>>>>   usbScannerInterface = null;
>>>>
>>>> The problem is that syncSubmit immediately synchronizes using
>>>> "submitLock" (UsbPipeImp). After that the whole thing just keeps blocking
>>>> while waiting for data. When i call abortAllSubmissions from another 
>>>> Thread,
>>>> it too locks on "submitLock", waiting for the submitSync method to release
>>>> this lock. IF i scan another Barcode, the syncSubmit method returns and
>>>> everything is fine, otherwise it's a perfect deadlock.
>>>>
>>>> What's the correct work-flow here? how can i cancel everything pending
>>>> and close the pipe and interface?
>>>>
>>>> i'm using Ubuntu 10.04, and java-usb 1.0.1
>>>>
>>>> Thanks in advance
>>>> Klaus Gradinger
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
>>>> David G. Thomson, author of the best-selling book "Blueprint to a
>>>> Billion" shares his insights and actions to help propel your
>>>> business during the next growth cycle. Listen Now!
>>>> http://p.sf.net/sfu/SAP-dev2dev
>>>> _______________________________________________
>>>> javax-usb-devel mailing list
>>>> javax-usb-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
>>>>
>>>>
>>>
>>
>
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to