BBB SD card Debian 8.1 console image (29-06-15) will not start RNDIS, but lxqt image will

Hi,

I have created SD card images from the June 29th debian 8.1 images for both console and lxqt.

With the lxqt image I was successfully getting a linux machine to create an new interface eth1with address 192.168.7.1 when USB was connected.

I know that the console image is stripped down and that in the March 2015 image it was necessary to install udhcpd and then update to the latest boot-scripts to get it to work.
I tried this on the 29th June console image but with no success. The boot-scripts were actually at the latest version when I did git pull.

Is there another component missing in the Debian 8.1 console image?
Thanks, Iain

Actually anything after June 16 has udhcpd installed by default for
the console image....

https://github.com/RobertCNelson/omap-image-builder/commit/1b2d8ece564f5fb708e8139ee40db05691cc3e03

I'll dl and check, as something is going on..

Regards,

So on the bbb: (journalctl -f)

Jun 29 07:36:23 beaglebone sh[275]: generic-board-startup: [startup
script=/opt/scripts/boot/am335x_evm.sh]
Jun 29 07:36:24 beaglebone kernel: using random self ethernet address
Jun 29 07:36:24 beaglebone kernel: using random host ethernet address
Jun 29 07:36:24 beaglebone kernel: using host ethernet address:
54:4A:16:BB:AE:0B
Jun 29 07:36:24 beaglebone kernel: using self ethernet address:
54:4A:16:BB:AE:00
Jun 29 07:36:24 beaglebone kernel: usb0: HOST MAC 54:4a:16:bb:ae:0b
Jun 29 07:36:24 beaglebone kernel: usb0: MAC 54:4a:16:bb:ae:00
Jun 29 07:36:24 beaglebone kernel: using random self ethernet address
Jun 29 07:36:24 beaglebone kernel: using random host ethernet address
Jun 29 07:36:24 beaglebone kernel: g_ether gadget: Ethernet Gadget,
version: Memorial Day 2008
Jun 29 07:36:24 beaglebone kernel: g_ether gadget: g_ether ready
Jun 29 07:36:24 beaglebone kernel: g_ether gadget: high-speed config
#1: CDC Ethernet (ECM)

on the x86:

[14634.248639] usb 1-1.2: new high-speed USB device number 4 using ehci-pci
[14634.341396] usb 1-1.2: New USB device found, idVendor=0525, idProduct=a4a2
[14634.341403] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[14634.341407] usb 1-1.2: Product: BeagleBoneBlack
[14634.341410] usb 1-1.2: Manufacturer: Circuitco
[14634.341413] usb 1-1.2: SerialNumber: 0C-000C2115BBBK
[14634.409956] cdc_subset: probe of 1-1.2:1.0 failed with error -22
[14634.410766] cdc_subset 1-1.2:1.1 usb0: register 'cdc_subset' at
usb-0000:00:12.2-1.2, Linux Device, aa:a0:be:c6:fb:91
[14634.410936] usbcore: registered new interface driver cdc_subset
[14634.416672] cdc_ether: probe of 1-1.2:1.0 failed with error -16
[14634.416714] usbcore: registered new interface driver cdc_ether
[14634.424461] cdc_subset 1-1.2:1.1 usb0: kevent 12 may have been dropped

Other then my usb3.0 hub acting up again and dropping the connection
everything seems to be in spec..

Regards,

Thanks Robert,
What I saw on the x86 was that eth1 was successfully brought up - all it missed was an IP address. So “ifconfig eth1” had MAC address etc, just no address.
Thanks, Iain

sudo dhclient eth1

should bring it up, not sure why with g_ether it's not automatic like,
g_multi...

Regards,

sudo dhclient eth1

should bring it up, not sure why with g_ether it’s not automatic like,
g_multi…

I like that g_multi needs manual configuration personally. Dislike it when stuff like network managers etc think they’re smarter than me . . .

