Can not connect via USB

Got my BBB in today. Nice.

I am able to connect to it via the serial port header but can not connect via USB?

I tried installing the BONE_D64.exe drivers but all came back with red X’s. I rebooted
the P.C. and tried again. Same results.

The serial connection is via Putty. and that works. I tried using putty
via SSH to 192.168.7.2 but all I get is a blank screen which eventually
times out…

Someone asked me today why am I fooling around with a BBB when
I can get the “real” thing on a P.C. or VM. I told him there are things
a BBB can do like add on capes, peripheral I/O that you can’t really
do with a VM which if you could do it you would have to leave on 24/7
where as the BBB is a cute thing that once setup can run headless
at very little current. I just like it.

So, any help would be appreciated. Thanks.

What computer /os are you using to ssh from?

( if windows - did you check firewall settings? )

Also try hooking up a display/keyboard/mouse to enable networking

What came back "red X's"?

  I'd suggest opening the device manager (admin privileges needed),
looking for any entry with an alert icon, and maybe deleting those devices.

  I'm pretty certain the BONE_D64.exe drivers don't need to be explicitly
loaded -- I think Win10 can find a compatible driver online, automatically.
At least, I don't recall running that installer on my system when I had to
rebuild it for Win10.

  With a BBB booted, I show a "Linux File-Stor Gadget USB Device" under
Disk Drives. Under Network Adapters I have a "Linux USB Ethernet/RNDIS
Gadget". I do have a "CDC ECM" item under "other devices" with a !-triangle
which says no driver is available for it. I suspect the "CDC ECM" device is
associated with the 192.168.6.2 address used on Mac connections.

https://en.wikipedia.org/wiki/RNDIS
"""
The USB Implementers Forum (USB-IF) defines at least three non-proprietary
USB communications device class (USB CDC) protocols with comparable
"virtual Ethernet" functionality; one of them (CDC-ECM) predates RNDIS and
is widely used for interoperability with non-Microsoft operating systems,
but does not work with Windows.
"""

  Personally -- I don't use the USB network connection; I prefer a CAT-5
(or better) cable to a high-speed switch connected to my Uverse "modem".
Otherwise the BBB can't get to the outside world unless one configures
"internet connection sharing" and any needed openings in the Windows
firewall. I'm only using the USB to provide power as I have too many
wall-warts in use already -- I have one, if not two, power strips plugged
into my rather large UPS just to get room for wall warts.

Dennis,

My laptop has an Ethernet port on it. What would be involved
in using that? I don’t mean to be stupid. Using the USB for
simply power, as you say.

I’m running Windows 10 64-bit 19.09 with all patches.

Thanks

You use this and a cable

