CDC_ETHER in Debian 3.8.13-bone70

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.

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)

@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 ?

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.

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 ?

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

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).

well according to this: http://nimbelink.com/appnotes/CAT1CDC-ECM-Application_Note.pdf

You need to comment out the USB0 lines in /etc/network/interfaces, and then the device will automatically come up

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

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.