You need to replace the “iface eth0 inet dhcp” line with hard-coded settings for your IP address, gateway, and DNS servers, although I’ve quit Angstrom, compared to Ubuntu, i found many plus points instead of long road around, but all ways goes to Rome, you can find the Default settings is
I believe that would be specified in /etc/network/interfaces. Angstrom on the BeagleBone doesn’t have that file.
OK, figured it out. The usb0 interface is not configured using connman like eth0 is. It’s configured using udev.
In /etc/udev/rules.d is a file udhcpd.rules. This file contains the rules for what actions to perform when usb0 gets plugged in and when it’s unplugged.
The contents are:
SUBSYSTEM==“net”,ACTION==“add”,KERNEL==“usb0”,RUN+="/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252",RUN+="/bin/systemctl start udhcpd.service"
SUBSYSTEM==“net”,ACTION==“remove”,KERNEL==“usb0”,RUN+="/bin/systemctl stop udhcpd.service"
You can see from line 1 where the static IP address of 192.168.7.2 is assigned and also where the DHCP server is started.
Line 2 stops the DHCP server when usb0 is unplugged.
For my purposes I removed the command to start DHCP (i.e. removed RUN+="/bin/systemctl start udhcpd.service") and deleted line 2.
I then changed the IP address from 192.168.7.2 to my desired IP address as well as the netmask.
Voila, usb0 is now a simple static IP address of my choosing with no frills.
Hi Steve,
I followed your exact instructions but my usb0 interface is still getting the 192.168.7.2 address. No clue how to modify this. I even tried to remove this udhcpd.rules but nothing.
Actually i’d like to remove this interface totally because i think the usb-over-ethernet is causing the kernel to crash
root@beaglebone:/var/lib/connman# [ 600.197574] INFO: task systemd-udevd:346 blocked for more than 60 seconds.
[ 600.204837] “echo 0 > /proc/sys/kernel/hung_task_timeout_secs” disables this message.
[ 600.213115] Kernel panic - not syncing: hung_task: blocked tasks
[ 600.219439] [] (unwind_backtrace+0x1/0x8c) from [] (panic+0x55/0x14c)
[ 600.228011] [] (panic+0x55/0x14c) from [] (watchdog+0x153/0x1a0)
[ 600.236129] [] (watchdog+0x153/0x1a0) from [] (kthread+0x61/0x72)
[ 600.244336] [] (kthread+0x61/0x72) from [] (ret_from_fork+0x11/0x34)
[ 631.278836] gadget: rndis req21.00 v0000 i0000 l12
[ 631.283984] rndis_msg_parser: RNDIS_MSG_HALT
[ 631.295282] CAUTION: musb: Babble Interrupt Occurred
[ 631.300482] gadget: reset config
[ 631.303947] gadget: rndis deactivated
[ 631.307869] usb0: gether_disconnect
[ 631.311542] gadget: acm ttyGS0 deactivated
[ 631.367452] CAUTION: musb: Babble Interrupt Occurred
[ 631.455212] gadget: high-speed config #1: Multifunction with RNDIS
[ 631.461773] gadget: init rndis
[ 631.465058] gadget: RNDIS RX/TX early activation …
[ 631.470441] usb0: qlen 10
[ 631.473180] gadget: rndis_close
[ 631.476554] rndis_set_param_medium: 0 0
[ 631.480564] rndis_set_param_dev:
[ 631.483941] gadget: activate acm ttyGS0
[ 631.488044] gserial_connect: start ttyGS0
[ 631.492276] gadget: acm ttyGS0 serial state 0003
[ 631.497201] gadget: set_config: interface 4 (Mass Storage Function) requested delayed status
[ 631.506112] gadget: delayed_status count 1
[ 636.458230] gadget: suspend
[ 636.464771] CAUTION: musb: Babble Interrupt Occurred
[ 636.469964] gadget: reset config
[ 636.473429] gadget: rndis deactivated
[ 636.477346] usb0: gether_disconnect
[ 636.481006] gadget: acm ttyGS0 deactivated
[ 636.539648] CAUTION: musb: Babble Interrupt Occurred
[ 636.627806] gadget: high-speed config #1: Multifunction with RNDIS
[ 636.634363] gadget: init rndis
[ 636.637647] gadget: RNDIS RX/TX early activation …
[ 636.643026] usb0: qlen 10
[ 636.645764] gadget: rndis_close
[ 636.649138] rndis_set_param_medium: 0 0
[ 636.653145] rndis_set_param_dev:
[ 636.656522] gadget: activate acm ttyGS0
[ 636.660624] gserial_connect: start ttyGS0
[ 636.664849] gadget: acm ttyGS0 serial state 0003
[ 636.669773] gadget: set_config: interface 4 (Mass Storage Function) requested delayed status
[ 636.678685] gadget: delayed_status count 2
Any ideas about how to totally disable usb0 from connman?
I’ve seen that “babble interrupt” error before. I don’t know exactly what it means but it’s a hardware level usb problem.
It sounds like you have more basic problems with your board that software configuration. Has the usb ever worked?
SG
Looking at my beaglebone with the 7-31 production image, there’s a systemd service called storage-gadget-init. Check out what it’s doing with “systemctl status storage-gadget-init”:
Loaded: loaded (/lib/systemd/system/storage-gadget-init.service; enabled)
Active: active (running) since Tue 2000-01-04 00:57:51 UTC; 13 years 8 months ago
Main PID: 122 (g-ether-load.sh)
CGroup: name=systemd:/system/storage-gadget-init.service
-122 /bin/sh /usr/bin/g-ether-load.sh
`-353 /usr/sbin/udhcpd -f -S /etc/udhcpd.conf
I’ts running a script g-ether-load.sh with a line at the end:
/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252
then fires up the dhcp server with the configuration from /etc/udhcpd.conf that sets the ip range for the dhcp server for the usb host, acting as a dhcp client, the usb cable is connected to:
start 192.168.7.1
end 192.168.7.1
interface usb0
max_leases 1
option subnet 255.255.255.252
So, you’ll have to change both files with the subnet in mind.
I don’t know if the udev rule comes into play at all. I deleted the file, rebooted with usb plugged in, I get an ip. Rebooted with usb disconnected, connect usb, get an ip. Probably some old thing that someone forgot about.
“Can’t Linux without a little wtf.” - Bob Dole, 1978