10/100 Mbps 8 Port Fast Ethernet LAN Desktop RJ45 Network Switch Hub Adapter, Plug-and-Play - Walmart.com
[

10/100 Mbps 8 Port Fast Ethernet LAN Desktop RJ45 Network Switch Hub Adapter, Plug-and-Play - Walmart.com

Free 2-day shipping. Buy 10/100 Mbps 8 Port Fast Ethernet LAN Desktop RJ45 Network Switch Hub Adapter, Plug-and-Play at Walmart.com

](https://www.walmart.com/ip/10-100-Mbps-8-Port-Fast-Ethernet-LAN-Desktop-RJ45-Network-Switch-Hub-Adapter-Plug-and-Play/334743977?wmlspartner=wlpa)

Mark,

Thanks for the EtherSwitch idea. I got rid of those along with a NAS server and 2 towers
some time ago when I was forced to re-locate.

There should be a way to get the USB port working??

Where I am now I am very limited on space. I would
think some body has got a BBB working with USB.

I remember year’s ago seeing troubles this smells like a windows driver issue follow Dennis suggestions remove driver’s in control panel. I always reboot after removing one item it might take multiple reboots all I have is a bb black and white I can’t try it and I’m retired :crazy_face: As much as I miss pulling hair’s out I have not dug all my stuff out you really need all the toys like serial cable’s Routers, switches and for me JTAG if you want to be serious it doesn’t take up much space. Start with quick start guide and keep your focus on one problem your juggling approaches and reply with details to those offering help like previous responder. Best of luck

Update

Trying to share Internet on Win-10 with BBB over USB. SSH 192.168.7.2 &
Serial to JTAG & Firefox to 192.168.7.2 to it ok???
Need to do “sudo apt install xxxx”, etc.

Can not ping from BBB to external address. I.E 8.8.8.8, or 23.194.117.73

Route shows

Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.7.1 0.0.0.0 UG 0 0 0 usb0
192.168.6.0 0.0.0.0 255.255.255.252 U 0 0 0 usb1
192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0 usb0

I think I have everything in Win-10 net connections OK. If they are
wrong I could not Firefox or SSH to it correct.

Update

Trying to share Internet on Win-10 with BBB over USB. SSH 192.168.7.2 &
Serial to JTAG & Firefox to 192.168.7.2 to it ok???
Need to do "sudo apt install xxxx", etc.

Can not ping from BBB to external address. I.E 8.8.8.8, or 23.194.117.73

Route shows
Destination Gateway Genmask Flags Metric Ref Use
Iface
default 192.168.7.1 0.0.0.0 UG 0 0 0 usb0
192.168.6.0 0.0.0.0 255.255.255.252 U 0 0 0 usb1
192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0 usb0

I think I have everything in Win-10 net connections OK. If they are
wrong I could not Firefox or SSH to it correct.

Is the Win-10 set up to forward packets? On a *Linux* desktop it would be

sysctl -w net.ipv4.ip_forward=1

What the mess-windows equivalent of this is I have no clue. But without it,
all the beagle can do is talk to the mess-windows box and not the internet.

Robert,

===> Is the Win-10 set up to forward packets?

That’s where I’m stuck and need a little help/

Google:
      Win10 Internet Connection Sharing

as a starting point.

Bob,

In my efforts I have gone and screwed up routing on the BBB.

I now can only access via the JTAG serial port.

The BBB can’t ping 192.168.7.1 the Win-10 address and the
P.C. can’t ping 192.168.7.2 either

This is what’s in /etc/network/interfaces
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.252
network 192.168.7.0
gateway 192.168.7.1
dns-nameservers 8.8.8.8
post-up route add default gw 192.168.7.1

Then to add default
sudo /sbin/route add default gw 192.168.7.2

It did work, but now not. Any help is appreciated. Sorry to bother.

You keep fiddling with the BBB configuration, when it is the WINDOWS
configuration you need to change.

debian@beaglebone:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

  <SNIP COMMENTED LINES>

# 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
debian@beaglebone:~$

  Pulling the CAT-5 cable from my BBB and rebooting... Then connecting
via PuTTY...

debian@beaglebone:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.6.0 0.0.0.0 255.255.255.252 U 0 0 0
usb1
192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0
usb0
debian@beaglebone:~$

  I do NOT have Internet Connection Sharing configured on Windows, so am
unable to ping anything outside of 192.168.7.1. If I plug in the CAT-5
cable, I show...

debian@beaglebone:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
default dsldevice.attlo 0.0.0.0 UG 0 0 0
eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
dsldevice.attlo 0.0.0.0 255.255.255.255 UH 0 0 0
eth0
192.168.6.0 0.0.0.0 255.255.255.252 U 0 0 0
usb1
192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0
usb0
debian@beaglebone:~$

Actually what I had to do follows for Internet access. Took some trial and error.

Out of the box the IP addresses 192.168.7.x are only good between two devices.

Example a Laptop and the BBB.

If you want Internet access to do updates or whatever do the following

In /etc/network/interfaces make the following changes

iface usb0 inet static

address 192.168.137.2 <=== 137 was used because Windows insisted on it to do WiFi sharing 7 no go

netmask 255.255.0.0

network 192.168.137.0 <=== 137 was 7 originally

gateway 192.168.137.1 <=== What Windows assigned to the adapter in Windows-10 19.09 64-bit home

dns-nameservers 8.8.8.8 <=== Point to nameserver

post-up route add default gw 192.168.137.1 <== Add default gateway. Auto up.

debian@beaglebone:~$ route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

default 192.168.137.1 0.0.0.0 UG 0 0 0 usb0 <== Updated automatic entry

192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 usb0

192.168.6.0 0.0.0.0 255.255.255.252 U 0 0 0 usb1

debian@beaglebone:~$

On the Windows side make sure the Network connection for the BBB or Ethernet 2

that the TCP/IP V4 setting is set to the 137 address from above. Save it then bring

up the WiFi settings / Properties / Sharing and allow sharing and choose either BBB

or Ethernet 2. Whichever is the new one added. Save it and exit.

Do a clean startup of the P.C. and the BBB.

It should work fine.

[-- multipart/alternative, encoding 7bit, 196 lines --]

Actually what I had to do follows for Internet access. Took some trial and
error.

Out of the box the IP addresses 192.168.7.x are only good between two
devices.

Example a Laptop and the BBB.

True enough, the USB link is handy but can cause lots of confusion.

If you want Internet access to do updates or whatever do the following

[skip complicated way of doing it]

Simply connect an ethernet (UTP Cat5 or Cat6) cable from the RJ45
socket on the BBB to your router, the BBB will have then internet
access (assuming your router is set up to provide internet access of
course).

The router (if as is usually the way) runs as a DHCP server and will
assign an IP address to the BBB. If you want to access the BBB from
another computer on your router's LAN then you need to find out what
this address is.

Chris,

If you don’t have a router or Ethernet switch and only have access
via your computers WiFi then what I did was make a change to
one file on the BBB and one change to your P.C.'s network

connection for the BBB.

sudo nano /etc/network/interfaces

iface usb0 inet static
address 192.168.137.2
netmask 255.255.0.0
network 192.168.137.0
gateway 192.168.137.1
dns-nameservers 8.8.8.8
post-up route add default gw 192.168.137.1

Change entry on P.C. Reboot BBB. Now access
BBB using 192.168.137.2
ssh to 192.168.137.2
Firefox to 192.168.137.2
Putty ssh to 192.168.137.2

This change is persistent any only needs to be
done once. Not complicated and works great.

After changes are made you can now get the
date / time automatically. Simply install ntpdate.

sudo apt update

sudo apt install ntpdate

Then one time

sudo cp -f /usr/share/zoneinfo/America/New_York /etc/localtime
Another example
sudo cp -f /usr/share/zoneinfo/Europe/Berlin /etc/localtime

Then at boot time

sudo /usr/sbin/ntpdate -b -s -u 0.north-america.pool.ntp.org

The above can be put in a shell script. Check for correct
timezone and date using

date

If wrong see zoneinfo directory to find YOUR time zone.
If you are not in North America change

0.north-america.pool.ntp.org

To see YOUR country. See

https://www.pool.ntp.org/zone/@

The above works, works great and is not over complicated.
And only needs to be done once then your BBB will have
the correct date / time and Internet access.

I also added a small program that’s been around for years
in Linux / Unix called ‘ed’ a line editor. It’s small and fast
supports ‘here’ input and redirection. To get it

sudo apt install ed

See https://www.computerhope.com/unix/ued.htm
And https://www.gnu.org/software/ed/manual/ed_manual.html

Hi Ken,
I followed steps given by Drew Fustini. And was able to connect to the internet temporarily , but as soon as I rebooted I could not. You seem to have figured out the way to make BBB connect via Beaglebone. I am using Ubuntu as my host PC to connect to BBB.

So if I understand correctly all I need to do is add the following lines in my network/interfaces file ?

iface usb0 inet static
address 192.168.137.2
netmask 255.255.0.0
network 192.168.137.0
gateway 192.168.137.1
dns-nameservers 8.8.8.8
post-up route add default gw 192.168.137.1

And this is what my netstat -rn looks like

Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.7.1 0.0.0.0 UG 0 0 0 usb0
192.168.6.0 0.0.0.0 255.255.255.0 U 0 0 0 usb1
192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0

  1. I can successfully ping 192.168.7.1 . But whenever I ping 8.8.8.8 (once I reboot) , all I see in response is “From 192.168.7.1 icmp_seq=1 Destination Host unreachable”.
    So my gateway is set correctly and ping to it, but for some reason it can not ping through it to 8.8.8.8. Doesn’t make sense.

  2. How did you get the number 137 ?

  3. According to Drew Fustinis post (https://gist.github.com/pdp7/d2711b5ff1fbb000240bd8337b859412 ) entering the following command "debian@beaglebone:~$ cat /etc/resolv.conf"

should get my the response **"**nameserver 8.8.8.8".
``But the response I get is "nameserver 127.0.0.1" which is locat host , and I don't why I get this response. And I tried to edit that file manually but it gets overwritten after every reboot.

**** `Any help is appreciated. Thank you for your time . :)`

And you said the 137 is the

So if I understand correctly all I need to do is add the following lines in my network/interfaces file ?

iface usb0 inet static
address 192.168.137.2
netmask 255.255.0.0
network 192.168.137.0
gateway 192.168.137.1
dns-nameservers 8.8.8.8
post-up route add default gw 192.168.137.1

Make 2 changes so it reads

iface usb0 inet static
address 192.168.137.2
netmask 255.255.0.0
network 192.168.137.0
nameservers 8.8.8.8
gateway 192.168.137.1

The 192.168.137 is based on the address supplied by the host.

Also this assumes you are NOT using connmanctl. That does its own thing.

Let me know if this helps.

The entire /etc/network/interfaces looks like (in my case)

The loopback network interface

auto lo
iface lo inet loopback

iface usb0 inet static
address 192.168.137.2
netmask 255.255.0.0
network 192.168.137.0
nameservers 8.8.8.8
gateway 192.168.137.1

HEADS up!! Starting with 2020.04.06 image's this ^ will no longer
work.. With having too many random config location for usb0 having to
coordinate with dnsmasq/softap/etc.. This was re-written to use one
location:

/etc/default/bb-boot

Specifically this section:

USB_CONFIGURATION=enable
#Its assumed usb0 is always enabled, usb1 can be disabled...
USB0_SUBNET=192.168.7
USB0_ADDRESS=192.168.7.2
USB0_NETMASK=255.255.255.0

USB1_ENABLE=enable
USB1_SUBNET=192.168.6
USB1_ADDRESS=192.168.6.2
USB1_NETMASK=255.255.255.0

DNS_NAMESERVER=8.8.8.8

These values are then used by these 4 scripts on all board variants
(Classic, with WiFi, etc..)

https://github.com/beagleboard/customizations/tree/master/usr/bin

Regards,

Robert,

The proper (official) point to setup Ethernet now? And the steps involved to make that your default method of transport…
In other words use USB for P.C. <> BBB but use Eth0 for Internet access.

I assume connmanctl is still for WiFi if one has WiFi.

Thanks