Forgot to CC the list again. :)

On Fri, Jan 30, 2009 at 10:14 AM, Dan Streetman <[email protected]> wrote:
>> With the usbfs
>> it's not possible to get information about the ports of a hub.
>
> It's possible - that is how it's currently done.
>
>> But the sysfs could be used.
>
> True.  I think it would probably complicate the JNI code, as the sysfs
> structure is much more complicated than usbfs, but being complicated
> is ok.
>
> On Fri, Jan 30, 2009 at 5:36 AM, Manuel Stahl <[email protected]> wrote:
>> Dan Streetman schrieb:
>>>
>>> javax.usb keeps track of the usb topology, and last time I checked
>>> read-write access is unfortunately needed to call the
>>> usbdevfs_connectinfo ioctl to get the topology information.  This is
>>> why read-write access is needed.
>>
>> I had a look at the code and it's in fact the ioctls in the build_device
>> function but also somewhere in the build_config function. With the usbfs
>> it's not possible to get information about the ports of a hub.
>>
>> But the sysfs could be used. I will post some info I get from there (only by
>> reading files!)
>>
>> /sys/bus/usb/devices$ ls
>> 1-0:1.0    3-1:0.1        7-4.1.2
>> 1-1        4-0:1.0        7-4.1.2:1.0
>> 1-1.1      5-0:1.0        7-6
>> 1-1:1.0    6-0:1.0        7-6:1.0
>> 1-1.1:1.0  7-0:1.0        7-6:1.1
>> 1-1.2      7-3            8-0:1.0
>> 1-1.2:1.0  7-3:1.0        usb1
>> 1-1.3      7-4            usb2
>> 1-1.3:1.0  7-4.1          usb3
>> 1-1.3:1.1  7-4:1.0        usb4
>> 1-1.3:1.2  7-4.1.1        usb5
>> 1-1.3:1.3  7-4.1:1.0      usb6
>> 2-0:1.0    7-4.1.1:1.0    usb7
>> 3-0:1.0    7-4.1.1.2      usb8
>> 3-1        7-4.1.1.2:1.0
>> 3-1:0.0    7-4.1.1.2:1.1
>>
>> So I have 8 busses and if I look at bus7 ...
>>
>> /sys/bus/usb/devices$ cat usb7/maxchild
>> 6
>>
>> ... it has 6 ports.
>>
>>
>> I guess all the needed information can be retrieved with read-only access
>> from the sysfs filesystem. Maybe I will dig into that and try to write an
>> alternative version of the JavaxUsbTopologyUpdater.c that uses sysfs.
>>
>> Is there any volunteer with knowledge about the JNI stuff who want's to help
>> with that?
>>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
javax-usb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to