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.
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.
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. http://elinux.org/Beagleboard:BeagleBone_Black_Serial
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:
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
user@host: sudo systemctl restart ser2net.service
8. On the VM change localhost to host's IP Address (Machine that is connected serially to BBB):
vagrant@guest: sed -i 's/localhost/<host_ip>/g' mybbb.dat
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. Update device dictionary:
vagrant@guest:$ sudo cp mybbb.dat /etc/lava-server/dispatcher-config/devices/bbb01.jinja2
10. Connect to the BBB using the serial port.
vagrant@guest:~$ telnet <host_ip> 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] Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian The IP Address for usb0 is: 192.168.7.2 beaglebone login:
Note: To disconnect from this login session with the BBB simple press Ctrl-] and press q and Enter at the telnet> prompt
11. Connect an Ethernet Cable from the Ethernet switch to the BBB's RJ-45 connector and connect to BBB using SSH.
[host@user ~]$ ssh email@example.com
Debian GNU/Linux 7 beaglebone ttyO0 Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian default username:password is [debian:temppwd] firstname.lastname@example.org's password: temppwd Last login: Fri Feb 3 22:05:01 2017 from 10.0.0.4 debian@beaglebone:~$ exit
12. Exit the
debian login and login as
debian@beaglebone:~$ exit logout Debian GNU/Linux 7 beaglebone ttyO0 default username:password is [debian:temppwd] The IP Address for usb0 is: 192.168.7.2 beaglebone login: root root@beaglebone:~#
13. Change the root password to
Changing password for root. Enter new UNIX password: lavauser123 Retype new UNIX password: lavauser123 passwd: Authentication token updated
14. 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.
16. 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