Electronic – How to make the Raspberry Pi and BeagleBone Black talk via serial

beaglebone blackraspberry piserial

The BeagleBone Black is great. You plug in the USB cable to your computer and a DHCP connection is established, allowing you to ssh to the BeagleBone in seconds. Unfortunately the Raspberry Pi takes a bit more, and I am in the process of setting it up. I was able to download the raspbian.img to an SD card using my BeagleBone Black using the dd command through the terminal.

Now I have an SD card that should allow the Raspberry Pi to boot into linux, but I have no HDMI cable or monitor, or keyboard to do this.

As I understand it is possible to reach the Raspberry Pi's command line through serial communication. See here. Typically people are doing this using a USB cable with an FTDI USB-Serial chip embedded in it (sold by Adafruit and others).

Is it possible to connect from the BeagleBone Black to the Raspberry Pi's command line through serial communication (such that I can connect to my BeagleBone Black via ssh from my laptop, and then connect to the Raspberry Pi through serial from the BeagleBone Black)?

As I understand there are only 3 pins required – TxD, RxD, and GND.

Unfortunately I see that the Raspberry Pi uses 3.3V logic, and as I understand the BeagleBone Black uses 5V. This means some sort of level shifter circuit should be used.

With the level shifter circuit in place, would it then be straightforward to establish a serial communication between these two boards?

Or should I go with ethernet to connect them and look into setting up DHCP for communication?

enter image description here
enter image description here

Best Answer

The BeagleBone Black has 3.3V logic level signals. Its serial ports are all 3.3V ports. UART0 is tied to the debug header, and is hard coded for the debug log from the BBB. It is not useful for standard communication between two devices.

You have two main options. Luckily, the BBB has multiple UARTs that can be enabled. Turn one of the other UARTs on and connect the appropriate pins from the expansion headers to the RPI. Since the RPI defaults to a UART shell on the serial port, you can ssh into your BBB and then use minicom or similar to talk to the RPI from there.

Alternatively, you can use a USB serial cable on the BBB's USB Host port (or OTG if you needed to). AND you can also do the same on the RPI (so you have two usb to serial cables connected together), but that would require some setup on the RPI, a catch 22.