Mapping an unknown USB device to a given driver

For discussing Linux compatible (or not) devices

Moderators: ChrisThornett, LXF moderators

Mapping an unknown USB device to a given driver

Postby kgolding » Fri Apr 13, 2012 9:59 pm

I have a USB RNDIS device that it not recognised, but I have been told that the Prolific USB RNDIS driver should be compatible.

So, is there a way from me to map the "238b:0a21" id I get from lsusb to a Prolific driver? I'm really of my depth here, but also really want to get it working!

I'm using Debian 6.04, but am happy to use Ubuntu if that makes it easier?

Regards,

Kevin
kgolding
 
Posts: 17
Joined: Sat Oct 15, 2005 8:48 pm
Location: Surrey

Postby Dutch_Master » Tue Apr 17, 2012 3:42 am

You can, but:
1) you really need to know what you're doing and
2) it involves writing some udev rules (that require a certain syntax)

Run
Code: Select all
man udev
for more details on the latter. Note it might break other devices if you associate the driver wrongly....
Dutch_Master
LXF regular
 
Posts: 2460
Joined: Tue Mar 27, 2007 1:49 am

Postby kgolding » Tue Apr 17, 2012 6:22 am

Thank you for the reply. I have been reading up on udev, and I can see how to add a rule for my device, but I can not see how to force the use of a particular driver?

Kevin
kgolding
 
Posts: 17
Joined: Sat Oct 15, 2005 8:48 pm
Location: Surrey

Postby ferrari » Tue Apr 17, 2012 9:34 am

Without knowing anything about the driver concerned, in general you can use the 'modinfo' command (or man page if one exists) to determine any driver options available. For example, the usbserial driver can be loaded with particular vendor and product IDs

Code: Select all
 modinfo usbserial
filename:       /lib/modules/2.6.37.6-0.11-desktop/kernel/drivers/usb/serial/usbserial.ko
license:        GPL
description:    USB Serial Driver core
author:         Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/
srcversion:     3F51183D19FC4ACD9619988
depends:       
vermagic:       2.6.37.6-0.11-desktop SMP preempt mod_unload modversions
parm:           vendor:User specified USB idVendor (ushort)
parm:           product:User specified USB idProduct (ushort)
parm:           debug:Debug enabled or not (bool)

As you can see, this driver has options to parse a specific chipset. So, one might have a particular hardware device that requires this driver to load via a udev rule eg

Code: Select all
SUBSYSTEM==”usb”, \
SYSFS{idVendor}==”19d2″, \
SYSFS{idProduct}==”0001″, \
RUN+=”/sbin/modprobe usbserial vendor=0x19d2 product=0×0001″


You will need to determine what module options are available to you.
ferrari
LXF regular
 
Posts: 142
Joined: Tue May 03, 2005 11:09 am

Postby kgolding » Tue Apr 17, 2012 9:44 am

Now that looks good!

I'm trying to load the plusb (Prolific USB Network) driver on a proprietary device that I am told should work with said driver.

However, given the output below I don't think the driver will accept the PID/VID override?

Code: Select all
modinfo plusb
filename:       /lib/modules/2.6.32-5-amd64/kernel/drivers/net/usb/plusb.ko
license:        GPL
description:    Prolific PL-2301/2302 USB Host to Host Link Driver
author:         David Brownell
alias:          usb:v067Bp0001d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v067Bp0000d*dc*dsc*dp*ic*isc*ip*
depends:        usbnet,usbcore
vermagic:       2.6.32-5-amd64 SMP mod_unload modversions


In fact... I may only need the usbnet driver:

Code: Select all
modinfo usbnet
filename:       /lib/modules/2.6.32-5-amd64/kernel/drivers/net/usb/usbnet.ko
license:        GPL
description:    USB network driver framework
author:         David Brownell
depends:        mii,usbcore
vermagic:       2.6.32-5-amd64 SMP mod_unload modversions
parm:           msg_level:Override default message level (int)
kgolding
 
Posts: 17
Joined: Sat Oct 15, 2005 8:48 pm
Location: Surrey

Postby ferrari » Tue Apr 17, 2012 11:28 am

I'm trying to load the plusb (Prolific USB Network) driver on a proprietary device that I am told should work with said driver.


You may not need to do anything explicitly for this device. Plug in your device and post the output of

Code: Select all
dmesg|tail


That will tell us what the kernel makes of it (if anything).

If there is no ethernet device evident, you could try loading the driver manually
Code: Select all
modprobe plusb
ferrari
LXF regular
 
Posts: 142
Joined: Tue May 03, 2005 11:09 am

Postby kgolding » Sat Apr 21, 2012 11:31 pm

