Discussion:
usb-rndis-ng
Ilya Bakulin
2008-05-06 13:53:27 UTC
Permalink
Hi,
Could anyone tell me, what is the purpose of usb-rndis-ng driver? It's section in 10-synce.fdi conflicts with uipaq driver on FreeBSD.
Here I have two HAL entries for WM device in lshal.
First is:
====================================================
udi = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial'
freebsd.driver = 'ucom' (string)
freebsd.unit = 0 (0x0) (int)
info.bus = 'usb_device' (string)
info.parent = '/org/freedesktop/Hal/devices/computer' (string)
info.product = 'USB Serial for Wizard' (string)
info.subsystem = 'usb_device' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial' (string)
info.vendor = 'HTC' (string)
usb_device.bus_number = 2 (0x2) (int)
usb_device.can_wake_up = false (bool)
usb_device.configuration_value = 1 (0x1) (int)
usb_device.device_class = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_revision_bcd = 0 (0x0) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.is_self_powered = false (bool)
usb_device.max_power = 100 (0x64) (int)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.num_interfaces = 1 (0x1) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.port_number = 3 (0x3) (int)
usb_device.product = 'USB Serial for Wizard' (string)
usb_device.product_id = 2641 (0xa51) (int)
usb_device.speed_bcd = 4608 (0x1200) (int)
usb_device.vendor = 'HTC' (string)
usb_device.vendor_id = 2996 (0xbb4) (int)
usb_device.version_bcd = 512 (0x200) (int)

====================================================

... and it has one child:
====================================================
udi = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial_if0'
info.bus = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial' (string)
info.product = 'USB Vendor Specific Interface' (string)
info.subsystem = 'usb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial_if0' (string)
usb.bus_number = 2 (0x2) (int)
usb.can_wake_up = false (bool)
usb.configuration_value = 1 (0x1) (int)
usb.device_class = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.device_revision_bcd = 0 (0x0) (int)
usb.device_subclass = 0 (0x0) (int)
usb.interface.class = 255 (0xff) (int)
usb.interface.number = 0 (0x0) (int)
usb.interface.protocol = 255 (0xff) (int)
usb.interface.subclass = 255 (0xff) (int)
usb.is_self_powered = false (bool)
usb.max_power = 100 (0x64) (int)
usb.num_configurations = 1 (0x1) (int)
usb.num_interfaces = 1 (0x1) (int)
usb.num_ports = 0 (0x0) (int)
usb.port_number = 3 (0x3) (int)
usb.product = 'USB Vendor Specific Interface' (string)
usb.product_id = 2641 (0xa51) (int)
usb.speed_bcd = 4608 (0x1200) (int)
usb.vendor = 'HTC' (string)
usb.vendor_id = 2996 (0xbb4) (int)
usb.version_bcd = 512 (0x200) (int)
====================================================

When I connect WM device, FreeBSD ucom rule invokes hal-dccm and appends required keys to first HAL entry.
Among them is "pda.platform" key. usb-rndis-ng rule finds "pda.platform" key in parent device's key list and appends its keys to SECOND HAL entry. :-(
When I use pls or other utilities, they find _if0 device entry first... The followin error occures:

** (process:11112): CRITICAL **: synce_info_from_hal: Failed to obtain property pda.pocketpc.name for device /org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial_if0: org.freedesktop.Hal.NoSuchProperty: No property pda.pocketpc.name on device with id /org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial_if0


Now I remove usb-rndis-ng rule and everything gets OK :-)
--
Ilya Bakulin <***@kibab.com>
Mark Ellis
2008-05-06 14:57:43 UTC
Permalink
Post by Ilya Bakulin
Hi,
Could anyone tell me, what is the purpose of usb-rndis-ng driver? It's section in 10-synce.fdi conflicts with uipaq driver on FreeBSD.
To the best of my knowledge it's a user space driver for rndis, I don't
know what it's status is however.
Post by Ilya Bakulin
Here I have two HAL entries for WM device in lshal.
====================================================
udi = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial'
freebsd.driver = 'ucom' (string)
freebsd.unit = 0 (0x0) (int)
info.bus = 'usb_device' (string)
info.parent = '/org/freedesktop/Hal/devices/computer' (string)
info.product = 'USB Serial for Wizard' (string)
info.subsystem = 'usb_device' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial' (string)
info.vendor = 'HTC' (string)
usb_device.bus_number = 2 (0x2) (int)
usb_device.can_wake_up = false (bool)
usb_device.configuration_value = 1 (0x1) (int)
usb_device.device_class = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_revision_bcd = 0 (0x0) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.is_self_powered = false (bool)
usb_device.max_power = 100 (0x64) (int)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.num_interfaces = 1 (0x1) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.port_number = 3 (0x3) (int)
usb_device.product = 'USB Serial for Wizard' (string)
usb_device.product_id = 2641 (0xa51) (int)
usb_device.speed_bcd = 4608 (0x1200) (int)
usb_device.vendor = 'HTC' (string)
usb_device.vendor_id = 2996 (0xbb4) (int)
usb_device.version_bcd = 512 (0x200) (int)
====================================================
====================================================
udi = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial_if0'
info.bus = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial' (string)
info.product = 'USB Vendor Specific Interface' (string)
info.subsystem = 'usb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial_if0' (string)
usb.bus_number = 2 (0x2) (int)
usb.can_wake_up = false (bool)
usb.configuration_value = 1 (0x1) (int)
usb.device_class = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.device_revision_bcd = 0 (0x0) (int)
usb.device_subclass = 0 (0x0) (int)
usb.interface.class = 255 (0xff) (int)
usb.interface.number = 0 (0x0) (int)
usb.interface.protocol = 255 (0xff) (int)
usb.interface.subclass = 255 (0xff) (int)
usb.is_self_powered = false (bool)
usb.max_power = 100 (0x64) (int)
usb.num_configurations = 1 (0x1) (int)
usb.num_interfaces = 1 (0x1) (int)
usb.num_ports = 0 (0x0) (int)
usb.port_number = 3 (0x3) (int)
usb.product = 'USB Vendor Specific Interface' (string)
usb.product_id = 2641 (0xa51) (int)
usb.speed_bcd = 4608 (0x1200) (int)
usb.vendor = 'HTC' (string)
usb.vendor_id = 2996 (0xbb4) (int)
usb.version_bcd = 512 (0x200) (int)
====================================================
When I connect WM device, FreeBSD ucom rule invokes hal-dccm and appends required keys to first HAL entry.
Among them is "pda.platform" key. usb-rndis-ng rule finds "pda.platform" key in parent device's key list and appends its keys to SECOND HAL entry. :-(
** (process:11112): CRITICAL **: synce_info_from_hal: Failed to obtain property pda.pocketpc.name for device /org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial_if0: org.freedesktop.Hal.NoSuchProperty: No property pda.pocketpc.name on device with id /org/freedesktop/Hal/devices/usb_device_bb4_a51_noserial_if0
I think I know what we need to do. We should actually be attaching to
the outermost leaf node, if that's the right way to say it. For
instance, for my WM2003 device

