CDC_ETHER in Debian 3.8.13-bone70

408 views
Skip to first unread message

Matt99eo

unread,
Apr 15, 2016, 5:47:19 PM4/15/16
to BeagleBoard
Hi,

I am working with a cellular module that requires the linux kernel to have support for theCDC_ETHER USB device class. 

My current kernel version is 3.8.13 (Debian Wheezy verion 7) (I know, its old... but too much invested to change right now).

I believe CDC_ETHER is not supported but I do not know how to tell. 

How do I go about patching this into the kernel?

Thanks in advance

Robert Nelson

unread,
Apr 15, 2016, 5:50:51 PM4/15/16
to Beagle Board, mattmahe...@gmail.com
On Fri, Apr 15, 2016 at 4:47 PM, Matt99eo <mattmahe...@gmail.com> wrote:
Hi,

I am working with a cellular module that requires the linux kernel to have support for theCDC_ETHER USB device class. 

My current kernel version is 3.8.13 (Debian Wheezy verion 7) (I know, its old... but too much invested to change right now).

I believe CDC_ETHER is not supported but I do not know how to tell. 

CONFIG_USB_NET_CDCETHER=y
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_CDC_NCM=y
CONFIG_USB_NET_CDC_MBIM=m



Is that requirement documentation public?


Regards,

--
Robert Nelson
https://rcn-ee.com/

Matt99eo

unread,
Apr 15, 2016, 6:00:37 PM4/15/16
to BeagleBoard, mattmahe...@gmail.com
Hi RC,

I'll check if it is.

Looking at your reply does this mean that CDCETHER is enabled in my kernel version (assuming you are saying it is in there as I see =y)?  Is CDC_ETHER and CDCETHER the same thing?
If it is, why would I not see the device?

The document for the module I am looking claims that it will simply appear when connected on boot in Debian 8.3 (kernel 4.1.15) but is not supported in Debian 7.x (kernel 3.8.x)

Robert Nelson

unread,
Apr 15, 2016, 6:06:42 PM4/15/16
to Beagle Board, mattmahe...@gmail.com
On Fri, Apr 15, 2016 at 5:00 PM, Matt99eo <mattmahe...@gmail.com> wrote:
Hi RC,

I'll check if it is.

Looking at your reply does this mean that CDCETHER is enabled in my kernel version (assuming you are saying it is in there as I see =y)?  Is CDC_ETHER and CDCETHER the same thing?
If it is, why would I not see the device?

The document for the module I am looking claims that it will simply appear when connected on boot in Debian 8.3 (kernel 4.1.15) but is not supported in Debian 7.x (kernel 3.8.x)

Sounds more like, this device's vid/pid has been added to at-least v4.1.15, thus it works out of the box..

git checkout both kernel's and use meld to compare the two drivers..  it's probally just a vid/pid addition..
 

Matt99eo

unread,
Apr 15, 2016, 8:07:05 PM4/15/16
to BeagleBoard, mattmahe...@gmail.com
Sorry for the hand holding but what files am I comparing?

Robert Nelson

unread,
Apr 15, 2016, 8:12:09 PM4/15/16
to Beagle Board, Matt Maher Peterson
On Fri, Apr 15, 2016 at 7:07 PM, Matt99eo <mattmahe...@gmail.com> wrote:
Sorry for the hand holding but what files am I comparing?

Well, for "cellular module"...

./drivers/net/usb/

Regards,

Matt99eo

unread,
Apr 15, 2016, 8:18:17 PM4/15/16
to BeagleBoard, mattmahe...@gmail.com
So I check out each kernel with

git checkout origin/am33x-v4.1 -b tmp_v4.1

Then how do I find the file?  Again sorry for the hand holding...

Matt Maher Peterson

unread,
Apr 15, 2016, 8:36:59 PM4/15/16
to BeagleBoard, mattmahe...@gmail.com

Ok so I built 4.1 with ./build_kernel.sh and now I see the file for the 4.1 kernel

Am I looking in the cdc_ether.c file for my specific device?

Robert Nelson

unread,
Apr 15, 2016, 9:21:44 PM4/15/16
to Beagle Board, Matt Maher Peterson
On Fri, Apr 15, 2016 at 7:36 PM, Matt Maher Peterson <matt.mahe...@hydro-care.com> wrote:

Ok so I built 4.1 with ./build_kernel.sh and now I see the file for the 4.1 kernel

Am I looking in the cdc_ether.c file for my specific device?

We have no idea... "cellular module"...  you need to be more verbose...

