Wednesday, August 28, 2013

Beagle Bone Black ,setting up ehternet,bluetooth and wifi


This blog is about to tell you how to settup bluetooth and wifi on BBB  

TASK :1- Entering into beagle bone's angstrom terminal from ubuntu's terminal

 step-1: connect BBB to PC,through USB

 step-2: open terminal by pressing 'cntr+alt+T'

 step-3:to check for usb port available ,issue this command in terminal
  $ ls /dev
  this will give a list of availaible vertual port, check for ttyACM0 then

 step-4: issue following command on ubuntu's terminal

                 $ sudo screen /dev/ttyACM0 115200

  you are successfully entered into beagle-bone's angstrom terminal
 
 step-5:Press Enter and you should see the Ångström login screen:

         ---O---. 

         |       |                  .-.           o o 

         |   |   |-----.-----.-----.| |   .----..-----.-----.

         |       |     | __  |  ---'| '--.|  .-'|     |     |

         |   |   |  |  |     |---  ||  --'|  |  |  '  | | | |

         '---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'

         -'  |

         '---'

 The Angstrom Distribution beaglebone ttyO0

 Angstrom v2012.05 - Kernel 3.2.18

 beaglebone login:

 Log in as root. At Password: press Enter. You should see the prompt:

 root@beaglebone:~#

 step-6: If you want to close communications with the 'bone, press Ctrl+A, k and answer “y” to Really kill this window (y/n)?

 Once you’ve logged in, if you close the screen, reopen it, and press Enter, the prompt will appear. 
       You don’t have to log in again until you reboot the 'bone. 
       this terminal will be called as beagle bone's terminal(remember),
in future case if we use word like beagle bone's terminal then you should come back on this terminal and perform the requierd action 
  
2] Enabling Ethernet Communications on BBB

 step-1: To view the PC’s existing Ethernet connections, on ubuntu terminal, enter

  $ ifconfig

  You’ll likely see entries for eth0, the PC’s Ethernet interface, and lo, 
 desktop loopback.
 step-2: connect ethernet wier to BBB's ethernet port
 
 step-3: Testing the Ethernet Connection on ubuntu's terminal, enter

  $ ifconfig 

  You should see a new connection that looks something like this:

                eth2      Link encap:Ethernet  HWaddr 00:18:31:8d:99:93 

          inet addr:192.168.7.1  Bcast:192.168.7.3  Mask:255.255.255.252
 
          inet6 addr: fe80::218:31ff:fe8d:9993/64 Scope:Link
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:30 errors:0 dropped:0 overruns:0 frame:0

                       TX packets:44 errors:0 dropped:0 overruns:0 carrier:0

                        collisions:0 txqueuelen:1000 

                        RX bytes:6377 (6.3 KB)  TX bytes:9308 (9.3 KB)

  inet addr is the IP address the PC uses to communicate with the 'bone. 
In the example above, the address is 192.168.7.1.

  To find the IP address the BBB is using, on the beaglebone's terminal, enter

  ifconfig

  If the 'bone is using 192.168.7.2, at the desktop terminal, enter:

  ping 192.168.7.2 

  The 'bone should respond with data packets:

          PING 192.168.7.2 (192.168.7.2) 56(84) bytes of data.

          64 bytes from 192.168.7.2: icmp_req=1 ttl=64 time=2.19 ms

          64 bytes from 192.168.7.2: icmp_req=2 ttl=64 time=0.152 ms

  Press Ctrl+C to quit.

  To test in the reverse direction, in the beaglebone terminal, enter:

  ping 192.168.7.1
  
  great now we have a working ethernet on board.
now we can pass update command to update our BBB's  operating sys
  
  $ opkg update 
  

3]configure and enable bluetooth device 
 
step1: make sure your board is updated to bluetooth stack(bluez 4.0 or above) 
  (this step neccarry to communicate with BLE's,if you re not worried about BLE's right now.then skip step 1)
 
       step 2:The first step in enabling Bluetooth is to inform your BeagleBone Black that you would like to be ableto use this feature. 
To do this you will just need to make a quick edit to a configuration file.
   On beagle bone terminal ,If you perform:
    
  $cat /var/lib/connman/settings
  You should see something like:
   [global]
   OfflineMode=false

   [Wired]
   Enable=true

 step3:now,here if on your window bluetooth and wifi are listed,it's good.if not then its great..so edit the configuration file,
 we are using VIM editor(inbuilt editor),
  to do this type following command on BBB's terminal 
 
               $vim /var/lib/connman/settings 
         
       step 4: once a new open ups, press i ,to insert values to file,and add following two lines 
  
  [Bluetooth]
  Enable=true
  then press esc.

 step 5: once both lines are added, press q: this will bring command line of vim,
then type exit and press enter to come back to the BBB's main terminal  
  
      step6: enter command reboot to restart beagle bone
 
 step7: enter into beagle bone's terminal again .

        Step8: run hci commands to check if the bluetooth is enabled or not
           ex::   $hcitool dev:
                 devices = xx:xx:xx:xx:xx
                   the BID of connected bluetooth device is printed
 
                congradulation  now you have ethernet and bluetooth,working on your BBB
note:how to enable wifi ob BBB will soon be posted