User Tools

Site Tools


Beaglebone Black Setup & Configuration (3/5)

This set of instructions assumes you have already Setup and Configured the B@D Virtual Machine. If that is not the case please go back to the B@D Setup and Configuration wiki page. If you are using the 1.0 release rather than the latest version for git you need to read an older version of this page.

If you are using the Renesas IWG20M board see this page.

Working with the Beaglebone Black

At this point in the process, things get very device-specific. The Beaglebone-Black is used as an example simply because it is the first device chosen by the CIP Members team and it is a well documented example in LAVA. The eLinux website has an excellent Beaglebone Black Reference.

Cabling to the Beaglebone Black

  • The Beaglebone Black should be powered using the wall plug.
  • The USB cable that comes with the BBB can power the board, but this is not recommended when loading a kernel.
  • The USB-to-Serial FTDI cable provides a way to view the BBB console.
  • The Ethernet cable is used to connect the BBB to the LAN and allows the user to make an SSH connection to the BBB.

Connecting the FTDI (USB to Serial) Cable

1. Connect the cable to the Serial Port located on connector J1 There are a couple of different styles of FTDI cables. Some have a 6-socket connector and some have three leads with single sockets. Overall, this is not a big issue since the pinout is the same. You can use this link to determine which wires go where.

2. The Serial Header is on connector J1 which is located next to the long black female connector on the same side of the board that the 5VDC power supply plugs in. Pin 1 is closest to the 5VDC power supply connector.

The cable pinout is shown below. It has three separate leads that are Blue, Red & Green. Connect them as shown:

 Board     Wire     Function
 Pin 1.....Blue.....Ground
 Pin 4.....Red......Receive
 Pin 5.....Green....Transmit

Note: The wire colors are manufacturer-dependent. Please check the documentation provided with your cable.

3. The default serial port settings for the Beaglebone Black are as follows:

  • Baud Rate: 115,200
  • Data Bits: 8
  • Parity: N
  • Stop Bits: 1
  • Handshake: None

4. The CIP Testing project uses the ser2net serial-to-network proxy program to allow communications with the BBB by assigning it an Ethernet port on the host machine. This way, a developer can communicate to the BBB over the serial port as if it had an IP Address. A typical use would be connecting to the BBB using the telnet program: telnet <Host's IP Address> <port#>

Note that if you are using a Windows 10 host then you must use ser2net on the B@D Virtual machine. In this case follow steps 15/16 and then move back to step 9.

5. Verify on your host machine (if necessary installing ser2net first) the ser2net.conf configuration file to ensure the serial port is correct for the CIP B@D Virtual Machine.

user@host:~$ tail /etc/ser2net.conf

The last line below shows that serial port /dev/ttyUSB0 is routed to the host PC's IP Address, port 8020.

 # The original config file shipped with the upstream sources can be
 # found in /usr/share/doc/ser2net/examples
 BANNER:banner:\r\nser2net port \p device \d [\s] (Debian GNU/Linux)\r\n\r\n
 2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner
 2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner
 3000:telnet:600:/dev/ttyS0:19200 8DATABITS NONE 1STOPBIT banner
 3001:telnet:600:/dev/ttyS1:19200 8DATABITS NONE 1STOPBIT banner
 8020:telnet:0:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT banner

6. If your FTDI cable uses a different USB port, edit the ser2net.conf file on the host.

user@host:~$ sudo nano /etc/ser2net.conf

7. Restart the ser2net daemon.

user@host: sudo systemctl restart ser2net.service

8. B@D now uses a private network so that the host IP address no longer needs setting in the device dictionary. If your local IP address settings are such that a change is necessary from the default, edit mybbb.dat appropriately and then copy it into the device dictionary:

vagrant@guest:$ sudo cp mybbb.dat /etc/lava-server/dispatcher-config/devices/bbb01.jinja2

Note: If you have multiple IP addresses (e.g. due to WiFi and Ethernet both being active) then it is recommended that you disable all but one network interface.

If you don't wish to change the root password of the board then edit the first line of mybbb.dat so that lavauser123 is replaced by your current board password. Or you can change it when logged in via telnet (see next step)

9. Connect to the BBB using the serial port.

vagrant@guest:~$ telnet 8020

 Trying ::1...
 Connected to localhost.
 Escape character is '^]'.
 ser2net port 8020 device /dev/ttyUSB0 [115200 N81] (Debian GNU/Linux)
 Debian GNU/Linux 7 beaglebone ttyO0
 default username:password is [debian:temppwd]
 The IP Address for usb0 is:
 beaglebone login: 

Note: To disconnect from this login session with the BBB simple press Ctrl-] and press q and Enter at the telnet> prompt

Using an Ethernet Cable

10. Connect an Ethernet Cable from the Ethernet switch to the BBB's RJ-45 connector and connect to BBB using SSH.

[host@user ~]$ ssh debian@

 Debian GNU/Linux 7 beaglebone ttyO0
 default username:password is [debian:temppwd]
 debian@'s password: temppwd
 Last login: Fri Feb  3 22:05:01 2017 from
 debian@beaglebone:~$ exit

11. Exit the debian login and login as root

 debian@beaglebone:~$ exit
 Debian GNU/Linux 7 beaglebone ttyO0
 default username:password is [debian:temppwd]
 The IP Address for usb0 is:
 beaglebone login: root

12. Change the root password to lavauser123

root@beaglebone:~# passwd

 Changing password for root.
 Enter new UNIX password: lavauser123
 Retype new UNIX password: lavauser123
 passwd: Authentication token updated  

13. Next, before you test the B@D Virtual Machine Setup with the Beaglebone Black and the CIP Linux Kernel, you will need to create an initramfs with BusyBox for the Beaglebone Black.

14. Next 2 steps are Windows 10 Only On the Windows host, run VirtualBox, select the VM and enable the FTDI filter - see screenshot:

15. On the VM change localhost to the VM's IP Address (use ip addr and the IP address associated with eth1):

vagrant@guest: sed -i 's/localhost/<vm_ip>/g' mybbb.dat

 Now move back to step 9.

Back to the B@D Setup and Configuration wiki page

civilinfrastructureplatform/beagleboneblackboard.txt · Last modified: 2018/09/13 13:08 by rajmarshall