Ethernet over USB works only after plugging in the eth cable

77 views
Skip to first unread message

rog...@gmail.com

unread,
Apr 15, 2017, 9:51:44 PM4/15/17
to BeagleBoard
Hi,

I'm having an issue with connection to my BBBI over USB. I have installed today a new system on the board - Ubuntu 16.04.2 with 4.9.21-ti-rt-r29 kernel. I've been following the steps from here: https://eewiki.net/display/linuxonarm/BeagleBone+Black

Now, that my system is flashed to eMMC and (almost) ready to use, I have a strange issue with USB connection. When I plug in my USB cable and connect host PC with BBB, after ~30s of booting, my host finally gives me an announcement that new wired connection was made. Then when I try "ssh ubu...@192.168.7.2" connection gets refused... Now the funny thing is that when I plug in an ethernet cable to BBB, after few seconds I can try again with "ssh ubu...@192.168.7.2" and then it works - until the next boot...

I have copied beaglebone-black-g-ether-load.sh script to my beaglebone and am calling it from /etc/rc.local (whose settings I have changed to be called after file system is initialized, not as it was set up previously after network interfaces are up - then I had even worse situation where I have been getting connection timeouts instead of refusal)

I'm out of ideas... I'll appreciate every hint. Below some basic commands outputs:
ubuntu@arm:~$ uname -a
Linux arm 4.9.21-ti-rt-r29 #1 SMP PREEMPT RT Sat Apr 15 00:04:36 CEST 2017 armv7l armv7l armv7l GNU/Linux




Regards

Robert Nelson

unread,
Apr 15, 2017, 11:15:05 PM4/15/17
to Beagle Board, rog...@gmail.com
Your fight the built-in script that does network setup, i should
probally disable that for the eewiki.net builds:

sudo systemctl stop generic-board-startup.service
sudo systemctl disable generic-board-startup.service

Regards,

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

Igor Jędrzejczak

unread,
Apr 16, 2017, 8:12:33 AM4/16/17
to BeagleBoard
Thank you Robert for a quick answer. Unfortunately disabling that script didn't help and I still have to plug int eth cable in order to 'unlock' ethernet over USB.

I had an idea, that maybe setting eth to allow-hotplug instead of auto in /etc/network/interfaces might help, but did only for one boot - later the system needed 90s to shut down, and when booted again I couldn't connect through USB anymore...

When should I actually run bbb-eMMC-flasher-eewiki-ext4.sh? I tried:
- from rc.local with settings After=network.target in /etc/systemd/system/rc-local.service and After=network-online.target in /etc/systemd/system/rc-local.service.d/debian.conf
- from rc.local with settings After=network.target in /etc/systemd/system/rc-local.service and After=network.target in /etc/systemd/system/rc-local.service.d/debian.conf
- from rc.local with settings After=local-fs.target in /etc/systemd/system/rc-local.service and After=local-fs.target.target in /etc/systemd/system/rc-local.service.d/debian.conf

How about setting usb0 to auto in /etc/network/interfaces?

It seems to me, that either ssh or USB0 gets up only after plugging ethernet cable...

Journal output after disabling generic service:

Regards

Igor Jędrzejczak

unread,
Apr 16, 2017, 9:01:39 AM4/16/17
to BeagleBoard
One message from journal which I don't know what actually means: "is interface usb0 up and configured?: Cannot assign requested address". Does that mean, that bbb-eMMC-flasher-eewiki-ext4.sh is called too early?

Robert Nelson

unread,
Apr 16, 2017, 5:12:27 PM4/16/17
to Beagle Board
On Sun, Apr 16, 2017 at 8:01 AM, Igor Jędrzejczak <rog...@gmail.com> wrote:
> One message from journal which I don't know what actually means: "is
> interface usb0 up and configured?: Cannot assign requested address". Does
> that mean, that bbb-eMMC-flasher-eewiki-ext4.sh is called too early?

"bbb-eMMC-flasher-eewiki-ext4.sh" wrong script..

Yes, just restart dnsmasq/udchpd/etc. it needs to wait till usb0 is up..

Igor Jędrzejczak

unread,
Apr 16, 2017, 5:17:41 PM4/16/17
to BeagleBoard
Yup, I pasted wrong script name, but meant beaglebone-black-g-ether-load.sh

When should I restart dnsmasq/udchpd/etc?

Igor Jędrzejczak

unread,
Apr 16, 2017, 5:26:06 PM4/16/17
to BeagleBoard
What I'm trying to do is to configure my BBB so, that when I boot it, ethernet over USB gets configured automatically so that I wouldn't have to use ethernet cable at all, just USB. And udchcpd gets restarted after beaglebone-black-g-ether-load.sh is done, isn't it?

Robert Nelson

unread,
Apr 16, 2017, 5:26:11 PM4/16/17
to Beagle Board
On Sun, Apr 16, 2017 at 4:17 PM, Igor Jędrzejczak <rog...@gmail.com> wrote:
> Yup, I pasted wrong script name, but meant beaglebone-black-g-ether-load.sh
>
> When should I restart dnsmasq/udchpd/etc?

i do a loop on:

/sys/class/net/usb0/

when it shows up, call the restart

Igor Jędrzejczak

unread,
Apr 16, 2017, 6:32:16 PM4/16/17
to BeagleBoard
Yupi, it works!
Had to put this into rc.local: https://pastebin.com/R3rUc5rx
It was ssh that was getting up too early.

Thanks a lot for your help Robert!

Regards
Reply all
Reply to author
Forward
0 new messages