Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Beaglebone Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Beaglebone Essentials

Beaglebone Essentials

By : Rodolfo Giometti
5 (2)
close
close
Beaglebone Essentials

Beaglebone Essentials

5 (2)
By: Rodolfo Giometti

Overview of this book

If you are a developer with some hardware or electrical engineering experience who wants to learn how to use embedded machine-learning capabilities and get access to a GNU/Linux device driver to collect data from a peripheral or to control a device, this is the book for you.
Table of Contents (13 chapters)
close
close
12
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:

The Apache web server

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 Apache web server

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.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Beaglebone Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon