BeagleBone: Debian: USB networking

Has anyone managed to get USB networking to work between a BeagleBone
running Debian and a PC running Debian.

I get a usb0 network device at the BeagleBone end, but nothing at the
host end.

Do I need to do the usb_modeswitch and disable the block device to
get the USB ethernet to work?

David

Has anyone managed to get USB networking to work between a BeagleBone
running Debian and a PC running Debian.

I get a usb0 network device at the BeagleBone end, but nothing at the
host end.

Are you sure? Which kernel version?

I'm seeing (host):

[15431.840648] usb 4-3.1: new high-speed USB device number 13 using ehci_hcd
[15431.952099] usb 4-3.1: New USB device found, idVendor=0525, idProduct=a4a2
[15431.952108] usb 4-3.1: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[15431.952115] usb 4-3.1: Product: RNDIS/Ethernet Gadget
[15431.952121] usb 4-3.1: Manufacturer: Linux 3.1.6-x6 with musb-hdrc
[15432.181631] cdc_eem 4-3.1:1.0: usb0: register 'cdc_eem' at
usb-0000:00:1a.7-3.1, CDC EEM Device, ae:16:d1:43:57:dd
[15432.181729] usbcore: registered new interface driver cdc_eem
[15432.185420] usbcore: registered new interface driver cdc_subset

via: ifconfig -a
usb0 Link encap:Ethernet HWaddr ae:16:d1:43:57:dd
          inet6 addr: fe80::ac16:d1ff:fe43:57dd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1494 Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5550 (5.5 KB) TX bytes:7288 (7.2 KB)

Do I need to do the usb_modeswitch and disable the block device to
get the USB ethernet to work?

i've always had good luck with this:

http://wiki.openmoko.org/wiki/USB_Networking

Regards,

> Has anyone managed to get USB networking to work between a BeagleBone
> running Debian and a PC running Debian.
>
> I get a usb0 network device at the BeagleBone end, but nothing at the
> host end.

Are you sure? Which kernel version?

3.1.6-486

Do I have to do the usb_modeswitch bit?

I'm seeing (host):

[15431.840648] usb 4-3.1: new high-speed USB device number 13 using
ehci_hcd [15431.952099] usb 4-3.1: New USB device found, idVendor=0525,
idProduct=a4a2 [15431.952108] usb 4-3.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
[15431.952115] usb 4-3.1: Product: RNDIS/Ethernet Gadget
[15431.952121] usb 4-3.1: Manufacturer: Linux 3.1.6-x6 with musb-hdrc
[15432.181631] cdc_eem 4-3.1:1.0: usb0: register 'cdc_eem' at
usb-0000:00:1a.7-3.1, CDC EEM Device, ae:16:d1:43:57:dd
[15432.181729] usbcore: registered new interface driver cdc_eem
[15432.185420] usbcore: registered new interface driver cdc_subset

via: ifconfig -a
usb0 Link encap:Ethernet HWaddr ae:16:d1:43:57:dd
          inet6 addr: fe80::ac16:d1ff:fe43:57dd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1494 Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5550 (5.5 KB) TX bytes:7288 (7.2 KB)

> Do I need to do the usb_modeswitch and disable the block device to
> get the USB ethernet to work?

i've always had good luck with this:

http://wiki.openmoko.org/wiki/USB_Networking

I will have a look

David

> I get a usb0 network device at the BeagleBone end, but nothing at the
> host end.

Are you sure? Which kernel version?

3.1.6-486

Sorry, ment, what version is your beagle running.. :wink:

Do I have to do the usb_modeswitch bit?

I'm seeing (host):

[15431.840648] usb 4-3.1: new high-speed USB device number 13 using
ehci_hcd [15431.952099] usb 4-3.1: New USB device found, idVendor=0525,
idProduct=a4a2 [15431.952108] usb 4-3.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
[15431.952115] usb 4-3.1: Product: RNDIS/Ethernet Gadget
[15431.952121] usb 4-3.1: Manufacturer: Linux 3.1.6-x6 with musb-hdrc
[15432.181631] cdc_eem 4-3.1:1.0: usb0: register 'cdc_eem' at
usb-0000:00:1a.7-3.1, CDC EEM Device, ae:16:d1:43:57:dd
[15432.181729] usbcore: registered new interface driver cdc_eem
[15432.185420] usbcore: registered new interface driver cdc_subset

