Getting started with Bela » History » Version 45
Giulio Moro, 2016-06-14 02:14 AM
1 | 19 | Giulio Moro | h1. Getting started with Bela |
---|---|---|---|
2 | 1 | Giulio Moro | |
3 | 1 | Giulio Moro | h2. Prerequisites |
4 | 1 | Giulio Moro | |
5 | 1 | Giulio Moro | Before starting, make sure you have: |
6 | 1 | Giulio Moro | * Beaglebone Black |
7 | 20 | Giulio Moro | * Bela cape |
8 | 1 | Giulio Moro | * standard-A to mini-B USB cable |
9 | 39 | Giulio Moro | * 2GB or larger micro-SD card |
10 | 3 | Giulio Moro | * Optional, but recommended: up to two 3-ways female connectors for audio in/out from the cape. You will probably want some sort of stereo female jack connector at the other end. |
11 | 1 | Giulio Moro | |
12 | 1 | Giulio Moro | h2. Hardware setup |
13 | 1 | Giulio Moro | |
14 | 40 | Giulio Moro | Stack the audio cape on top of the Beaglebone Black (BBB). Make sure all the pins from the cape fit into the socket header of the BBB and that no pin gets bent in the process. |
15 | 1 | Giulio Moro | |
16 | 1 | Giulio Moro | h2. Software setup |
17 | 1 | Giulio Moro | |
18 | 39 | Giulio Moro | In case you did not get a Bela SD card with your kit, you will need to follow the instructions detailed here to flash your own SD card: |
19 | 40 | Giulio Moro | https://github.com/BelaPlatform/bela-image/ |
20 | 39 | Giulio Moro | Once you have your SD card, Insert it into the BBB and plug it into your computer with the USB cable. The BBB will boot Debian and advertise itself to your computer as a network interface. |
21 | 2 | Giulio Moro | |
22 | 39 | Giulio Moro | Communication between the BBB and the host pc takes place through the Ethernet over USB network connection. In order to log into the BBB you need an ssh client and you may need some network drivers according to your operating system, as detailed below. |
23 | 6 | Giulio Moro | |
24 | 5 | Giulio Moro | h3. MacOS users |
25 | 5 | Giulio Moro | |
26 | 36 | Giulio Moro | If you are running *Yosemite* or earlier: |
27 | 45 | Giulio Moro | * install network drivers for the BBB from http://beagleboard.org/static/beaglebone/latest/Drivers/MacOSX/RNDIS/HoRNDIS.pkg . This requires a reboot. |
28 | 36 | Giulio Moro | If you are running *El Capitan*, please make sure you upgrade to 10.11.4 and install HoRNDIS-rel8pre2.pkg instead (from http://nyus.joshuawise.com/HoRNDIS-rel8pre2-dbg.pkg). |
29 | 43 | Giulio Moro | NOTE: earlier versions of *El Capitan* may have troubles with the Beaglebone Black over USB. |
30 | 23 | Giulio Moro | * make sure the BBB is plugged in and booted up (might take up to one minute after you plug it in). |
31 | 44 | Giulio Moro | * Everything should be already working now. Open a browser and go to http://192.168.7.2:3000, the IDE should show up. |
32 | 1 | Giulio Moro | In case the IDE is not showing up and the ssh test below fails, try the following: |
33 | 1 | Giulio Moro | * go to System Preferences->Network, click the + symbol at the bottom left. From the popup window, select "Beaglebone Black" |
34 | 1 | Giulio Moro | * now set the "Configure IP v4" field to "Using DHCP with manual address" and set the IP address to 192.168.7.1 |
35 | 1 | Giulio Moro | !ss_dhcp.png! |
36 | 1 | Giulio Moro | * click apply and wait a few seconds, the indicator close to the icon should turn green |
37 | 1 | Giulio Moro | * jump to the *Test the ssh connection* section below to check that everything is working properly |
38 | 41 | Giulio Moro | |
39 | 41 | Giulio Moro | h3. Linux users |
40 | 41 | Giulio Moro | |
41 | 41 | Giulio Moro | All you need should be already on your machine, jump to *Test the ssh connection* below and have fun! |
42 | 41 | Giulio Moro | If you are having trouble, you may have to manually turn the interface on: the |
43 | 41 | Giulio Moro | <pre>ifconfig</pre> |
44 | 41 | Giulio Moro | command will show you the list of available interfaces on your computer, one of them will be the BeagleBone Black. Once you identify the name of the interface, you have to assign your computer an IP address on that interface: |
45 | 41 | Giulio Moro | <pre>ifconfig interfaceName up 192.168.7.1</pre> |
46 | 41 | Giulio Moro | where you will have to replace interfaceName with the name of the interface connected to the BeagleBone Black. |
47 | 1 | Giulio Moro | |
48 | 5 | Giulio Moro | h3. Windows users |
49 | 5 | Giulio Moro | |
50 | 26 | Giulio Moro | * you will need a toolkit that allows you to use ssh and some other basic shell tools. The shell scripts in this project have been tested with *mingw* http://sourceforge.net/projects/mingw/. Make sure you install also a copy of rsync with it. You will want to note that in order to paste code into the mingw terminal you have to right click on the terminal's title bar and navigate the menu to edit->paste . |
51 | 6 | Giulio Moro | * additionally, you need to install the network drivers from http://beagleboard.org/static/Drivers/Windows/BONE_D64.exe (Windows 64 bit) or http://beagleboard.org/static/Drivers/Windows/BONE_DRV.exe (Windows 32bit) |
52 | 1 | Giulio Moro | * in the network connections manually set thel IP address for the BBB to 192.168.7.1 |
53 | 9 | Giulio Moro | !win.png! |
54 | 32 | Andrew McPherson | * Open a browser and go to http://192.168.7.2:3000, the IDE should show up. In case it does not (or if it does but you plan to use ssh as well) jump to the *Test the ssh connection* section below to check that everything is working properly |
55 | 1 | Giulio Moro | |
56 | 1 | Giulio Moro | h3. Test ssh connection |
57 | 1 | Giulio Moro | |
58 | 27 | Andrew McPherson | When using the USB network connection, the BBB has a self-assigned IP of 192.168.7.2, we will log in with username *root* and an empty password (older images have a password 'a'). |
59 | 1 | Giulio Moro | |
60 | 6 | Giulio Moro | If you have gone through operating system-specific steps above, you should be able to connect to the beaglebone with |
61 | 6 | Giulio Moro | <pre>$ ssh root@192.168.7.2</pre> |
62 | 6 | Giulio Moro | |
63 | 6 | Giulio Moro | According to the settings of your ssh client, you might, or might not, be prompted with something along the lines of |
64 | 6 | Giulio Moro | <pre>The authenticity of host '192.168.7.2 (192.168.7.2)' can't be established. |
65 | 6 | Giulio Moro | RSA key fingerprint is 35:b2:ff:ae:c2:02:30:af:84:1e:0d:f5:c9:c8:4b:34. |
66 | 1 | Giulio Moro | Are you sure you want to continue connecting (yes/no)? </pre> |
67 | 6 | Giulio Moro | type @yes@ and press the return key. |
68 | 6 | Giulio Moro | |
69 | 6 | Giulio Moro | If everything is ok, you will now be displayed the BBB prompt: |
70 | 13 | Andrew McPherson | <pre>root@arm ~#</pre> |
71 | 6 | Giulio Moro | |
72 | 22 | Giulio Moro | h3. (Optional) ssh config and ssh keys setup |
73 | 1 | Giulio Moro | |
74 | 22 | Giulio Moro | If you set a password on your beaglebone, ssh would require you to enter the password everytime you open a connection to the BBB. This will happen a few times during setup and then 3 times every time you build and run your project. To avoid quickly getting annoyed by this, you can use ssh keys. In the @scripts/@ you will find a setup script which |
75 | 6 | Giulio Moro | * generates (if not exists) a key-pair on your host machine (stored in @~/.ssh/@ ) |
76 | 6 | Giulio Moro | * sets the @~/.ssh/config@ file |
77 | 6 | Giulio Moro | * copies the public key to the BBB |
78 | 16 | Giulio Moro | |
79 | 6 | Giulio Moro | To do so, run the @./setup-ssh-windows.sh@ if you are on Windows or @./setup-ssh.sh@ otherwise from the @scripts/@ folder |
80 | 5 | Giulio Moro | |
81 | 1 | Giulio Moro | This way you will be able to log into the BBB simply typing: |
82 | 7 | Giulio Moro | <pre>ssh bbb</pre> |
83 | 5 | Giulio Moro | |
84 | 1 | Giulio Moro | h2. Build your first project |
85 | 4 | Giulio Moro | |
86 | 20 | Giulio Moro | Clone the Bela repository to your machine using Mercurial: |
87 | 28 | Andrew McPherson | <pre>hg clone https://code.soundsoftware.ac.uk/hg/beaglert</pre> |
88 | 20 | Giulio Moro | or download a zip file of the archive from https://code.soundsoftware.ac.uk/hg/BeagleRT/archive/default.zip |
89 | 10 | Giulio Moro | |
90 | 20 | Giulio Moro | Do you want to experience C++ development from a web browser? Open a new tab and you are ready for [[ Compiling Bela projects in a web browser]] |
91 | 20 | Giulio Moro | Do you want to get started immediately, without need to install any software on your machine? Grab a terminal and learn about [[ Compiling Bela projects on the board]] |
92 | 20 | Giulio Moro | Do you want to turn your computer into a cross-compiling machine, with the advantages of an IDE and you are willing to put (some) effort into it? [[ Compiling Bela projects in Eclipse]] |