USB Texas Instruments CDCE modem not recognized by cdce

Hans Petter Selasky hselasky at c2i.net
Thu Dec 8 15:57:08 UTC 2011


On Thursday 08 December 2011 16:35:47 Lorenzo Cogotti wrote:
> Il giorno gio, 08/12/2011 alle 15.39 +0100, Hans Petter Selasky ha
> 
> scritto:
> > Typically you need to select configuration 1 for dual RNDIS/CDCE devices
> > to work.
> > 
> > 1) Locate your device:
> > 
> > usbconfig
> > 
> > 2) Set config 1
> > 
> > usbconfig -d X.Y set_config 1
> > 
> > To permanently do this, you can set the configuration index 1 quirk for
> > your device.
> 
> I tried editing if_cdce.c adding to the static array mentioned in my
> first mail:
> 
> {USB_VPI(USB_VENDOR_TI, 0x6060, 0)},
> 
> obviously if this edit is necessary, a nice good little #define for
> 0x6060 should be added where appropriate.
> 
> The device get detected and properly claimed by the cdce module.
> It is all good unless I actually try to connect with:
> dhclient ue0
> 
> When I try this, the DHCP request just hangs and times out.
> 
> I tried usbconfig -d 0.2 set_config 1
> This produces:
> 
> cdce0: at uhub0, port 3, addr 2 (disconnected)
> cdce0: <CDC Ethernet/RNDIS Communication Interface> on usbus0
> ue0: <USB Ethernet> on cdce0
> ue0: Ethernet address: 00:e1:a7:76:76:81
> cdce1: <CDC Ethernet/RNDIS Data Interface> on usbus0
> cdce1: No valid alternate setting found
> device_attach: cdce1 attach returned 6
> cdce1: <CDC Ethernet/RNDIS Data Interface> on usbus0
> cdce1: No valid alternate setting found
> device_attach: cdce1 attach returned 6
> 
> Despite this moltitude of scary messages, dhclient now works good and I
> can surf with my USB modem on FreeBSD, which is as awesome as it sounds.
> 

Hi,

> So, the questions now are:
> 1) was the if_cdce.c edit necessary, or the usbconfig is more than
> enough?

The usbconfig is more than enough.

> 2) how/should could this stuff be made in an automagic way by FreeBSD?
> Since everything I have on this desktop has been detected flawlessly,
> this was the only thing that made me suffer.

The easiest way would be to create a devd config file:

cat << EOF > /usr/local/etc/devd/myusbdevice.conf
notify 100 {
        match "system"          "USB";
        match "subsystem"       "DEVICE";
        match "type"            "ATTACH";
        match "vendor"          "0x0000";
        match "product"          "0x0000";
        action "usbconfig -d $cdev set_config 1"
};
EOF

/etc/rc.d/devd restart

The "vendor" is idVendor and "product" is idProduct. See output from this 
command:

usbconfig -d X.Y dump_device_desc

--HPS


More information about the freebsd-hackers mailing list