Regards,

Matt99eo

unread,
Apr 18, 2016, 11:57:57 AM4/18/16
to BeagleBoard, mattmahe...@gmail.com
Hi RC,

Sorry for the limited information. Just got word the document I am working with is public (attached)

The device I am working with is a Skywire LTE CAT1 Module (Gemalto ELS35).

Here is what the helpful support is telling me:
____

CDC_ETH is a device support class that allows for the modem to act as LAN connection over USB. There isn't a VIP/PID that needs to be added for the kernel to support it, the Kernel needs to be built to support the CDC_ETH class.

When the device is loaded as a CDC_ETH device you will see it enumerate in your system as something like this:

[ 17.900000] cdc_ether 1-1:1.0 usb0: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, 02:10:81:64:89:60
_____

When I use lsusb I don't see the device listed (believe I should see 
Bus 001 Device 001: ID 1d6b:0002)

Does that help?  Thanks again for your help in advance.
CAT1BBBCDC-ECM.pdf

Robert Nelson

unread,
Apr 18, 2016, 12:03:22 PM4/18/16
to Beagle Board, Matt Maher Peterson
On Mon, Apr 18, 2016 at 10:57 AM, Matt99eo <mattmahe...@gmail.com> wrote:
Hi RC,

Sorry for the limited information. Just got word the document I am working with is public (attached)

The device I am working with is a Skywire LTE CAT1 Module (Gemalto ELS35).

Here is what the helpful support is telling me:
____

CDC_ETH is a device support class that allows for the modem to act as LAN connection over USB. There isn't a VIP/PID that needs to be added for the kernel to support it, the Kernel needs to be built to support the CDC_ETH class.

When the device is loaded as a CDC_ETH device you will see it enumerate in your system as something like this:

[ 17.900000] cdc_ether 1-1:1.0 usb0: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, 02:10:81:64:89:60
_____

When I use lsusb I don't see the device listed (believe I should see 
Bus 001 Device 001: ID 1d6b:0002)

That's the root hub: http://www.linux-usb.org/usb.ids

1d6b Linux Foundation
	0001  1.1 root hub
	0002  2.0 root hub
	0003  3.0 root hub
	0100  PTP Gadget
	0101  Audio Gadget
	0102  EEM Gadget
	0103  NCM (Ethernet) Gadget
	0104  Multifunction Composite Gadget
	0105  FunctionFS Gadget
	0200  Qemu Audio Device
run "lsusb" again. ;)
Regards,

Matt99eo

unread,
Apr 18, 2016, 1:37:20 PM4/18/16
to BeagleBoard, mattmahe...@gmail.com
Ok I see it now with lsusb:

lsusb
Bus 001 Device 004: ID 1e2d:00a0 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And in my dmesg log I see it registering:

dmesg |grep cdc_ether
[    0.709427] usbcore: registered new interface driver cdc_ether
[    1.859965] cdc_ether 1-1:1.0: usb_probe_interface
[    1.859981] cdc_ether 1-1:1.0: usb_probe_interface - got id
[    1.885585] cdc_ether 1-1:1.0 usb0: register 'cdc_ether' at usb-musb-hdrc.1.auto-1, CDC Ethernet Device, 02:80:70:00:04:70

What am I missing to establish the Ethernet over USB connection?

Matt99eo

unread,
Apr 20, 2016, 6:31:26 PM4/20/16
to BeagleBoard, mattmahe...@gmail.com
Still working on this and really not sure what my next step is. 

When I plug the module into both my old device running 3.8 and now a new device (just compiled 4.1.21-bone-rt-r20)  I do am not getting a connection.  Tailing the syslog it gets up the poingt of declaring it ttyACM0: USB ACM device but then nothing happens:


