Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to connect BeagleBone Black devices

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to connect BeagleBone Black devices. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Materials that need to be prepared before BeagleBone Black development

After the above introduction, I believe you have a general understanding of BeagleBone, you need to note that there may be many different ways to accomplish one thing. So, depending on the project you want to complete, the materials you need will be different, and the following materials can help you complete most of the projects in this book, but not necessary:

Q BeagleBone or Beaglebone Black

Q 5V DC adapter

Q network line

Q USB A to mini B line

Q bread plate

Q jumper

Q LED several

Q resistance of various specifications

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 operating system

Like a computer, BeagleBone has an operating system that defaults to the open source, free Linux operating system. Of course, BeagleBone officially 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 offers a wide range 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 time of the factory, Debian Linux was installed in the BeagleBone Black board memory. If you are using BeagleBone, install it in your Micro SD card. Because the development of this system is very fast, you can keep the latest version at any time using this system (Appendix A provides a way to update the system image). The author recommends using the default Debian Linux system, because this operating system is officially supported, and the development and testing of the system are carried out on BeagleBone, which makes the system more robust and it is very convenient to manage software packages on Debian Linux.

Connect to your Beaglebone

As mentioned earlier, there are many different ways to accomplish a thing, and this sentence is particularly relevant in this section. This section will lead you to connect to the command line terminal of BeagleBone, and there are five ways to connect. On the command line, you can create and execute commands, manage systems, and get board information. Normally, we can connect using the Ethernet interface, but if the network connection is not available, we need to use some other methods.

Install BeagleBone Black through USB connection and driver

Documents and drivers are already stored in BeagleBone's on-board storage, which can help you connect to BeagleBone more easily. Using USB to connect to BeagleBone is mainly divided into the following steps:

(1) if you are using BeagleBone, make sure that the MicroSD card written to the latest version of the system has been inserted into the card slot.

(2) connect BeagleBone to your computer via USB A to mini B USB.

(3) after about 20 seconds, a removable storage device will appear in your disk list, as shown in figure 2.8. Open the device and double-click the START.htm in it to open the START HTML document in your default browser. The contents of the document are shown in figure 2.9.

Figure 2.8 removable device

Figure 2.9 START HTML documentation figure 2.10 install the corresponding driver

(4) Select the driver for the corresponding system and install it in the Install drivers step, as shown in figure 2.10.

(5)。 Enter the address http://192.168.7.2/ in your browser to access BeagleBone 101, as shown in figure 2.11. The server for this page is BeagleBone, which contains a lot of information about the board, including some interactive examples using Bonescript, as shown in figure 2.12.

Figure 2.11 BeagleBone 101an example of figure 2.12 Bonescript

If you are interested, this section must be very easy for you. We will return to using Bonescript in Section 7, and now we need to learn a way to connect using the command line.

Connect to BeagleBone Black using SSH through USB

This connection still requires only connecting the BeagleBone to the computer using a USB cable, and then perform the following steps:

(1) Open the terminal and connect to BeagleBone.

Q if you are using Mac, open the terminal application (in the utility) and type ssh root@192.168.7.2 at the command line prompt, as shown in figure 2.13.

Figure 2.13 SSH connection under Mac figure 2.14 SSH connection under Linux

Q if you are using Linux, enter the command ssh root@192.168.7.2 in the terminal, as shown in figure 2.14.

