Sunday, March 15, 2015

How I Logged In to My Beagle Bone Black & How I Established an Internet Connection

5:11 AM Posted by $#y@m 1 comment
soon after placing an order of  beagle bone black through SummetInstuments , i was very much excited for its arrival, at last i received my order with some accessories like USB hub, adapter, USB cable etc.,

Connecting to Beagle Bone Black 

I just connected the beagle bone black to my PC over the USB via the miniUSB port which is provided on the board,just next to the Ethernet socket then confused how to Log in to the beagle bone black as i do in to a regular OS through command line, soon viewed many answers on google, but the best way i wanted to do with is the PuTTY

PuTTY is a SSH client which will make your work easy and fast, it just needs your beagle's IP which is by default 192.168.7.2 : 22(IP:Port) and you PC is identified as 192.168.7.1 by the beagle

but i wanted a putty which is more interactive , soon i found the software called SuperPuTTY which just needs the PuTTY.exe pre-installed, inter-activeness  i like with SuperPuTTY is its abliity to handle multiple PuTTY sessions in the tabs, because when you are in to development of drivers or modules you will definitely love this kind of interface

before going further i realised that i must install the drivers of beaglebone black which are present inside the beaglebone board itself


Figure. Beagle Bone Black being mounted in Windows

Migrate to Folder BeagleBone Getting Started(G):\Drivers\Windows  and install the drivers based on you type of system 32bit/64bit

Now Everything is set,  the things remained are,  getting connected to board and using internet on it to get updates or installing required packages(any way the board claims it comes with everything prebuilt)

Connecting to BeagleBone Black via PuTTy

Connecting to BBB via PuTTY


PuTTY required no installation i just used the .exe downloaded previously, and done the settings shown above and was asked to enter the login name which is root  and no password is needed

Viola I'm Done


if you observe you will see the login details, in my case the linux being ported by default is Debain Image and know more , by using command

uname -a 

which shows the linux kernel and machine arch, now you can just close the session and get the SuperPuTTY , the SuperPuTTY actully asks you the path of the actual putty.exe , which you can provide, you can save the session of Beaglebone black in SuperPuTTY which avoids you to enter the details again and again, even you can save the session login details with login name and extra arguments !

Connecting to Internet 

1. Open you windows Network and Sharing Center located at Control Panel\Network and Internet\Network and Sharing Center,
2. Go to change adapter settings where you will see you network connection is currently being accessed by you for internet usage
3. Right Click on the internet connection currently being used and go to properties
Enable Sharing of internet to beagle

4. Move to tab Sharing  tick the option of allow other network users to connect through this computer internet connection and the connection you are going to share with is you beaglebone black USB Ethernet (as shown above), in the above pic beaglebone black can be identified by name RNDS Gadget



(Optional)
if your situation is like me using internet via a wireless router when you try to share the internet you will see a error from windows saying "Internet connection cannot be enabled.A LAN connection is already configured with the ip"

X. After going to properties of IPV4 choose advanced and  change the option interface metric option to some non-zero value(as shown above)

5.Soon then you will observe the PuTTY connection being lost if connected

Change IP and DNS settings of beagle

6.Right Click on properties of beaglebone black connection and go to IPV4 properties and select the option of obtain IP automatically and obtain DNS automatically(as shown above)

7.Now try to connect through PuTTY and you should not face any problems (if so please comment)
8.After logging in to PuTTY with the required credentials you can check first check board to PC connection by

#checking connection between board and PC
ping 192.168.7.1
#checking internet pinging google.com
ping www.google.com


9.Its not done , you are one more step away you have to add your default gateway as IP of your PC

/sbin/route add default gw 192.168.7.1

10.
ping www.google.com

Viola its Done !
Beagle Being Connected to internet 

Try the steps as it is and hope you will not face any problem, its good if you face problems :)
(i solved the wifi issue by my self which frustrated me for a day :) )

These steps are required to be done every time you connect the board,but the resolve the headache on the side of beagle bone you can just add the script

/sbin/route add default gw 192.168.7.1 in the .bashrc file which will be run on system startup of beaglebone black

just do

vim .bashrc
and add the default command here, in our case below command at the end of the file

/sbin/route add default gw 192.168.7.1

 , you can even change default login messages to you own by adding lines like

echo "This is my Beagle bone black :)"



---Namaskaram
Shyam Daram