[12990.725461] cdc_ether 1-1:1.0 usb0: unregister 'cdc_ether' usb-musb-hdrc.1.auto-1, CDC Ethernet Device
Apr 20 21:28:05 arm kernel: [12990.719975] usb 1-1: USB disconnect, device number 4
Apr 20 21:28:05 arm kernel: [12990.725461] cdc_ether 1-1:1.0 usb0: unregister 'cdc_ether' usb-musb-hdrc.1.auto-1, CDC Ethernet Device
[12993.532521] usb 1-1: new high-speed USB device number 6 using musb-hdrc
Apr 20 21:28:08 arm kernel: [12993.532521] usb 1-1: new high-speed USB device number 6 using musb-hdrc
[12993.823315] usb 1-1: New USB device found, idVendor=1e2d, idProduct=00a0
[12993.830122] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[12993.837381] usb 1-1: Product: SQN
[12993.840731] usb 1-1: Manufacturer: Sequans Communications
[12993.846221] usb 1-1: SerialNumber: 700400708002
Apr 20 21:28:08 arm kernel: [12993.823315] usb 1-1: New USB device found, idVendor=1e2d, idProduct=00a0
Apr 20 21:28:08 arm kernel: [12993.830122] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 20 21:28:08 arm kernel: [12993.837381] usb 1-1: Product: SQN
Apr 20 21:28:08 arm kernel: [12993.840731] usb 1-1: Manufacturer: Sequans Communications
Apr 20 21:28:08 arm kernel: [12993.846221] usb 1-1: SerialNumber: 700400708002
[12993.922298] cdc_ether 1-1:1.0 usb0: register 'cdc_ether' at usb-musb-hdrc.1.auto-1, CDC Ethernet Device, 02:80:70:00:04:70
[12993.942669] cdc_acm 1-1:1.2: ttyACM0: USB ACM device


I have also now taken this module and plugged it hot into my dev desktop computer running ubuntu ( 3.16.0-70-generic #90~14.04.1-Ubuntu )  and it just fires up all the way!  Auto detects and I instantly have an established connection thru the module.

I attached my syslog from when I did this and you see much more going on after ~ line 11 where we have the same ttyACM0: USB ACM device.
syslogPluggedIntoAquaUbuntu

William Hermans

unread,
Apr 20, 2016, 7:00:35 PM4/20/16
to beagl...@googlegroups.com
Do you know how a cdc_ether device works ? Because according to the text you've got there, and the output from dmesg, you should be able to run sudo ifconfig, and see it listed.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/6240b56b-93c7-4739-8920-d40881508721%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Robert Nelson

unread,
Apr 20, 2016, 7:10:30 PM4/20/16
to Beagle Board


On Wed, Apr 20, 2016 at 6:05 PM, Matt Maher Peterson <mat...@apana.com> wrote:
HI William,

I am in over my head here :)  I don't really know how it works. 

All I know at this point is that I see the system seeing and registereing the device but I cannot get it to bring it live on the BBB.

But on my desktop machine running ubuntu 3.16.0-70-generic #90~14.04.1-Ubuntu   it simply registers and then brings and then bring it up.  It just works. However on my BBB it doesn't  ever list it in ifconfig.

On the desktop, it's the network-manager that's usually doing the auto configuration behind the scenes..

Regards,

Matt99eo

unread,
Apr 20, 2016, 7:15:30 PM4/20/16
to BeagleBoard
So how do I get the BBB to take the reins and do configure this bad boy!?

Robert Nelson

unread,
Apr 20, 2016, 7:19:27 PM4/20/16
to Beagle Board
On Wed, Apr 20, 2016 at 6:15 PM, Matt99eo <mattmahe...@gmail.com> wrote:
So how do I get the BBB to take the reins and do configure this bad boy!?

Matt99eo

unread,
Apr 20, 2016, 7:22:59 PM4/20/16
to BeagleBoard
PPP currently not supported the modem MFR.  Hopefully a firmware update coming soon.  In the meantime they have pointed me at cdc_ether.

William Hermans

unread,
Apr 20, 2016, 7:27:56 PM4/20/16
to beagl...@googlegroups.com
What output do you get from:
$ ls /sys/class/net

?

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Matt99eo

unread,
Apr 20, 2016, 7:34:14 PM4/20/16
to BeagleBoard
ls /sys/class/net/
eth0  lo  usb0  usb1

usb0 is usb connection to from host dev machine to BBB
USB1 is the module

William Hermans

unread,
Apr 20, 2016, 7:39:39 PM4/20/16
to beagl...@googlegroups.com
For instance:

william@beaglebone:~$ ls /sys/class/net
eth0  lo
william@beaglebone:~$ sudo modprobe g_ether

william@beaglebone:~$ ls /sys/class/net
eth0  lo  usb0

william@beaglebone:~$ sudo ifconfig
 . . .
usb0      Link encap:Ethernet  HWaddr 7e:68:32:bc:58:89
          inet addr:192.168.7.2  Bcast:192.168.7.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:1 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76 (76.0 B)  TX bytes:0 (0.0 B)


However, I've no idea how your device is meant to be used once it's connected a an USBNET device. And now you've just posted, and you've got a problem.