Q if you are using the Windows operating system, you need to install PuTTY (official website http://www.putty.org/). After typing root@192.168.7.2 in "Host Name" and ensuring that "Connection type" is SSH, click the Open button, as shown in figure 2.15.

Figure 2.15 connecting through PuTTY under Windows

(2) if this is the first time to connect by SSH, you will be prompted to connect to an unknown host, and you can safely ignore this message.

(3) root users do not set a password by default. If you are prompted to enter a password, you only need to press enter directly.

(4) if you see the following prompt, you have successfully connected:

Root@beaglebone:~#

Connect to BeagleBone Black using SSH through Ethernet

You probably had the idea of using a network cable to connect to BeagleBone a long time ago, so let's put this 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, and then plug the 5V DC adapter into the onboard power Jack.

(3) connect through SSH:

Q if you are using Mac, type ssh root@beaglebone.local in the terminal application (reference 2.5.2).

Q if you are using Linux, type ssh root@beaglebone.local in the terminal (reference 2.5.2).

Q in Windows, you need to download PuTTY and Bonjour Print Services for Windows, then type "Host Name" as the hostname root@beaglebone.local, and make sure "Connection type" is SSH, and finally click the Open button, as shown in figure 2.16.

Figure 2.16 using PuTTY connection under Windows figure 2.17 prompts after a successful connection

(4) if this is the first time to connect by SSH, you will be prompted to connect to an unknown host, and you can safely ignore this message.

(5) by default, root users do not set a password. If you are prompted to enter a password, just press enter directly.

(6) if you see the message shown in figure 2.17, you have successfully connected.

BeagleBone Black connects keyboard, mouse and monitor

If you are using Beaglebone Black, you can connect the keyboard, mouse and HDMI monitor directly to it. Since there is only one USB port on the Beaglebone, you need to use USB HUB to connect the keyboard and mouse. When Beaglebone Black starts, the LXDE desktop environment appears in front of you, as shown in figure 2.18.

Figure 2.18 GNOME Desktop Environment figure 2.19 Terminal path

You can open the terminal through Accessories- > LXTerminal, as shown in figure 2.19.

In this book, the vast majority of operations focus on the command line. Of course, operations 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.

Use serial port to connect BeagleBone Black through USB

In Section 2.2.8 we introduced the serial plug, through which data can be transmitted to the board in a serial manner, including the control system, of course. When there is something wrong with your network, it is very convenient to connect in serial mode, and the system will output all the startup information from the serial port, which will help competent readers to debug the system, as shown in figure 2.18.

Figure 2.18 output of the system at startup figure 2.19 FTDI USB to serial adapter

Of course, if you can connect easily using SSH, you don't have to connect in this way, but you have to keep it in mind for a rainy day. This connection is slightly different between BeagleBone and BeagleBone Black. If you are using BeagleBone, then you only need to use the USB A to Mini B lines. If you are using BeagleBone Black, you need to use either FTDI USB-to-serial adapters (figure 2.19) or Prolific PL2303 USB-to-serial adapters (figure 2.20), which are not as common as USB.

Figure 2.20 PL2303 USB to Serial Adapter figure 2.21 PuTTY setup

Here are the operations of BeagleBone and BeagleBone Black under OS X, Linux and Windows, respectively.

1. Connect BeagleBone serially under OS X or Linux

(1) if you have not connected before, you need to refer to Section 2.5.1 to install the driver.

(2) insert the Micro SD card and connect the board to the computer with 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 install screen first through the package manager.

(4) at this point, an empty screen plus a flashing cursor appears. Press enter to display the login screen.

(5) Log in using the root user name.

(6) No password is set by default. Press enter when you encounter the information prompted to enter the password.

(7) to exit and disconnect from BeagleBone, simply enter Control An and then output K.

two。 Connect BeagleBone in serial mode under Windows

(1) if you have not connected before, you need to refer to Section 2.5.1 to install the driver.

(2) insert the Micro SD card and connect the board to the computer with USB cable.

(3) download and install PuTTY (see 2.5.1) and start PuTTY.

(4) Select Serial as the connection type, as shown in figure 2.21.

(5) get the string number from the device manager. Press Windows+ R, enter devmgmt.msc and click the OK button. Locate the port number in device Manager, as shown in figure 2.22 (COM3 in the figure).

Figure 2.22 look at the port number figure 2.23 set the string number and transfer rate

(6) fill in the port number in the Serial line of PuTTY and set the transfer rate to 115200, as shown in figure 2.23.

(7) keep the rest of the settings by default, and then click the Open button.

(8) at this point, an empty screen plus a flashing cursor appears. Press enter to display the login screen.

(9) Log in using the root user name.

(10)。 The default state is that the password is not set. Press enter between the messages prompted for the password.

3. Connect BeagleBone Black serially under OS X or Linux

(1) if you have not connected before, you need to refer to Section 2.5.1 to install the driver.

(2) connect USB port to your computer.

(3) if you are using an GND cable, plug the FTDI into the serial plug J1 toward the end close to the network interface. If you are using a Prolific PL2303 USB-to-serial adapter, you need to connect the black cable (GND) to pin 1 (the first pin at the end close to the network interface is 1), the green cable (RXD) to port 4, and the white cable (TXD) to port 5.

(4) Open the terminal application, and in OS X, enter the following command:

Screen `ls / dev/tty.usbserial-* `115200

In Linux, you need to first view the device name through the dmsg command, as shown in figure 2.24.

Figure 2.24 View device name figure 2.25 log in to the system

The device shown in figure 2.24 is named 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 install screen first through the package manager.

(5) at this point, an empty screen plus a flashing cursor appears. Press enter to display the login screen.

(6) Log in using the root user name.

(7) No password is set by default. Press enter when you encounter the information prompted for the password, as shown in figure 2.25.

(8) to exit and disconnect from BeagleBone, simply enter Control An and then output K.

4. Connect BeagleBone Black in serial mode under Windows

(1) if you have not connected before, you need to refer to Section 2.5.1 to install the driver.

(2) connect USB port to your computer.

(3) if you are using an GND cable, plug the FTDI into the serial plug J1 toward the end close to the network interface. If you are using a Prolific PL2303 USB-to-serial adapter, you need to connect the black cable (GND) to pin 1 (the first pin near the end of the network interface is specified as 1), the green cable (RXD) to port 4, and the white cable (TXD) to port 5.

(4) download and install PuTTY (see 2.5.1) and start PuTTY.

(5) Select Serial as the connection type, as shown in figure 2.26.

Figure 2.26 setting of PuTTY figure 2.27 determines the port number

(6) get the string number from the device manager: press the Windows+ R key, type devmgmt.msc and click OK, and find the port number in the device manager, as shown in figure 2.27 (figure COM8).

(7) keep the rest of the settings by default, and then click the Open button.

(8) at this point, an empty screen plus a flashing cursor appears. Press enter to display the login screen, as shown in figure 2.28.

(9) Log in using the root user name.

(10)。 The default state is that the password is not set. Press enter when prompted for the password, as shown in figure 2.29.

Figure 2.28 login interface figure 2.29 login system

At this point, various connection methods have been introduced. In the next section, I'll talk about another way to connect to BeagleBone-- using Cloud9 IDE. Of course, the best way is to connect your BeagleBone to the Internet, which allows you to use the command line through SSH, manage files using SFTP, and access the Internet on BeagleBone.

This is the end of the article on "how to connect BeagleBone Black devices". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report