Anyway Robert, perhaps g_multi loads earlier during the boot process ? Perhaps a systemd “after” clause ? shrug I would not know how to test it, otherwise I would.

We load g_ether/g_multi with the exact settings:

https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh#L132

(minus the file stuff for the usb-flash..)

It's an issue on the host x86 pc, you need to run dhclient or hope
network-manager figures it out..

Regards,

We load g_ether/g_multi with the exact settings:

https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh#L132

(minus the file stuff for the usb-flash…)

It’s an issue on the host x86 pc, you need to run dhclient or hope network-manager figures it out…

Regards,

Ah, I see. Welp, since I’m a control freak in this case, it never effects me. As I set all my own IPs on our network statically, and manually. Including g_multi → system it is connected to.

See this gets fun with systemd 220 on debian stretch:

[27838.312821] usb 1-1.2: new high-speed USB device number 9 using ehci-pci
[27838.405588] usb 1-1.2: New USB device found, idVendor=0525,
idProduct=a4a2
[27838.405593] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[27838.405595] usb 1-1.2: Product: BeagleBoneBlack
[27838.405597] usb 1-1.2: Manufacturer: Circuitco
[27838.405598] usb 1-1.2: SerialNumber: 0C-2115BBBK0347
[27838.406274] cdc_subset: probe of 1-1.2:1.0 failed with error -22
[27838.406966] cdc_ether 1-1.2:1.0 eth0: register 'cdc_ether' at
usb-0000:00:12.2-1.2, CDC Ethernet Device, 54:4a:16:bb:ae:0b
[27838.432105] cdc_ether 1-1.2:1.0 enx544a16bbae0b: renamed from eth0
[27838.474646] cdc_ether 1-1.2:1.0 enx544a16bbae0b: kevent 12 may have been
dropped

enx544a16bbae0b Link encap:Ethernet HWaddr 54:4a:16:bb:ae:0b
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:536 (536.0 B) TX bytes:1368 (1.3 KiB)

Where sudo dhclient enx544a16bbae0b is failing for me.. and the
gui-network-manager doesn't want to connect as it's already using eth0..

hummm...

Regards,

No way to force g_ether to ethx depending on whether ethernet is connected or not ? Hack ?

Nope, that's debian's systemd in stretch/testing (9)..

systemd (220-7) unstable; urgency=medium

  [ Martin Pitt ]
  * Switch to net.ifnames persistant network interfaces (on new
    installations/for new hardware), and deprecate the old

"Proposal: enable stateless persistant network interface names"

https://lists.debian.org/debian-devel/2015/05/msg00170.html

Regards,

apt-get install sysv && apt-get remove --purge systemd :wink:

Or just wait for them to iron it out hehe . . .yeah.

Robert,
I now have the console image working with usb over ethernet with both Linux and Windows PCs.

The change I had to make was to remove udhcpd and its conf files and then install dnsmasq

#apt-get remove udhcpd
#rm /etc/default/udhcp*
#apt-get install dnsmasq

#reboot

This change then makes /opt/scripts/boot/autoconfigure_usb0.sh in the console image follow same path as LXQT image.

Thanks,
Iain

Robert,

A further update. I can now get the udhcpd implementation to work on console image by applying a patch to /opt/scripts/boot/autoconfigure_usb.sh. Patch is simply to use standard location for updated udhcpd.conf rather than a /tmp one.

I’m assuming there was a reason that this was done. I found it when I realised that https:``//[raw.github.com/RobertCNelson/tools/master/scripts/beaglebone-black-g-ether-load.sh](http://raw.github.com/RobertCNelson/tools/master/scripts/beaglebone-black-g-ether-load.sh) worked.

Iain

0001-use-standard-location-for-udhcpd.conf.patch (852 Bytes)

Thanks applied, i'll keep on debuggin the /tmp/ location for ro users,
but till then i applied your patch!

Regards,