/org/freedesktop/Hal/devices/usb_device_502_16e3_noserial

has a child

/org/freedesktop/Hal/devices/usb_device_502_16e3_noserial_if0

has a child

/org/freedesktop/Hal/devices/usb_device_502_16e3_noserial_if0_serial_usb_0

The final one is the device that dccm attaches to, but the second is the
one that has info.linux.driver=ipaq. So in your case I would really want
to attach dccm to the child. So the rule should contain

<match key="@info.parent:freebsd.driver" contains="ucom">

Then we'd need to get the unit number from the parent, that can be done
with the hal tools.

Is that the complete listing of both those devices, and is the child the
outermost leaf ie. it has no children ?

Mark
Ilya Bakulin
2008-05-06 16:24:46 UTC
Permalink
On Tue, 06 May 2008 15:57:43 +0100
Post by Mark Ellis
I think I know what we need to do. We should actually be attaching to
the outermost leaf node, if that's the right way to say it. For
instance, for my WM2003 device
/org/freedesktop/Hal/devices/usb_device_502_16e3_noserial
has a child
/org/freedesktop/Hal/devices/usb_device_502_16e3_noserial_if0
has a child
/org/freedesktop/Hal/devices/usb_device_502_16e3_noserial_if0_serial_usb_0
The final one is the device that dccm attaches to, but the second is the
one that has info.linux.driver=ipaq. So in your case I would really want
to attach dccm to the child. So the rule should contain
Then we'd need to get the unit number from the parent, that can be done
with the hal tools.
Is that the complete listing of both those devices, and is the child the
outermost leaf ie. it has no children ?
Mark
Yes, there are only two device nodes.
Attached patch solves conflict with usb-rndis-ng rule on FreeBSD. Please test it on Linux systems.
--
Ilya Bakulin <***@kibab.com>
Ilya Bakulin
2008-05-06 16:33:25 UTC
Permalink
Sorry for double-posting - there is wrong version of patch in my previos email... I've taken new version of 10-synce.fdi from wrong place of my system :-)

Also, following errors are displayed when running hald in interactive mode:

Run started hal-synce-serial (0) (0)
! full path is '/usr/local/libexec/hal-synce-serial', program_dir is '/usr/local/libexec'
/usr/local/libexec/hal-synce-serial: /bin/true: not found
synce-serial-abort-device: not found
/usr/local/libexec/hal-synce-serial: /bin/true: not found

"true" program resides in /usr/bin, not in /bin on FreeBSD.
synce-serial-abort-device is part of synce-serial package, which is now deprecated, as I know.
--
Ilya Bakulin <***@kibab.com>
Mark Ellis
2008-05-06 18:11:56 UTC
Permalink
Post by Ilya Bakulin
Sorry for double-posting - there is wrong version of patch in my previos email... I've taken new version of 10-synce.fdi from wrong place of my system :-)
I like it ! I was going to get the unit in the script using command line
tools, but your way is so much better.
Post by Ilya Bakulin
Run started hal-synce-serial (0) (0)
! full path is '/usr/local/libexec/hal-synce-serial', program_dir is '/usr/local/libexec'
/usr/local/libexec/hal-synce-serial: /bin/true: not found
synce-serial-abort-device: not found
/usr/local/libexec/hal-synce-serial: /bin/true: not found
"true" program resides in /usr/bin, not in /bin on FreeBSD.
synce-serial-abort-device is part of synce-serial package, which is now deprecated, as I know.
Thanks for that, I'll sort it out.

Mark

Jonny Lamb
2008-05-06 16:45:53 UTC
Permalink
Post by Mark Ellis
Post by Ilya Bakulin
Could anyone tell me, what is the purpose of usb-rndis-ng driver? It's section in 10-synce.fdi conflicts with uipaq driver on FreeBSD.
To the best of my knowledge it's a user space driver for rndis, I don't
know what it's status is however.
Correct, a user-space RNDIS implementation. I think its primary purpose was
to debug the XScale issue with usb-rndis. As soon as it was sorted,
usb-rndis-lite was born and no-one has looked back to -ng (apart from
the Samsung problems which are now sorted in -lite).

You probably shouldn't be running -ng, although it does mean no kernel
patching is required, which could be nice for some.
--
Jonny Lamb, UK ***@jonnylamb.com
http://jonnylamb.com GPG: 0x2E039402
Loading...