Here's the output from dmesg after plugging the USB device in:
[ 87.004106] usb 4-1: new full speed USB device number 2 using uhci_hcd
[ 87.128067] usb 4-1: device descriptor read/64, error -71
[ 87.356082] usb 4-1: device descriptor read/64, error -71
[ 87.572077] usb 4-1: new full speed USB device number 3 using uhci_hcd
[ 87.696123] usb 4-1: device descriptor read/64, error -71
[ 87.924079] usb 4-1: device descriptor read/64, error -71
[ 88.084104] hub 4-0:1.0: unable to enumerate USB device on port 1
[ 91.088101] usb 4-1: new full speed USB device number 5 using uhci_hcd
[ 91.398819] usbcore: registered new interface driver cdc_ether
[ 91.400398] usbcore: registered new interface driver rndis_host
[ 91.401664] usbcore: registered new interface driver rndis_wlan


And this is what lsusb shows (just the one line relating to that device):
Bus 004 Device 005: ID 238b:0a11

I think I need to tell the usbnet driver to recognised the "238b:0a11" id somehow?

Regards,

Kevin
kgolding
 
Posts: 17
Joined: Sat Oct 15, 2005 8:48 pm
Location: Surrey

Postby ferrari » Tue Apr 24, 2012 11:55 pm

Code: Select all
[ 91.398819] usbcore: registered new interface driver cdc_ether
[ 91.400398] usbcore: registered new interface driver rndis_host
[ 91.401664] usbcore: registered new interface driver rndis_wlan

This looks promising. The cdc_ether driver depends on usbnet being loaded anyway. The rndis_host driver depends on cdc_ether, and rndis_wlan depends on rndis_host. You can check what is loaded with
Code: Select all
lsmod |grep rndis


Check what network interface are present
Code: Select all
ifconfig -a
ferrari
LXF regular
 
Posts: 142
Joined: Tue May 03, 2005 11:09 am

Postby kgolding » Wed Apr 25, 2012 12:05 am

Thanks again for the help so far!

lsmod is showing the drivers being loaded, but ifconfig -a is not showing any new interfaces being added.

Is there a way to add an interface and map it to the driver?

Kevin
kgolding
 
Posts: 17
Joined: Sat Oct 15, 2005 8:48 pm
Location: Surrey

Postby ferrari » Wed Apr 25, 2012 8:45 am

lsmod is showing the drivers being loaded, but ifconfig -a is not showing any new interfaces being added.

I'm at the limits of my knowledge here (especially as I don't have such a device to play with).

1. Is your device one of these?

http://linuxusbguide.sourceforge.net/US ... /x540.html

That was the basis for considering the plusb driver. If not, we're probably trying to go upstream without a paddle :P

Otherwise, try loading the plusb driver manually
Code: Select all
modprobe plusb

and check if plusb0 exists with the ifconfig command again.

2. BTW, how are you trying to use this device? The following post hints at this device (driver) only working between two Linux machines

http://www.linuxquestions.org/questions ... ws-699382/

So, I assume you're not trying to plug it into a router for example?

[/url]
ferrari
LXF regular
 
Posts: 142
Joined: Tue May 03, 2005 11:09 am

Postby kgolding » Wed Apr 25, 2012 9:00 am

I think I'm at the upstream, lack of paddle place, and in way over my head!

I've posted a job on oDesk in a bid to get a resolution.

Thank you VERY much for all your help.

Kevin
kgolding
 
Posts: 17
Joined: Sat Oct 15, 2005 8:48 pm
Location: Surrey

Postby ferrari » Wed Apr 25, 2012 9:24 am

I had a quick check of the product and vendor codes here:

http://www.linux-usb.org/usb.ids

You device is not listed. I would have expected the vendor code (238b) to be valid at least. (That doesn't bode well for support with a Linux driver, since the kernel depends on these for device recognition).
ferrari
LXF regular
 
Posts: 142
Joined: Tue May 03, 2005 11:09 am

Postby ferrari » Wed Apr 25, 2012 9:26 am

You're welcome. Good luck!
ferrari
LXF regular
 
Posts: 142
Joined: Tue May 03, 2005 11:09 am

Postby PCNetSpec » Wed Apr 25, 2012 1:30 pm

Have you tried:-

Code: Select all
modprobe plusb
echo 238b 0a11 > /sys/bus/usb/drivers/plusb/new_id


Then re-plugging the device.
WARNING: You are logged into reality as 'root'... logging in as 'insane' is the only safe option.
Linux in the UK
The Linux Community Forum
User avatar
PCNetSpec
LXF regular
 
Posts: 631
Joined: Sun Feb 21, 2010 3:50 pm
Location: Cornwall UK

Postby kgolding » Thu Apr 26, 2012 12:08 am

Thank you for the suggestion. I have now tried that both before plugging the device in, and after plugging in it. Either way ifconfig -a is not showing an extra network interface.

Kevin
kgolding
 
Posts: 17
Joined: Sat Oct 15, 2005 8:48 pm
Location: Surrey

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron