Beaglebone Blue Guide
Beaglebone Blue is a Linux Debian-based OS device that allows users to experiment with robotic projects. There are 3 ways to power the board. You can plug all 3 power sources at the same time without any problems.
Update BBB Debian
- BBB can run from 2 storage sources:
- SD Card
- eMMC (Embedded Multi Media Card): storage soldered directly onto the board.
- Out of the box, BBB has a pre-installed Debian OS that users can use right away.
- If you need to update the Debian OS, follow the instructions below.
Images Download
Image Download LinkDebian 9.5 2018-10-07 4GB SD IoT (Allows the BBB to boot directly from the SD card) [MATLAB compatible!!!]
Debian 9.5 2018-10-07 4GB SD IoT eMMC flasher (Requires the BBB to flash the eMMC before use)
Flash Image eMMC Flasher
- Download BalenaEtcher
- Flash the downloaded image to the SD card using BalenaEtcher
- Put the SD card into the BBB card slot
- Hold the SD button on the BBB while connecting it to the PC
- Wait until the LED flashes, then release the SD button
- When new storage appears on the PC, the BBB is ready to use
Flash Image Non-eMMC Flasher
Follow the procedure from the "Flash Image eMMC Flasher" section.
- Connect to the BBB via the browser Cloud9 IDE at:
192.168.7.2:3000
- Navigate to
/opt/scripts/tools/eMMC
and executeinit-eMMC-flasher
: - BBB will begin flashing mode. Do not disconnect the power.
- Wait until the LEDs completely shut down, then unplug and replug the power.
cd
cd opt/scripts/tools/eMMC
sudo ./init-eMMC-flasher-v3.sh
Connect to WiFi
On the Terminal in Cloud9 IDE, run the following commands:
connmanctl
tether wifi off
enable wifi
scan wifi
services
agent on
connect {wifi name ex:wifi_f45eab_.................}
password
exit
Shutdown BBB
sudo shutdown now
Auto Execute Program on Startup
Verify Executable Application
Ensure you have a main compiled file ready to run by executing it via ./name_program
. For
Simulink-generated files:
- On BBB terminal in Cloud9:
mkdir name_of_folder
- On Simulink, go to
config
and change the target folder to the one created on BBB. Run the build. - On BBB, go into the folder and run the file to verify it works:
cd name_of_folder sudo ./name_program.elf
Create Auto Execute
After the file is working properly, follow these steps to make it auto start:
- Create a shell script in
/usr/bin/
and make it executable:cd /usr/bin/ sudo touch name.sh sudo chmod u+x /usr/bin/name.sh sudo nano name.sh
Place the following code in the script and modify it to your needs:
#!/bin/bash cd /home/debian/name_of_folder sudo ./name_program.elf
- Create a service file in
/lib/systemd/
(or/lib/systemd/system/
):cd /lib/system/ sudo touch my_srv.service sudo nano my_srv.service
Insert the following content:
[Unit] Description=description of code After=syslog.target network.target [Service] Type=simple ExecStart=/usr/bin/name.sh [Install] WantedBy=multi-user.target
- Create a symbolic link between your script and
/etc
:sudo ln -s /lib/systemd/my_srv.service /etc/systemd/system/my_srv.service
- Start the service:
sudo systemctl daemon-reload sudo systemctl enable my_srv.service sudo systemctl start my_srv.service
- Reboot to take effect:
sudo reboot now
- Control the service:
sudo systemctl status my_srv.service sudo systemctl stop my_srv.service sudo systemctl start my_srv.service sudo systemctl disable my_srv.service