trying to use the USB networking with the IoT snapshot image

So I downloaded and installed the Jessie IoT Snapshot. I like that it doesn’t have a bunch of stuff running I don’t need.

I am trying to get the USB networking to work. It worked with the board straight out of the box, so I know the problem is not on my laptop. After flashing the IoT image I dicked around with connman enough to decide I didn’t like it, so I uninstalled it (and USB was unresponsive with that too). That didn’t help.

I do see the usb0 stanza in /etc/network/interfaces,

[ root@beaglebone:~ ]
0s :+1: #> more /etc/network/interfaces

[snip]

Ethernet/RNDIS gadget (g_ether)

Used by: /opt/scripts/boot/autoconfigure_usb0.sh

iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.252
network 192.168.7.0
gateway 192.168.7.1

and I do see usb0 output in my ip addr output

[ root@beaglebone:~ ]
0s :poop: #> ip addr

[snip]

3: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 68:9e:19:8f:60:f0 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.2/30 brd 192.168.7.3 scope global usb0
valid_lft forever preferred_lft forever

(of course I get that via eth0.)

Googling I see this

https://kwantam.github.io/BBKNotes1.html

which is out of date. it says to update /etc/inittab (among other things), and that’s gone in the new systemd world…

so how do I do this? How do I get USB networking to work with the Jessie IoT image?

So... In the Jessie iot image, we have connman setup to control eth0 and
IGNORE usb0..

usb0 comes up first via loading the g_multi module, thru a generic init
script, and then udhcp is used to give your pc an ip address..

I have a simple form of the script here:

https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-usbgadget

Regards,

So I downloaded and installed the Jessie IoT Snapshot. I like that it doesn’t have a bunch of stuff running I don’t need.

I am trying to get the USB networking to work. It worked with the board straight out of the box, so I know the problem is not on my laptop. After flashing the IoT image I dicked around with connman enough to decide I didn’t like it, so I uninstalled it (and USB was unresponsive with that too). That didn’t help.

I do see the usb0 stanza in /etc/network/interfaces,

[ root@beaglebone:~ ]
0s :+1: #> more /etc/network/interfaces

[snip]

Ethernet/RNDIS gadget (g_ether)

Used by: /opt/scripts/boot/autoconfigure_usb0.sh

iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.252
network 192.168.7.0
gateway 192.168.7.1

and I do see usb0 output in my ip addr output

[ root@beaglebone:~ ]
0s :poop: #> ip addr

[snip]

3: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 68:9e:19:8f:60:f0 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.2/30 brd 192.168.7.3 scope global usb0
valid_lft forever preferred_lft forever

(of course I get that via eth0.)

Googling I see this

https://kwantam.github.io/BBKNotes1.html

which is out of date. it says to update /etc/inittab (among other things), and that’s gone in the new systemd world…

so how do I do this? How do I get USB networking to work with the Jessie IoT image?

So… In the Jessie iot image, we have connman setup to control eth0 and IGNORE usb0…

usb0 comes up first via loading the g_multi module, thru a generic init script, and then udhcp is used to give your pc an ip address…

I have a simple form of the script here:

https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-usbgadget

Regards,

OK, I do that and it looks like udhcpd is already there.

I run the script and get

[ root@beaglebone:~ ]
0s :+1: #> sudo ./beaglebone-black-g-ether-load.sh
modprobe: ERROR: could not insert ‘g_ether’: No such device
[ ok ] Restarting udhcpd (via systemctl): udhcpd.service.

I disconnect from my network and try usb and it times out.

I disconnect and try to log in via my network and now I get

[ jstoner@erzulie:~ ]
4s :poop: $> ssh root@192.168.80.252
ssh: connect to host 192.168.80.252 port 22: Connection refused

Did I need to reinstall connman? Shall I flash again?

aack, posted too soon. I can get in via my network.

crap, reinstalled connman, reran the script, and no luck:

[ root@beaglebone:~ ]
0s :+1: #> ./beaglebone-black-g-ether-load.sh
modprobe: ERROR: could not insert ‘g_ether’: No such device
[ ok ] Restarting udhcpd (via systemctl): udhcpd.service.
[ root@beaglebone:~ ]
4s :+1: #> logout
Connection to 192.168.80.207 closed.

[disconnected my network and reconnected USB]

[ jstoner@erzulie:~ ]
58s :+1: $> ssh root@192.168.7.2
ssh: connect to host 192.168.7.2 port 22: Operation timed out

No luck.

I came back to this, still not getting it to work. Seeing the same problem with Wheezy (had to go back).