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 email@example.com” 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 firstname.lastname@example.org” 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
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
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:
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..
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:
when it shows up, call the restart
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?
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!