Tim Noell | 7 May 2013 20:32
Favicon

javax-usb-ri-linux vs Linux kernel >= 3.5? No usbfs!!!

Hi javax-usb-devel :

We have a framework that has used javax-usb(-ri(-linux))  for years.  Can't get rid of the API.
But our kernel is being upgraded to >=3.5 and usbfs has gone away ( ;-(  )
Meanwhile, looking at javax-usb-linux-ri 1.0.3 (latest) source, it still wants to find usbfs under either /proc/bus/usb (_OLD) or /dev/bus/usb (_NEW).

Any plans to modify javax-usb-ri-linux to use sysfs or udev or libusb or ... ?

Curious,
T.

which looks interesting, but I don't know how baked it is. 
Still exploring options ...

--
// Only dead fish go with the flow.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
Klaus Reimer | 1 May 2013 21:39
Picon
Gravatar

Maven artifact

Hello,

I want to publish a project in the official Maven repository which 
depends on the javax.usb API. Unfortunately the javax.usb JAR is 
currently not deployed to the Maven repo. Are there plans to do this?

--

-- 
Bye, K <http://www.ailis.de/~k/>
[A735 47EC D87B 1F15 C1E9 53D3 AA03 6173 A723 E391]

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
Susheel Yadav | 19 Feb 2013 14:41
Picon
Favicon

(no subject)


http://www.blochtech.com/components/com_content/googletrends.html

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
Susheel Yadav | 12 Feb 2013 16:05
Picon
Favicon

(no subject)


http://www.blueribbondogtraining.com/images/stories/lizgoogle.html

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
Anson, Gary | 1 Aug 2012 23:42
Favicon

When will support for kernel above 2.6.31-18 happen?

We have customers that are using newer kernels and javax.usb 1.0.2 does not support the udev model.

Thanks!

 

Regards,

 

Gary Anson | Senior Software Engineer | Datalogic ADC

959 Terry Street, Eugene, OR 97402 USA

Toll Free: 800-695-5700 | Direct: 541-302-2039 | Mobile: 541-579-0500

www.adc.datalogic.com

 


CONFIDENTIALITY NOTICE. This message is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please destroy all copies of the original message, including any and all attachments, and notify the sender immediately.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
Hardik Shah | 9 Jul 2012 07:08

Reg: Javax.usb (pipe.syncSubmit ) hangs up

Hello,

 

I am working on a code which supports integration of Usb device for an Embedded system. I am using javax.usb API. I was successfully able to send and receive data

from/to usb device.

 

However I came across a issue.

 I have an infinite thread which polls for the data (swiped by user). I am using pipe.syncSubmit() method. The problem comes when I want to shutdown the application and so I need

to close the polling thread, but when I closed the thread pipe.syncSubmit just hangs up (as it is waiting to read the data). I tried to release the interface  interf.release(); but it also hangs up.  Using pipe.abortAllSubmission( ) doesn’t help, So I am not able to close the pipe properly.

 

If Polling thread or pipe is not closed properly, then restarting the application causes error in sending and receiving the data from usb device. As it uses already claimed interface. (as interface was not release previously since pipe is not closed successfully).

 

I can’t use pipe.asyncSubmit method, as I am not sure when user is going to swipe the card and using waitUntilComplete() method is same as using pipe.syncSubmit() method.

 

I don’t know whether this is a potential bug in javax.usb api  or am I missing something. Thanks for your help

 

Regards

Shah

 

 

 

 

 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
Dinow | 28 Jun 2012 10:44
Picon

javax.usb.UsbPlatforException

Could someone give me any advices or your experience to my puzzle
 
I used the javax(JSR80) to communicate with the USB-UPS at Linux
At first, the application is running okay (set/get) with the UPS via USB
 
But recently this USB-chip supplier changed their chip to the other one company
(Because the former one is stop manufacturing). Hence my application need to test or modify
 
And below is the message I got once I initiate the application (Compile is okay)
==> "javax.usb.UsbPlatformException : Error Submitting IRP : Timed Out"
In the meanwhile, my friend's application ran well with the new usb as the former one.
(His application don't need to change at all)
But his platform is Windows and used the Delphi
 
Kindly give me your experience or any advice to my doubts.
And below are my concise code to the exception :"javax.usb.UsbPlatformException : Error Submitting IRP : Timed Out"
 
   //Set_Report Request=================   
 
     byte bmRequestType1 = (byte)0x21;       //HID   
   byte bRequest1 = (byte)0x09;                //Set_Report   
   short wValueBaud = 0x03AD;                //(03:SetFeature 0F:ReportID)   
   short wIndex = 0;

   UsbControlIrp irpsetBaud = pipe.createUsbControlIrp(bmRequestType1, bRequest1, wValueBaud, wIndex);   
   byte dataBaud[] = {(byte)173, (byte)0, (byte)1, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0};   
   
   pipe.open();      
   irpsetBaud.setData(dataBaud);   
   upsUsbDevice.syncSubmit(irpsetBaud);    ===> The catch exception "javax.usb.UsbPlatformException : Error Submitting IRP : Timed Out" will occur at this line
   irpsetBaud.setComplete(false); 
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
Ghassan Knayzeh | 24 May 2012 22:21
Picon

JSR80 on arm board

Hi All,

I am trying to use the java usb api on a arm processor. I can list all the device connected and I can open the
pipes. However when I attempt to send any data on either bulk or interrupt based devices I get an error.

the following is the trace that I get:

[hotplug](3) JavaxUsbTopologyUpdater.c.build_device[117] Building device /dev/bus/usb/001/001
[hotplug](3) JavaxUsbTopologyUpdater.c.build_device[141] Device is hub with 3 ports
[hotplug](4) JavaxUsbTopologyUpdater.c.build_device[156] Device speed is 12 Mbps
[hotplug](4) JavaxUsbTopologyUpdater.c.build_config[222] Building config 1
[hotplug](4) JavaxUsbTopologyUpdater.c.build_interface[282] Building interface 0
[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[296] Building endpoint 0x81
[hotplug](4) JavaxUsbTopologyUpdater.c.build_device[189] Building device 2 attached to port 0
[hotplug](3) JavaxUsbTopologyUpdater.c.build_device[117] Building device /dev/bus/usb/001/002
[hotplug](3) JavaxUsbTopologyUpdater.c.build_device[141] Device is hub with 7 ports
[hotplug](4) JavaxUsbTopologyUpdater.c.build_device[156] Device speed is 12 Mbps
[hotplug](4) JavaxUsbTopologyUpdater.c.build_config[222] Building config 1
[hotplug](4) JavaxUsbTopologyUpdater.c.build_interface[282] Building interface 0
[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[296] Building endpoint 0x81
[hotplug](4) JavaxUsbTopologyUpdater.c.build_interface[282] Building interface 0
[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[296] Building endpoint 0x81
[hotplug](4) JavaxUsbTopologyUpdater.c.build_device[189] Building device 3 attached to port 0
[hotplug](3) JavaxUsbTopologyUpdater.c.build_device[117] Building device /dev/bus/usb/001/003
[hotplug](4) JavaxUsbTopologyUpdater.c.build_device[156] Device speed is 12 Mbps
[hotplug](4) JavaxUsbTopologyUpdater.c.build_config[222] Building config 1
[hotplug](4) JavaxUsbTopologyUpdater.c.build_interface[282] Building interface 0
[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[296] Building endpoint 0x01
[hotplug](4) JavaxUsbTopologyUpdater.c.build_endpoint[296] Building endpoint 0x82
[default](2) JavaxUsb.h.open_device[209] Opening node /dev/bus/usb/001/001
[hotplug](4) JavaxUsbActive.c.getActiveConfig[272] Getting active config using GET_CONFIGURATION
standard request.
[hotplug](4) JavaxUsbActive.c.config_ask_device[212] Active device configuration is 1
[hotplug](4) JavaxUsbActive.c.getActiveConfig[274] Device returned 1.
[default](2) JavaxUsb.h.open_device[209] Opening node /dev/bus/usb/001/002
[hotplug](4) JavaxUsbActive.c.getActiveConfig[272] Getting active config using GET_CONFIGURATION
standard request.
[hotplug](4) JavaxUsbActive.c.config_ask_device[212] Active device configuration is 1
[hotplug](4) JavaxUsbActive.c.getActiveConfig[274] Device returned 1.
[default](2) JavaxUsb.h.open_device[209] Opening node /dev/bus/usb/001/002
[default](2) JavaxUsb.h.open_device[209] Opening node /dev/bus/usb/001/003
[hotplug](4) JavaxUsbActive.c.getActiveConfig[272] Getting active config using GET_CONFIGURATION
standard request.
[hotplug](4) JavaxUsbActive.c.config_ask_device[212] Active device configuration is 1
[hotplug](4) JavaxUsbActive.c.getActiveConfig[274] Device returned 1.
[default](2) JavaxUsb.h.open_device[209] Opening node /dev/bus/usb/001/003
[xfer](2) JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[69]
Got Request
[default](3) JavaxUsbInterfaceRequest.c.claim_interface[87] Claiming interface 0
[default](1) JavaxUsbInterfaceRequest.c.claim_interface[94] Could not claim interface 0 : errno -16
scsi: killing requests for dead queue
scsi: killing requests for dead queue
[default](2) JavaxUsbInterfaceRequest.c.disconnect_interface_driver[48] Disconnected driver
from interface 0
[default](3) JavaxUsbInterfaceRequest.c.claim_interface[87] Claiming interface 0
[default](3) JavaxUsbInterfaceRequest.c.claim_interface[96] Claimed interface 0
[xfer](2) JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[72]
Completed Request
Reader started: press buttons to see values.
Writer started.
Buffer Size is: 512
[xfer](2) JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[69]
Got Request
[xfer](2) JavaxUsbPipeRequest.c.pipe_request[62] Submitting URB
[default](2) JavaxUsbKernel.c.setKernelVersion[46] Kernel version string 3.0.9-PD11.1.0 parsed as 3.0.9
[urb](2) JavaxUsb.h.debug_urb[266] bulk_pipe_request : URB address = 0x8a2a8
[urb](2) JavaxUsb.h.debug_urb[267] bulk_pipe_request : URB endpoint = 1 status = 0 signal = 0
[urb](2) JavaxUsb.h.debug_urb[268] bulk_pipe_request : URB buffer length = 512 actual length = 0
[urb](3) JavaxUsb.h.debug_urb[282] bulk_pipe_request : URB data = 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000
[xfer](2) JavaxUsbPipeRequest.c.pipe_request[75] Submitted URB
[xfer](2) JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[72]
Completed Request
[xfer](2) JavaxUsbDeviceProxy.c.Java_com_ibm_jusb_os_linux_JavaxUsb_nativeDeviceProxy[85]
Got completed URB
[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[112] Completing URB. of type: 2
[xfer](2) JavaxUsbPipeRequest.c.complete_pipe_request[114] Partially completed
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x401996d4, pid=211, tid=1311196272
#
# JRE version: 6.0_30-b12
# Java VM: Java HotSpot(TM) Client VM (20.5-b03 mixed mode linux-arm )
# Problematic frame:
# C  [libc.so.6+0x726d4]  memcpy+0x114
#
# An error report file with more information is saved as:
# /opt/testusb/hs_err_pid211.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted

Has anyone successfully ran the API on an arm processor?

Cheers,

gk
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Dan Streetman | 5 Apr 2012 15:35
Picon

Re: Reg: Endpoints for reading the data

CC'ing my response to the list; I forgot to reply-all.

On Wed, Apr 4, 2012 at 8:07 AM, Dan Streetman <ddstreet <at> ieee.org> wrote:
> endpoint 0 is the "default" endpoint and not available in any
> interface (it could be argued that the usb spec says it's available in
> "all" interfaces, which is equally unhelpful).  The only access to
> endpoint 0 is the "default control pipe" which is accessed directly
> from the device, via UsbDevice.asyncSubmit(UsbControlIrp) or
> UsbDevice.syncSubmit(UsbControlIrp)
>
> On Wed, Apr 4, 2012 at 3:32 AM, Hardik Shah <hardik.shah <at> jetmobile.com> wrote:
>> Hi All,
>>
>>
>>
>> I am working on a code which does a read/write operation on usb Device.
>>
>>
>>
>> I am successfully able to read data at endpoint 1.     But I came across a
>> situation where I need to read data from endpoint 0. How can I achieve this.
>>
>>
>>
>> When I try to get number of endpoint for a device. I get one.
>>
>> List eps = interf.getUsbEndpoints();
>>
>> Eps.size()
>>
>>
>>
>> Please tell me how to get multiple endpoints (ep0,ep1) form device.
>>
>>
>>
>> Thanks
>>
>> Shah
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Better than sec? Nothing is better than sec when it comes to
>> monitoring Big Data applications. Try Boundary one-second
>> resolution app monitoring today. Free.
>> http://p.sf.net/sfu/Boundary-dev2dev
>> _______________________________________________
>> javax-usb-devel mailing list
>> javax-usb-devel <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
>>

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
Dan Streetman | 5 Apr 2012 15:34
Picon

Re: Reg: Endpoints for reading the data

I'm no longer involved in this spec or implementation, Brian
Weischedel is the current owner, so he probably can help you more.
But I put some responses to obvious issues below.

On Thu, Apr 5, 2012 at 12:28 AM, Hardik Shah <hardik.shah <at> jetmobile.com> wrote:
> Hi Dan,
>
> Thanks for the Response.
>
> I tried with default control pipe to get response from the device at endpoint 0. But I didn't got any
response data. Please find snippet of code.
>
>                // for receiving the response
>
>                byte bmRequestTypeIN = UsbConst.REQUESTTYPE_DIRECTION_IN|
UsbConst.REQUESTTYPE_TYPE_CLASS | UsbConst.REQUESTTYPE_RECIPIENT_INTERFACE;
>                byte bRequest = 0x08; /* SET_REPORT */

You can't use SET_REPORT on an input request, you want GET_REPORT,
which is 0x01.

>                short wValue = 0x0300 /* Report Type and Report ID */;
>                short wIndex = 0; /* Interface */
>                byte[] bufferIN = new byte[20];
>
>                // for sending the vendor specific commands
>
>                byte bmRequestTypeOUT = UsbConst.REQUESTTYPE_DIRECTION_OUT |
UsbConst.REQUESTTYPE_TYPE_CLASS | UsbConst.REQUESTTYPE_RECIPIENT_INTERFACE;
>                byte bRequestOUT = 0x09; /* SET_REPORT */
>                short wValueOUT = 0x0300 /* Report Type and Report ID */;
>                short wIndexOUT = 0; /* Interface */
>                byte[] bufferOut = {} // vendor specific commands

Typically you want to actually send data with a SET_REPORT command...?

>
>
>                UsbControlIrp usbControlIrpOUT =
usbDevice.createUsbControlIrp(bmRequestTypeOUT, bRequestOUT, wValueOUT, wIndexOUT);
>                usbControlIrpOUT.setData(bufferOut);
>
>                UsbControlIrp usbControlIrpIN =
usbDevice.createUsbControlIrp(bmRequestTypeIN, bRequest, wValue, wIndex);
>                usbControlIrpIN.setData(bufferIN);
>
>                list.add(usbControlIrpOUT);
>                list.add(usbControlIrpIN);

You don't need to create a list to submit (although it shouldn't
hurt).  A list is only really needed for time-sensitive urbs like
isoc.

>
>                usbDevice.asyncSubmit(list);
>                UsbControlIrp irp = (UsbControlIrp) list.get(1);
>                byte temp [] = irp.getData();

I think you're misunderstanding what the difference between
asyncSubmit and syncSubmit is.  When you asyncSubmit, you regain
control immediately.  When you syncSubmit, your thread is blocked
until the irp completes (successfully or with error).  Your code above
is getting the irp data immedaitely after asyncSubmit, which means
there is pretty much 0% chance that the device has transferred any
data yet.  If you want to write the code as above, use syncSubmit.
Alternately, if you do want to use asyncSubmit, then use a listener,
or have a thread wait for irp.waitUntilComplete().

And of course, I can't speak to whether you're actually following your
device's protocol correctly; if you don't get that right then there is
no guarantee the device will actually send you anything in response to
the GET_REPORT.

>
>        I tried with sending the commands in sequence(one after another) and also with creating list of
controlIrp's and then submitting, but was unsuccessful. Can you please tell me what wrong I am doing here.
>
> Thanks
> shah
>
>
>
>
> -----Original Message-----
> From: ddstreet <at> gmail.com [mailto:ddstreet <at> gmail.com] On Behalf Of Dan Streetman
> Sent: Wednesday, April 04, 2012 5:38 PM
> To: Hardik Shah
> Subject: Re: [javax-usb-devel] Reg: Endpoints for reading the data
>
> endpoint 0 is the "default" endpoint and not available in any
> interface (it could be argued that the usb spec says it's available in
> "all" interfaces, which is equally unhelpful).  The only access to
> endpoint 0 is the "default control pipe" which is accessed directly
> from the device, via UsbDevice.asyncSubmit(UsbControlIrp) or
> UsbDevice.syncSubmit(UsbControlIrp)
>
> On Wed, Apr 4, 2012 at 3:32 AM, Hardik Shah <hardik.shah <at> jetmobile.com> wrote:
>> Hi All,
>>
>>
>>
>> I am working on a code which does a read/write operation on usb Device.
>>
>>
>>
>> I am successfully able to read data at endpoint 1.     But I came across a
>> situation where I need to read data from endpoint 0. How can I achieve this.
>>
>>
>>
>> When I try to get number of endpoint for a device. I get one.
>>
>> List eps = interf.getUsbEndpoints();
>>
>> Eps.size()
>>
>>
>>
>> Please tell me how to get multiple endpoints (ep0,ep1) form device.
>>
>>
>>
>> Thanks
>>
>> Shah
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Better than sec? Nothing is better than sec when it comes to
>> monitoring Big Data applications. Try Boundary one-second
>> resolution app monitoring today. Free.
>> http://p.sf.net/sfu/Boundary-dev2dev
>> _______________________________________________
>> javax-usb-devel mailing list
>> javax-usb-devel <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
>>

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
Hardik Shah | 4 Apr 2012 09:32

Reg: Endpoints for reading the data

Hi All,

 

I am working on a code which does a read/write operation on usb Device.

 

I am successfully able to read data at endpoint 1.     But I came across a situation where I need to read data from endpoint 0. How can I achieve this.

 

When I try to get number of endpoint for a device. I get one.  

List eps = interf.getUsbEndpoints();

Eps.size()

 

Please tell me how to get multiple endpoints (ep0,ep1) form device.

 

Thanks

Shah

 

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Gmane