Book Image

Beaglebone Essentials

By : Rodolfo Giometti
Book Image

Beaglebone Essentials

By: Rodolfo Giometti

Overview of this book

Table of Contents (18 chapters)
BeagleBone Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Checking out the preloaded tools


Now that we are logged into the system, it's time to take a look at the preloaded tools. In the next section, we're going to install all the missing software that a good developing system needs.

The SSH tool

Now we should verify that the Secure Shell (SSH) tool is functional. The Secure Shell, sometimes known as Secure Socket Shell, is a Unix-based command interface for securely getting access to a remote computer. It was designed to replace the insecure telnet. To test it on the target serial console, we can use the ifconfig command to check the network settings:

root@BeagleBone:~# ifconfig

Then, the following message is displayed:

eth0      Link encap:Ethernet  HWaddr 78:a5:04:ca:c9:fe  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:40

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 96:66:68:88:3b:fa  
          inet addr:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
          inet6 addr: fe80::9466:68ff:fe88:3bfa/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3376 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:926304 (904.5 KiB)  TX bytes:10306 (10.0 KiB)

We can use the usb0 device (which is a virtual Ethernet running on the USB cable). First, we should check whether the corresponding Ethernet device has been created on the host using the same command:

$ ifconfig

The output of the command is as follows:

eth1      Link encap:Ethernet  HWaddr bc:ae:c5:20:36:80  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth4      Link encap:Ethernet  HWaddr 78:a5:04:ca:cb:00  
          inet addr:192.168.7.1  Bcast:192.168.7.3  Mask:255.255.255.252
          inet6 addr: fe80::7aa5:4ff:feca:cb00/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:112 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3483 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17031 (17.0 KB)  TX bytes:1143213 (1.1 MB)

Note

Note that I dropped all the network devices that are not named ethX (for example, the lo device, wlanX, and so on.).We can notice that the eth4 device, which owns the IP address 192.168.7.1, is the one we are looking for. Because of this fact, its IP address is in the same subnet of the BeagleBone Black's usb0 device mentioned earlier. So, let's get connected via SSH to our board with the following command:

The authenticity of host '192.168.7.2 (192.168.7.2)' can't be established.
ECDSA key fingerprint is b1:a9:84:39:71:99:a3:af:9e:ba:26:d5:e6:77:03:08.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.7.2' (ECDSA) to the list of known hosts.
Debian GNU/Linux 7

BeagleBoard.org BeagleBone Debian Image 2014-04-23

Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
Last login: Thu Apr 24 21:20:09 2014 from hulk.local
root@BeagleBone:~#

Great! We can now be rest assured that the SSH is working.

Tip

We have to answer yes when the ssh command asks us if we are sure we want to continue.

The Apache web server

In the Internet era, a web interface is a must-have, and the easy way to have one is to install a LAMP (Linux-Apache-MySQL-PHP) suite.

By default, the preloaded Debian image has the Apache web server preinstalled, so if we point our web browser to the host at the address 192.168.7.2 and port 8080, we should get something like this:

However, we must not forget to mention the port 8080 specification in the URL (the correct form is 192.168.7.2:8080), or we'll get a different output related to the Bone101 service, as shown in the following screenshot:

The Bone101 service is something similar to the Arduino IDE, which is a high-level programming environment, where beginners can try simple programs using an integrated IDE and a dedicated JavaScript library.

You can take a look at this system using the tutorial at http://beagleboard.org/support/bone101. However, we are going to disable this service in the next section because it's not useful to better understand how the computer peripherals can be connected to and managed by the BeagleBone Black, and also, in order to get a standard LAMP suite, we need port 80 to be free.