Can not connect via USB

So I added in my /etc/network/interfaces

iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
nameservers 8.8.8.8
gateway 192.168.7.1

This takes care of ping 8.8.8.8. after a reboot

But
still unable to ping www.google.com : Temporary failure in name resolution

Rajesh Kulkarni

Send another message tomorrow. I have a fix for that and it uses crontab as sudo. I
will send you examples of it all and it works. I use it.

What version of Debian are you running? cat /etc/dogtag

Hi Kenneth,
I am using Debian Buster IoT Image 2020-04-06 .

Regards,
Rajesh

Rajesh Kulkarni

A lot has changed with the 4-6 release. Don’t fool around with /etc/network/interfaces or /etc/resolv.conf.

As debian user in the home directory. cd ~/

mkdir cronjobs

copy the attached file into cronjobs

cd cronjobs

Read the top of the file postboot.sh

The following must be done as sudo because the user level will not have permission.
.

sudo crontab -e

Make entry as explained in postboot.sh

This entry will execute at boot time and sleep 20 seconds to allow the system to be up.

This may seem complicated. The reason for this setup is you can later if needed make other cronjobs
as you or as sudo. Remember full pathnames and any executed commands requiring sudo access
will need to be added as sudo crontab -e. If you want a user level cronjob just do crontab -e

When this script runs at boot time it will create a file called log. You can cat log to see the results of
the current boot. postboot.sh also updates the system date/time. Please nano or vi postboot.sh and
verify your Country / Time Zone.

So, backup original cp /etc/network/interfaces ~/. Then clean up using sudo nano /etc/network/interfaces
The only two active entries should be:

auto lo
iface lo inet loopback

Reboot sudo reboot then cat log in cronjobs

Let me know how it works out.

Ken

postboot.sh (1.29 KB)

Ken
Thank you so much ! It looks it helped.I was able to successfully ping dns server names with no issues !

  • So I copied the postboot.sh as you suggested.

  • did “sudo crontab -e”

  • Added the following in the file" @reboot sh /home/debian/cronjobs/postboot.sh 1>/home/debian/cronjobs/log 2>/home/debian/cronjobs/log "

  • Did a reboot.

  • The following is the log file :

=== Boot ===
Set Nameserver and Gateway
Nameserver 8.8.8.8, GW 192.168.7.1
Set route with gw 192.168.7.1
Display route
Kernel IP routing table
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
Set timezone
Local time: Mon 2020-05-18 18:44:27 PDT
Universal time: Tue 2020-05-19 01:44:27 UTC
RTC time: Tue 2020-05-19 01:44:27
Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
Finished at Mon 18 May 2020 06:44:27 PM PDT

Rajesh Kulkarni,

Glad its finally fixed. Save that file postboot.sh. It may be needed in later releases.

Ken

Again , Thank you so much Kenneth !

I was wondering were you able to see all the boxes set to green when you visit the webserver of the beaglebone i.e. the getting started guide .?

Attached is a screenshot which shows only my Power and Boot to be successful, but requirements for other steps seemed not to be met yet.

Did any one else experience this ?(and yes I am connected to the internet)
Screenshot from 2020-05-18 22-04-07.png

Rajesh,

Yes, in my case from a P.C running Windows file:///F:/START.htm I can see and click on all the options.

What do you get if using your browser enter 192.168.7.2 ?

Screenshot from 2020-05-18 22-04-07.png

When I open the 192.168.7.2 page in my browser(chrome and Firefox ) It takes me to a cloud9 IDE ,inside which a introduction.md file is shown which tells me to update my OS on my BBB(although it has the latest Debian) .

And if I do go on to the “getting started” page via the cloud9 IDE NONE of the steps are highlighted in green.

Again I am able to successfully ping my PC host and BBB successfully. As a matter of fact I was able to run the program to blink LED which worked . But just the fact that I don’t see the same stuff that people do makes me think of there’s something wrong

Rajesh

Screenshot from 2020-05-18 22-04-07.png

Rajesh,I am sorry I can not duplicate this problem. I do know changes were made to default port numbers I.E. 80,8080,3000,etc.and one package was retired. Um, You mention Firefox which is what I use . Do you have ‘No Script’ loaded? If so make sure Beaglebone (192.168.7.2) is set to trusted.

Beyond this I would suggest opening a new report and stop adding to USB problem.

Ken

Screenshot from 2020-05-18 22-04-07.png

Hi Ken,
Thank you for taking the pain to help.

I have the exact same setup: Windows 10 PC as host connecting to a headless BBB via USB. And experiencing the same issue for the past 1 week with no resolution yet.
After changing the crontab and rebooting my log file is as follows:

debian@beaglebone:~/cronjobs$ uname -r
4.19.94-ti-r42
debian@beaglebone:~/cronjobs$ cat log
=== Boot ===
Set Nameserver and Gateway
Nameserver 8.8.8.8, GW 192.168.7.1
Set route with gw 192.168.7.1
Display route
Kernel IP routing table
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
Set timezone
Local time: Mon 2020-04-06 16:43:42 EDT
Universal time: Mon 2020-04-06 20:43:42 UTC
RTC time: Sat 2000-01-01 05:00:57
Time zone: America/New_York (EDT, -0400)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
Finished at Mon 06 Apr 2020 04:43:42 PM EDT
debian@beaglebone:~/cronjobs$

Still I could not ping dns server. “ping 8.8.8.8” is timing out.

Any clues?
Venkat.

Venkat,

I have been off Windows for 2 years now…

Try my GitHub site:
https://github.com/kenmartin-unix/Beaglebone/blob/master/BBB-PC-Internet.txt

and:

https://github.com/kenmartin-unix/Beaglebone/blob/master/postboot.sh

Hi Ken,
Thank you.
After following your github links, It is not working for me.

On BBB when I tried to set gw to 192.168.147.1 I am getting “network is unreachable.” It is accepting only 192.168.7.1.

At this point all I can suggest is reading my old notes that I attached previously.

When running Windows 10 I went round and round with problem. It was Windows liked to assign the IP address and gateway.

If you can , check out advanced connections in Windows networking for this connection. Again read my notes.

Ken