Beaglebone Black Tutorial Beaglebone black device Connection Beaglebone Black The material to be prepared before development
After the above introduction, I believe you have a general understanding of beaglebone, you need to notice that the completion of one thing may have many different ways. Therefore, depending on the project you want to complete, the material will be different, the following materials can help you complete the book most of the project, but not necessary:
- Q Beaglebone or Beaglebone Black
- Q 5V DC Adapter
- Q Network cable
- Q USB A to mini B line
- Q Bread Board
- Q jumper
- Q led several
- Q Each specification resistor
- Q button
- Q switch
- Q potentiometer
- Q Temperature Sensor
- Q microSD card
If you are using Beaglebone Black, you may also need to prepare the following materials:
- Q HDMI monitor (or VGA monitor)
- Q Micro HDMI cable (or Micro HDMI to VGA adapter)
- Q keyboard
- Q Mouse
- Q USB HUB
- Q 3.3V FTDI line or compatible line
Beaglebone Black's operating system
Like a computer, Beaglebone also has an operating system, which by default uses open source, free Linux operating systems. Of course, Beaglebone offers a variety of operating systems to choose from:
- Q Debian
- Qångström
- Q Android
- Q Ubuntu
In addition to several officially supported systems, the community also offers a number of systems to choose from:
- Q Nintendo
- Q ArchLinux
- Q LINUXCNC
- Q Minix
- Q Kali
- Q XNU
- Q Asterisk
- Q TI EZSDK
- Q beaglemnt (Beaglebone Black only)
At the factory, Debian Linux is installed in Beaglebone Black onboard memory. If you are using Beaglebone, install it in the Micro SD card. Since the development of this system is very rapid, the use of this system can be kept up-to-date (Appendix A provides a way to update the system image). The author recommends using the default Debian Linux system, because the operating system is officially supported, the system is developed and tested on Beaglebone, which makes the system more robust, and it is very convenient to manage packages on Debian Linux.
Connect to your Beaglebone
As mentioned earlier, there are a number of different ways to accomplish one thing, which is especially true in this section of the sentence. This section will lead you to the Beaglebone command-line terminal, and there are 5 ways to connect. On the command line, you can create and execute commands, manage systems, and get board information. In general, we use the Ethernet interface to connect, but if there is a situation where the network connection is not available, we need to use some other methods.
installation via USB connection and driverBeaglebone Black
In Beaglebone's onboard storage, documents and drivers are actually stored, which can help you connect beaglebone more easily. Using USB connection Beaglebone is mainly divided into the following steps:
(1) If you are using Beaglebone, make sure that the microSD card that is written to the latest version of the system is plugged into the card slot.
(2) Connect the Beaglebone to your PC via USB A to mini B USB.
(3) After approximately 20 seconds, a removable storage device will appear in the list of your disks, as shown in 2.8. Open the device, and double-click the start.htm in your default browser to open the start HTML document, which is shown in content 2.9 of the document.
Figure 2.8 Removable devices
Figure 2.9 START HTML Document Figure 2.10 Install the corresponding driver
(4) Select the driver and installation of the corresponding system in the install drivers step, as shown in 2.10.
(5). Enter the address http://192.168.7.2/in your browser to access Beaglebone 101, 2.11. The server on this page is Beaglebone, which contains a lot of information about the board, and there are some interactive examples using Bonescript, as shown in 2.12.
Figure 2.11 Beaglebone 101 Figure 2.12 Bonescript Example
If you are interested, this section must be very easy for you. We will return to use Bonescript in section 7th, and now we need to learn a way to connect using the command line.
Using SSH connection via USBBeaglebone Black
This connection is still only needed to connect the Beaglebone and the computer using a USB cable, then perform the following steps:
(1) Open the terminal and connect to the Beaglebone.
- Q If you are using a Mac, open the terminal application (in the utility) and enter SSH at the command line prompt [email protected],2.13 shown.
Figure 2.13 SSH connection diagram under Mac 2.14 SSH connection under Linux
- Q If you are using Linux, enter the command in the terminal ssh [email protected],2.14 shown.
- Q If you are using a Windows operating system, you need to install Putty (official website http://www.putty.org/). After you enter [email protected] in "Host Name" and make sure "Connection type" is SSH, click on the Open button, as shown in 2.15.
Figure 2.15 Connecting via putty under Windows
(2) If the first connection is SSH connection, you will be prompted to connect to the unknown host, you can safely ignore the message;
(3) By default, the root user is not set the password, if prompted to enter the password, you only need to press ENTER directly;
(4) If you see the following message, you have successfully connected:
[Email protected]:~#
Using SSH connection via EthernetBeaglebone Black
It is estimated that you have the idea of using a network cable to connect Beaglebone, so let's put the idea into practice:
(1) If you are using Beaglebone, make sure that the microSD card that has been written to the system is inserted into the card slot.
(2) Connect the Beaglebone to the router using a network cable, then plug the 5V DC adapter into the onboard power Jack.
(3) Connect via SSH:
- Q If you are using a Mac, enter SSH [email protected] in the terminal application (ref. 2.5.2).
- Q If you are using Linux, enter SSH [email protected] in the terminal (refer to 2.5.2).
- Q in Windows, you need to download putty and Bonjour Print Services for Windows, and then enter [email protected] as the hostname "host name" and make sure that "Connection type" For SSH, finally click the Open button, shown in 2.16.
Figure 2.16 Using the Putty Connection in Windows 2.17 message after successful connection
(4) If the first connection is SSH, you will be prompted to connect to an unknown host, and you can safely ignore this message.
(5) By default, the root user does not set the password, if you are prompted to enter the password, you only need to press ENTER directly.
(6) If you see the information shown in 2.17, then you have successfully connected.
Beaglebone Black connects the keyboard, mouse, and monitor
If you're using Beaglebone Black, you can connect the keyboard, mouse, and HDMI monitor directly to him. Since there is only one USB port on the Beaglebone, you need to use the USB hub to connect the keyboard and mouse. When Beaglebone Black starts, the LXDE desktop environment appears in front of you, as shown in 2.18.
Figure 2.18 GNOME desktop environment Figure 2.19 Terminal path
The terminal can be opened via accessories->lxterminal, shown in 2.19.
In this book, the vast majority of operations are centered on the command line. Of course, actions such as creating, modifying, and moving files can be performed in a desktop environment, all of which are similar to Windows or Mac operating systems.
Connect via USB using serial portBeaglebone Black
In 2.2.8 we introduced the serial plug, which can be used to transfer data in a serial manner with the board, which of course includes the control system. In the event of a problem with your network, it is very convenient to use a serial connection, and the system will output the boot information from the serial port, which is helpful for the ability of the reader to debug the system, as shown in 2.18.
Figure 2.18 Infographic of output at system startup 2.19 FTDI USB to serial adapter
Of course, if you can easily connect using SSH, you don't have to connect this way, but you have to keep it in your head for a rainy moment. This connection is slightly different between Beaglebone and Beaglebone black. If you are using Beaglebone, then you only need to use USB A to Mini B line. And if you're using Beaglebone Black, you'll need to use the FTDI USB to the serial adapter (2.19) or the prolific PL2303 USB to the serial adapter (2.20), which are not as common as USB.
Figure 2.20 PL2303 USB to serial adapter diagram 2.21 Putty settings
The following describes the operations of Beaglebone and Beaglebone black under OS X, Linux, and Windows respectively.
1. Connect via serial mode under OS X or Linux Beaglebone
(1) If you have not previously connected, you need to refer to 2.5.1 section to install the driver.
(2) Insert the Micro SD card and connect the board to the computer using a USB cable.
(3) Open the terminal application and enter the following command:
- Screen ' ls/dev/{tty.usb*b,beaglebone-serial} ' 115200
Note: If the screen command is not available, you need to first install screen through the Package manager.
(4) At this point, an empty screen with a blinking cursor appears. Press ENTER to display the login screen.
(5) Log in with the root user name.
(6) The default state is that no password is set, you will be prompted to enter the password between the information to press ENTER.
(7) to exit and disconnect to the Beaglebone, you only need to enter control A and then output K.
2. Connect via serial mode under Windows Beaglebone
(1) If you have not previously connected, you need to refer to 2.5.1 section to install the driver.
(2) Insert the Micro SD card and connect the board to the computer using a USB cable.
(3) Download and install Putty (refer to 2.5.1) and start putty.
(4) The connection type is selected as shown in serial,2.21.
(5) Get the serial number from the Device Manager. Press the Windows+r key, enter devmgmt.msc and click the OK button. Find the port number in Device Manager, 2.22 (COM3 in the figure).
Figure 2.22 Viewing the port number Figure 2.23 setting the string number and transfer rate
(6) Fill the port number into the Putty serial line and set the transfer rate to 115200, 2.23.
(7) Leave the remaining settings by default and click the Open button.
(8) At this point, an empty screen with a blinking cursor appears. Press ENTER to display the login screen.
(9) Log in with the root user name.
(10). The default state is that no password is set, and you can press enter between the information you are prompted to enter the password.
3. Connect via serial mode under OS X or Linux Beaglebone Black
(1) If you have not previously connected, you need to refer to 2.5.1 section to install the driver.
(2) Connect the USB port to your computer.
(3) If you are using a FTDI line, plug the Gnd toward the end of the network interface into the serial plug J1. If you are using a prolific PL2303 USB-to-serial adapter you will need to connect the black line (GND) to number 1th (the first pin at one end of the specified proximity network interface is 1) pin, Green Line (RXD) connection on port 4th, white line (TXD) connected at Port 5th.
(4) Open the terminal application, and in OS X, enter the following command:
- Screen ' ls/dev/tty.usbserial-* ' 115200
In Linux, you need to see the device name through the dmsg command, as shown in 2.24.
Figure 2.24 Viewing the device name Figure 2.25 Log in System
The device name shown in Figure 2.24 is ttyUSB0, so execute the following command in the Linux terminal:
- Screen ' ls/dev/ttyusb* ' 115200
Note: If the screen command is not available, you need to first install screen through the Package manager.
(5) At this point, an empty screen with a blinking cursor appears. Press ENTER to display the login screen.
(6) Log in with the root user name.
(7) The default state is that no password is set, and the message that you are prompted to enter the password is entered, as shown in 2.25.
(8) to exit and disconnect to the Beaglebone, you only need to enter control A and then output K.
4. Connect Beaglebone Black in serial mode under Windows
(1) If you have not previously connected, you need to refer to 2.5.1 section to install the driver.
(2) Connect the USB port to your computer.
(3) If you are using a FTDI line, plug the Gnd toward the end of the network interface into the serial plug J1. If you are using a prolific PL2303 USB to a serial adapter, you will need to connect the black line (GND) to number 1th (the first pin to 1 on one end of the specified proximity network interface) PIN, Green Line (RXD) connection on port 4th, white Line (TXD) to Port 5th.
(4) Download and install Putty (refer to 2.5.1) and start putty.
(5) The connection type is selected as shown in serial,2.26.
Figure 2.26 Putty setting Figure 2.27 Determining the port number
(6) Get the serial number from Device Manager: Press the Windows+r key, enter devmgmt.msc and click OK, find the port number in Device Manager, 2.27 (COM8 in the figure).
(7) Leave the remaining settings by default and click the Open button.
(8) At this point, an empty screen with a blinking cursor appears. Press ENTER to appear in the login screen, 2.28 shown.
(9) Log in with the root user name.
(10). The default state is that no password is set, and the message that you are prompted to enter the password is entered, as shown in 2.29.
Figure 2.28 Login Interface Figure 2.29 Log in System
At this point, various connection methods have been introduced. In the next section, you'll also describe another way to connect to Beaglebone-using the Cloud9 IDE. Of course, the best way is to connect your beaglebone to the Internet, in which case you can use the command line via SSH, manage files using SFTP, and access the Internet on Beaglebone, which will be described in the 4th chapter.
This article is selected from: Beaglebone Black Quick Start Tutorial University pa Internal information, reproduced please indicate the source, respect the technology respect the IT person!
Beaglebone Black Tutorial Beaglebone Black device Connection