via: ifconfig -a
usb0 Link encap:Ethernet HWaddr ae:16:d1:43:57:dd
inet6 addr: fe80::ac16:d1ff:fe43:57dd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1494 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5550 (5.5 KB) TX bytes:7288 (7.2 KB)

> Do I need to do the usb_modeswitch and disable the block device to
> get the USB ethernet to work?

i've always had good luck with this:

http://wiki.openmoko.org/wiki/USB_Networking

I will have a look

David

Regards,

>> > I get a usb0 network device at the BeagleBone end, but nothing at the
>> > host end.
>>
>> Are you sure? Which kernel version?
>
> 3.1.6-486

Sorry, ment, what version is your beagle running.. :wink:

uname -a give me:-

Linux beaglebone 3.1.0-psp2 #1 SMP Tue Nov 29 04:55:02 UTC 2011 armv7l
GNU/Linux

David

Oh and BTW in case anyone else hits it, there is a bug in the current
host linux kernel which can sometimes cause a kernel OOPS when you plug
in your BeagleBone. It happens when processing the second of the udev
rules, the one which tells the ftdi serial driver about the USB ID of
the BeagleBone, and there is a fix which works, although there is currently
debate on the USB mailing list about whether it is the right fix,

David

Linux beaglebone 3.1.0-psp2 #1 SMP Tue Nov 29 04:55:02 UTC 2011 armv7l
GNU/Linux

Crap, sorry i missed that earlier, (completely misred that your on the
BeagleBone)...

usb0 shows up because, it's using the same config that i use for my
mainline kernel for the beagleboard/panda/etc.. So..

https://github.com/RobertCNelson/linux-dev/blob/am33x-v3.1/patches/defconfig#L3175

CONFIG_USB_ETH=y is enabled, but on the beaglebone, there's no where
for that to go..

Oh and BTW in case anyone else hits it, there is a bug in the current
host linux kernel which can sometimes cause a kernel OOPS when you plug
in your BeagleBone. It happens when processing the second of the udev
rules, the one which tells the ftdi serial driver about the USB ID of
the BeagleBone, and there is a fix which works, although there is currently
debate on the USB mailing list about whether it is the right fix,

Yeap, i've read that thread. I've been using, and haven't seen the issue..

https://github.com/RobertCNelson/linux/commit/fa086b75cfe13a725102fb157a27ce4b30fcfc48

With the upcoming merge, i need to submit it to linux-usb..

Regards,

>>Linux beaglebone 3.1.0-psp2 #1 SMP Tue Nov 29 04:55:02 UTC 2011 armv7l
>>GNU/Linux

Crap, sorry i missed that earlier, (completely misred that your on the
BeagleBone)...

usb0 shows up because, it's using the same config that i use for my
mainline kernel for the beagleboard/panda/etc.. So..

https://github.com/RobertCNelson/linux-dev/blob/am33x-v3.1/patches/defconfi
g#L3175

CONFIG_USB_ETH=y is enabled, but on the beaglebone, there's no where
for that to go..

Well thats the problem. The Debian standard kernels do not seem to have
CONFIG_USB_ETH set. I will place a request on the relevant mailing list.

David

>>Linux beaglebone 3.1.0-psp2 #1 SMP Tue Nov 29 04:55:02 UTC 2011 armv7l
>>GNU/Linux

Crap, sorry i missed that earlier, (completely misred that your on the
BeagleBone)...

usb0 shows up because, it's using the same config that i use for my
mainline kernel for the beagleboard/panda/etc.. So..

https://github.com/RobertCNelson/linux-dev/blob/am33x-v3.1/patches/defconfi
g#L3175

CONFIG_USB_ETH=y is enabled, but on the beaglebone, there's no where
for that to go..

Now I am confused.

usb0 appears at the bone end but not the host end. Looking at the config
file in /boot USB_ETH is not set for standard Debian kernels, but I am
unsure having looked a the code whether this is actually only needed at
the gadget (i.e. bone) end or whether it is needed at the host end too.

I am also unsure what you mean when you say that on the bone "there's no
where for that to go". Surely if it is a linux kernel it is the same
as a beagleboard. Or am I being thick (which is quite probable)?

David

On the beaglebone, there's only a usb host connector, where usb
connectivity is controlled by the musb driver.. The musb driver can be
configured as: host, device, otg.. (on the beagleboard, it's usually
configured as otg, and it's the small otg connector..)

So without desoldering/modifing cables/or using usb gender changer
cables, the "usb0 device" on the bone is looking to connect to a usb
host on a 2nd device..

Regards,

>> >>Linux beaglebone 3.1.0-psp2 #1 SMP Tue Nov 29 04:55:02 UTC 2011 armv7l
>> >>GNU/Linux
>>
>> Crap, sorry i missed that earlier, (completely misred that your on the
>> BeagleBone)...
>>
>> usb0 shows up because, it's using the same config that i use for my
>> mainline kernel for the beagleboard/panda/etc.. So..
>>
>> https://github.com/RobertCNelson/linux-dev/blob/am33x-v3.1/patches/defco
>> nfi g#L3175
>>
>> CONFIG_USB_ETH=y is enabled, but on the beaglebone, there's no where
>> for that to go..
>
> Now I am confused.
>
> usb0 appears at the bone end but not the host end. Looking at the config
> file in /boot USB_ETH is not set for standard Debian kernels, but I am
> unsure having looked a the code whether this is actually only needed at
> the gadget (i.e. bone) end or whether it is needed at the host end too.
>
> I am also unsure what you mean when you say that on the bone "there's no
> where for that to go". Surely if it is a linux kernel it is the same
> as a beagleboard. Or am I being thick (which is quite probable)?

On the beaglebone, there's only a usb host connector, where usb
connectivity is controlled by the musb driver.. The musb driver can be
configured as: host, device, otg.. (on the beagleboard, it's usually
configured as otg, and it's the small otg connector..)

My BeagleBone has two USB connectors. One which is for connecting to the
host and has the power and serial/jtag and USB storage and ethernet one (the
one by the ethernet port) and one which is a Host (at the other end of the
board)into which keyboards/usb storage/wifi/hubs/whatever can be plugged.

I am talking about the connection to the host. Are you saying that its
driver can not support ethernet over USB?

David

My BeagleBone has two USB connectors. One which is for connecting to the
host and has the power and serial/jtag and USB storage and ethernet one (the
one by the ethernet port) and one which is a Host (at the other end of the
board)into which keyboards/usb storage/wifi/hubs/whatever can be plugged.

I am talking about the connection to the host. Are you saying that its
driver can not support ethernet over USB?

I stand corrected..
BeagleBoard.org - Page not found (page 22) I did not
know usb0 was connected to that connector.. (i just assumed usb1 to
the host was the only active connection..)

Regards,

On Bone, lsusb before and after shows three devices..

Bus 003 Device 014: ID 0525:c0de Netchip Technology, Inc. -> usb0
Bus 003 Device 013: ID 0403:a6d0 Future Technology Devices
International, Ltd -> serial/jtag
Bus 003 Device 012: ID 0424:2412 Standard Microsystems Corp. -> internal hub..

http://paste.ubuntu.com/792809/

According to dmesg: my kernel's having issues with: 0525:c0de

[ 5495.004198] usb 3-3.1.2: new high-speed USB device number 14 using ehci_hcd
[ 5495.096816] usb 3-3.1.2: unable to read config index 0 descriptor/start: -32
[ 5495.096821] usb 3-3.1.2: chopping to 0 config(s)
[ 5495.096824] usb 3-3.1.2: New USB device found, idVendor=0525, idProduct=c0de
[ 5495.096826] usb 3-3.1.2: New USB device strings: Mfr=0, Product=0,
SerialNumber=0
[ 5495.096945] usb 3-3.1.2: no configuration chosen from 0 choices

So no usb0 on x86 host.. Trying a couple things in the kernel source
right now..

Regards,

Hello,

Sorry to resurrect this old thread, but I’m running Debian on the Beaglebone Black (3.8.13-bone28), and am not seeing the the ‘debug’ USB device on the BBB.

If this is simply something that has not been implemented then NP. But if there is someway to activate I’d been interested in finding out.

Looking at the kernel .config the setting described earlier in this thread is configured as: CONFIG_USB_ETH=m

Below is my dmesg output filtered for ‘usb’:

debian@arm:~$ dmesg | grep usb
[ 0.154355] usbcore: registered new interface driver usbfs
[ 0.154467] usbcore: registered new interface driver hub
[ 0.154797] usbcore: registered new device driver usb
[ 1.646463] usbcore: registered new interface driver cdc_ether
[ 1.652718] usbcore: registered new interface driver rndis_host
[ 1.659126] usbcore: registered new interface driver cdc_ncm
[ 1.665920] usbcore: registered new interface driver cdc_acm
[ 1.685532] usbcore: registered new interface driver usb-storage
[ 1.696880] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 1.703609] musb-hdrc musb-hdrc.0.auto: pdev->id = 0
[ 1.708865] musb-hdrc musb-hdrc.0.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
[ 1.717645] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 1.717665] musb-hdrc: MHDRC RTL version 2.0
[ 1.717680] musb-hdrc: setup fifo_mode 4
[ 1.717707] musb-hdrc: 28/31 max ep, 16384/16384 memory
[ 1.717906] musb-hdrc musb-hdrc.0.auto: *** mode=3
[ 1.722953] musb-hdrc musb-hdrc.0.auto: *** power=250
[ 1.728966] musb-hdrc musb-hdrc.1.auto: pdev->id = 1
[ 1.734230] musb-hdrc musb-hdrc.1.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
[ 1.743012] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 1.743031] musb-hdrc: MHDRC RTL version 2.0
[ 1.743045] musb-hdrc: setup fifo_mode 4
[ 1.743067] musb-hdrc: 28/31 max ep, 16384/16384 memory
[ 1.743238] musb-hdrc musb-hdrc.1.auto: *** mode=1
[ 1.748282] musb-hdrc musb-hdrc.1.auto: *** power=250
[ 1.753594] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.760016] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.768282] musb-hdrc musb-hdrc.1.auto: supports USB remote wakeup
[ 1.768403] usb usb1: default language 0x0409
[ 1.768462] usb usb1: udev 1, busnum 1, minor = 0
[ 1.768485] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.775625] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.783200] usb usb1: Product: MUSB HDRC host driver
[ 1.788420] usb usb1: Manufacturer: Linux 3.8.13-bone28 musb-hcd
[ 1.794723] usb usb1: SerialNumber: musb-hdrc.1.auto
[ 1.800700] usb usb1: usb_probe_device
[ 1.800729] usb usb1: configuration #1 chosen from 1 choice
[ 1.800799] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[ 1.801006] hub 1-0:1.0: usb_probe_interface
[ 1.801028] hub 1-0:1.0: usb_probe_interface - got id
[ 1.912044] usb usb1: bus auto-suspend, wakeup 1
[ 2.035218] usbcore: registered new interface driver usbhid
[ 2.041134] usbhid: USB HID core driver

Regards,
Andrew.

The BBB pcb does not contain the "ftdi usb-serial" adapter found on
the original BeagleBone.. Intead there is a 5 pin 3.3v header for
serial access.

Regards,

Sorry Robert, by debug I meant the USB network device, which does appear on the ubuntu build but not debian.

I’ve since learnt how to use nmap to find the ssh server on the standard ethernet connection (something to the affect of ‘nmap -p 22 --open -sV 192.168.7.0/24’), so this is no longer an issue - initially (using ubuntu) it was really useful having the ‘known’ ip address to ssh into.

Regards,
Andrew.