Skip to content

Using the BBB on Windows

Meina edited this page Aug 2, 2020 · 6 revisions

Using the BeagleBone Black on Windows:

Note: BBB is a short form for BeagleBone Black.

Note: To be able to connect to the BBB from your computer, the operating system of the BBB must alreday be installed on your computer. If this is not the case, please follow the guide for that first before continuing.

To compile your project onto the BeagleBone, you will need to learn how to connect the BBB to your computer and mount the BBB file system onto your computer as well. At the end of this guide, there are instructions for adding aliases (basically shortcuts) to avoid typing out command line functions repeatedly.

Summary of the guide:

  • User: hyped

  • Password: spacex

  • BeagleBone IP Address on Windows: 192.168.7.2

To connect via ssh:

Step 1: SSH

  1. Connect the BBB to your computer using the USB cable. This will cause the BBB to power on and some blue lights will start flashing. It may take a couple of minutes for your computer to detect that it is connected.

To communicate with the BBB from your laptop, we will use SSH. If SSH is not installed on your computer, you can install it by running the following command (for WSL users only) in your terminal:

$ sudo apt-get install ssh

For Cygwin users, open up the cygwin setup and select ssh package for installation.

  1. With SSH installed, you can connect to the BBB by launching terminal and running the ssh command. ssh has the following command:
$ ssh user@address

In our case the user is hyped and the address is the IP address of the BeagleBone - 192.168.7.2.

Therefoe, your command should look like this:

  1. You will then be prompted to enter Hyped's password, which is: spacex

If this is your first time connecting to the BBB you should get a warning message which is normal, just continue and your computer should be connected.

If you are prompted with an error message (something along the lines of "SOMEONE TRIED TO BREAK INTO THE SYSTEM"), then see the Troubleshooting section below.

Step 2: Mounting the file system

Before you attempt to mount BBB's file system, make sure you are able to ssh to the BBB.

Then, install these drivers: Winfsp SSHFS-WIN

Then, follow these steps:

  1. open your file explorer (Win+E)
  2. go to This PC
  3. At the top panel, select Computer->Map Network Drive
  4. Select drive letter to use and type folder \\sshfs\[email protected]\ to mount the home folder of the BBB onto the new drive
  5. Type in the password if requrested.

After this, the new drive should contain the BBB's file system. On cygwin, you can access it on path cd /cygdrive/<your_drive_letter>

NOTE: For remote BBB, you can use:

  1. ssh -f @student.ssh.inf.ed.ac.uk -L <random_4_digit_port>:<remote_BBB_IP>:22 -N
  2. check you can ssh directly to BBB by `ssh -p <random_4_digit_port> hyped@localhost
  3. If yes, use mount folder in Windows \\sshfs\hyped@<remote_BBB_IP>!<random_4_digit_port>\

Troubleshooting:

If you have connected to a different BeagleBone before and try connecting again your computer might not let you.

The solution for this is to enter the following command in the terminal:

$ ssh-keygen -R 192.168.7.2

This will reset your computer's memory of previous devices at that IP address and allow the connection to the new device.

Setting up aliases

  • Typing in these commands is a pain when you need to use the BBB repeatedly. This section will teach you how to manipulate bash script on your computer to save these various commands of this guide to your computer.
  1. Open a new terminal and navigate to your home directory:
$ cd
  1. Type the command ls -a and a list of files will appear. There should be a file called .bashrc. Open that file in terminal with nano:
$ ls -a
$ nano .bashrc
  1. Within this script, type the following lines below the preexisting text. Make sure to replace <insert_path_here> with the path to the mount directory you created earlier.
BBB=192.168.7.2

alias sshclean="ssh-keygen -R $BBB"
alias sshBBB="ssh hyped@$BBB"
  1. To exit nano, press ctrl+x, then hit enter twice when prompted to save the script
  2. You need to make sure the script is sourced in terminal. To test this, close the terminal window and open a new terminal window to its home directory.
  3. Type the following command to if it is sourced:
$ echo $BBB
  1. The output should be 192.168.7.2. If not, type the following command to source the .bashrc script:
$ source ~/.bashrc
  1. Congratulations! You have successfully shortcut commands for the BBB. Next time you connect to the BBB, use sshclean and sshBBB instead of their longer, equivalent commands you learned above.
Clone this wiki locally