You're connected to your beaglebone via USB too which may cause problems. You're only allowed to use one instance of a gadget driver, total. So you can not use USB serial, or USB networkign to the beaglebone in order for your device to work. You're going power via barrel jack, connect to the beaglebone over the ethernet port. *OR* if you want to still power via USB, you're going to have to figure out how to disable the USB gadget drivers for the beaglebone, while still having it available for your external device. I did notice you had TTYACM0 enabled so that'll definitely have to go away.


William Hermans

unread,
Apr 20, 2016, 7:41:40 PM4/20/16
to beagl...@googlegroups.com
And sorry . .

william@beaglebone:~$ sudo ifconfig usb0 192.168.7.2
THEN

william@beaglebone:~$ sudo ifconfig
. . .

usb0      Link encap:Ethernet  HWaddr 7e:68:32:bc:58:89
          inet addr:192.168.7.2  Bcast:192.168.7.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:1 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76 (76.0 B)  TX bytes:0 (0.0 B)



William Hermans

unread,
Apr 20, 2016, 7:43:03 PM4/20/16
to beagl...@googlegroups.com
@Robert, my brain is mostly fried today . . . is there a way for him to use g_multi, so he can have his TTYACM0, but disable the boards USB ethernet so his device can use the cdc driver ?

Matt99eo

unread,
Apr 20, 2016, 7:50:08 PM4/20/16
to BeagleBoard
I was wondering about multiple usb connections...

So here is thing though.  I am now ssh'd into the device over ethernet. I see the usbo with ifconfig:

ifconfig
eth0      Link encap:Ethernet  HWaddr 78:a5:04:f8:61:5e 
          inet addr:10.1.2.169  Bcast:10.1.2.255  Mask:255.255.255.0
          inet6 addr: fe80::7aa5:4ff:fef8:615e/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:881 errors:0 dropped:9 overruns:0 frame:0
          TX packets:282 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:87981 (85.9 KiB)  TX bytes:37544 (36.6 KiB)
          Interrupt:40

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 02:80:70:00:04:70 
          inet addr:192.168.7.2  Bcast:192.168.7.255  Mask:255.255.255.0
          inet6 addr: fe80::80:70ff:fe00:470/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:5387 (5.2 KiB)


But now how do I test I am connected out that way instead of over the ethernet cable lol?

At the end of the day I want these devices to talk out the cell module to cloud servers and be able to acess them in the field via ssh.  I have statically provisioned SIM cards so I can get to them.

William Hermans

unread,
Apr 20, 2016, 7:53:41 PM4/20/16
to beagl...@googlegroups.com
usb1 is probably your external device. But you can find out via dmesg by issuing . .

$ dmesg | grep usb1

And using deductive reasoning. But also, once you get your cdc device working, I do not know how it's meant to be used. Robert Suggested pppd which suggests to me it's meant to be used a some sort of modem ?

Matt99eo

unread,
Apr 20, 2016, 7:54:09 PM4/20/16
to BeagleBoard
I can see thru route that I am getting out over my wired LAN:

route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         my.meraki.net   0.0.0.0         UG    0      0        0 eth0
10.1.2.0        *               255.255.255.0   U     0      0        0 eth0
192.168.7.0     *               255.255.255.0   U     0      0        0 usb0

Matt99eo

unread,
Apr 20, 2016, 8:07:48 PM4/20/16
to BeagleBoard
Yes it is a modem

http://nimbelink.com/skywire-4g-lte-cat-1/

They do not have firmware yet that supports pppd.  I use ppp for other modems that do support it and that works this guys is just different (until firmware is baked). 

William Hermans

unread,
Apr 20, 2016, 9:11:14 PM4/20/16
to beagl...@googlegroups.com
You need to comment out the USB0 lines in /etc/network/interfaces, and then the device will automatically come up

Matt99eo

unread,
Apr 21, 2016, 11:36:51 AM4/21/16
to BeagleBoard
Yep I read that and here is my /network/interfaces

root@arm:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback
 
#auto eth0
#iface eth0 inet dhcp

Matt99eo

unread,
Apr 22, 2016, 2:06:08 PM4/22/16
to BeagleBoard
Got the device to give me a connection to the outside world on the new kernel (4.1.21-bone-rt-r20, running Debian 8)

Had to add

auto usb0
iface usb0 inet dhcp

I now have a connection out.  This modem in effect now is acting like a router.  I have LAN address and not a WAN so I can't ssh back to device from outside world.  Working on that now.
Reply all
Reply to author
Forward
0 new messages