Difference between revisions of "Satellite CCRMA (Alpha Release)"

From CCRMA Wiki
Jump to: navigation, search
(Required Hardware)
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
Here we provide instructions for getting the alpha version of Satellite CCRMA up and running.
+
By [https://ccrma.stanford.edu/~eberdahl/ Edgar Berdahl] and [http://wendyju.com/ Wendy Ju]
 +
 
 +
Here we provide instructions for getting the alpha release of Satellite CCRMA up and running.
 +
 
  
 
== Required Hardware ==
 
== Required Hardware ==
* [http://beagleboard.org/Hardware Beagleboard Rev C4]
 
  
* 4GB SD card or larger
+
** Either the [http://beagleboard.org/hardware-xM Beagleboard-xM], or less conveniently
 +
 
 +
**  the original [http://beagleboard.org/Hardware Beagleboard Rev C4] with [http://www.amazon.com/GWC-Technology-HE2440-Ethernet-Adapter/dp/B003LXEI8I GWC Technology HE2440 USB 2.0 4-Port Hub with Ethernet Adapter]
  
* [http://www.amazon.com/GWC-Technology-HE2440-Ethernet-Adapter/dp/B003LXEI8I GWC Technology HE2440 USB 2.0 4-Port Hub with Ethernet Adapter]
+
* 4GB SD card or larger (Find the appropriate Satellite CCRMA SDHC card image on [http://ccrma.stanford.edu/~eberdahl/Satellite the main page].)
  
 
* Two GT Max adjustable-length USB cables
 
* Two GT Max adjustable-length USB cables
Line 20: Line 24:
 
Note: Yes, both the host USB connector (for communication) and client USB connector (for power) on the Beagleboard are connected to the hub!
 
Note: Yes, both the host USB connector (for communication) and client USB connector (for power) on the Beagleboard are connected to the hub!
  
 +
<div align="center">
 +
[[Image:SatelliteTable.png]]
 +
 +
Satellite CCRMA (Alpha release with additional Wifi adaptor plugged in via USB)
 +
</div>
  
 
== Powering Up For The First Time ==
 
== Powering Up For The First Time ==
Line 37: Line 46:
 
If your laptop is currently connected to the Internet using some method other than Ethernet: It can be convenient to enable the Beagleboard to get onto the Internet. Go back to ''System Preferences'' and choose ''Sharing''. Edit the settings so that your Internet connection is shared with the Ethernet port. In order to do this, you may have to disable ''Internet Sharing'' temporarily. Finally, click the ''Internet Sharing'' checkbox to enable this option.
 
If your laptop is currently connected to the Internet using some method other than Ethernet: It can be convenient to enable the Beagleboard to get onto the Internet. Go back to ''System Preferences'' and choose ''Sharing''. Edit the settings so that your Internet connection is shared with the Ethernet port. In order to do this, you may have to disable ''Internet Sharing'' temporarily. Finally, click the ''Internet Sharing'' checkbox to enable this option.
  
You will use the X11 program to login to Satellite CCRMA over the Ethernet connection. Check if this program is already installed. In most recent version of OS X, X11 is installed by default in either the ''Applications'' folder or the ''Utilities'' folder, but in older versions it was necessary to install it from the Developer Tools CD. No matter what, if you cannot find the X11 program on your Mac, download it from [http://xquartz.macosforge.org/trac/wiki/X112.5.3 here].
+
You will use the Terminal program to login to Satellite CCRMA over the Ethernet connection. It should be inside the ''Utilities'' folder inside of ''Applications''.
  
Now open up a window in X11. Your Satellite CCRMA board should choose the IP address 192.168.1.105. To check that it is visible type the command ''ping 192.168.1.105'', and see how fast the network response is. Once you are satisfied, hit Control-C to quit ''ping''. Then, to finally login to Satellite CCRMA, type  
+
Now open up a window in Terminal. Your Satellite CCRMA board should choose the IP address 192.168.1.105. To check that it is visible type the command <tt>ping 192.168.1.105</tt>, and see how fast the network response is. Once you are satisfied, hit Control-C to quit ''ping''. Then, to finally login to Satellite CCRMA, type  
 
+
"ssh -X ccrma@192.168.1.105"
+
  
 +
<tt>ssh -XY ccrma@192.168.1.105</tt>
 
The password should be ''temppwd''.
 
The password should be ''temppwd''.
  
Line 61: Line 69:
 
* Click the "IPv4 Settings" tab.  Change "Method" to "Manual".  Next to "Addresses" click "Add".  In the "Address" column type "192.168.1.1".  In the "Netmask" column type "255.255.255.0". Click "Apply".
 
* Click the "IPv4 Settings" tab.  Change "Method" to "Manual".  Next to "Addresses" click "Add".  In the "Address" column type "192.168.1.1".  In the "Netmask" column type "255.255.255.0". Click "Apply".
  
* In the notification area on your desktop panel, click the NetworkManager Applet icon.  Select the connection you just created.  You now should be able to ssh into the board by typing "ssh -X ccrma@192.168.1.105" in a terminal.
+
* In the notification area on your desktop panel, click the NetworkManager Applet icon.  Select the connection you just created.  You now should be able to ssh into the board by typing "ssh -XY ccrma@192.168.1.105" in a terminal.
  
 
For internet connection sharing, this link might help (I haven't tried it yet):  https://help.ubuntu.com/community/Internet/ConnectionSharing
 
For internet connection sharing, this link might help (I haven't tried it yet):  https://help.ubuntu.com/community/Internet/ConnectionSharing
  
= Software =
+
 
For the simplest use, we recommend installing [http://www.firmata.org Firmata] onto the Arduino nano. This can be done directly from the Beagleboard by running the Arduino software application.
+
 
 +
== Test Run ==
 +
Try issuing some of the following commands to explore the possibilities enabled by Satellite CCRMA:
 +
* <tt>qjackctl &</tt> (Opens up a GUI for starting the [http://jackaudio.org Jack audio server])
 +
* <tt>pd &</tt> (Starts [http://puredata.info/ pure data extended], an environment for graphical programming for sound synthesis)
 +
* <tt>ls /dev/tty*</tt>  (To verify that the Arduino Nano is showing up on <tt>/dev/ttyUSB0</tt>)
 +
* <tt>arduino &</tt> (Starts the Arduino software for programming the Arduino Nano microcontroller attached via USB)
 +
** For instance, you could use the Arduino software to install some [http://www.firmata.org default firmware]. It can be found under File|Examples|Firmata|StandardFirmata.
 +
* Run <tt>audacity &</tt> to edit audio samples.
 +
* Explore employing [http://faust.grame.fr/ Faust] to automatically generate audio DSP code in a variety of environments. The source code for Faust is in <tt>/usr/src/faust</tt>.
 +
* Run the example script in the directory <tt>~/chuck_examples</tt> to takes the [http://chuck.cs.princeton.edu/ ChucK] audio programming language for a spin.
 +
* Type <tt>ping yahoo.com</tt> to see if you are properly sharing your laptop's Internet connection with Satellite CCRMA. If you cannot ping yahoo, then please see the troubleshooting section.
 +
* Use the <tt>wget</tt> command to directly download files from the Internet via URLs.
 +
* Use <tt>scp</tt> to copy files to and from your kit.
 +
* See below for more tips on installing and/or compiling more software.
 +
 
 +
 
 +
 
 +
== Installing New Software ==
 +
If your favorite linux software has been compiled for the ARM architecture, it may be available by way of the ''apt-get'' utility.
 +
 
 +
* To get a list of packages available on the OMAP's ARM architecture, type <tt>sudo apt-cache pkgnames</tt>
 +
 
 +
* You will notice that this list is way too long to look at. You can pipe it to the text file using the command
 +
<tt>sudo apt-cache pkgnames > packages.txt</tt> and then look at it using <tt>emacs packages.txt</tt>, or you search for a particular package, such as <tt>sudo apt-cache pkgnames | grep emacs</tt>.
 +
 
 +
* Or you can compile linux software yourself on the Beagleboard. The gcc, g++ tools etc. are already installed.
 +
 
 +
Type the <tt>df</tt> command. You can see that there is not a whole lot more than 1GB available on the SD card, so you should only install software if you decide that you need it.
 +
 
 +
 
 +
 
 +
== Autonomous Mode ==
 +
It is possible to make Satellite CCRMA run a default program at startup. This way you can prototype devices that are fully autonomous of other systems!
 +
 
 +
Here we show how to cause the Jack audio server and Pure data (with a default patch) to start automatically after the kit boots up.
 +
 
 +
In the terminal, change to the <tt>on-startup</tt> directory by typing <tt>cd ~/on-startup</tt> and type <tt>ls -la</tt> to see what files are in there. You can see that the link (aka alias) <tt>default_patch.pd</tt> points to <tt>windy-day.pd</tt>. In order to enable the default patch to load on boot, rename the file <tt>load_default_patch_disabled</tt> to <tt>load_default_patch</tt> using the command <tt>mv load_default_patch_disabled load_default patch</tt>.
 +
 
 +
The <tt>cat</tt> command can be used to display the contents of any ASCII file. To look at the contents of <tt>load_default_patch</tt>, type <tt>cat load_default_patch</tt>. As you can see, it starts up Jack using the text-based <tt>jackd</tt> instead of <tt>qjackctl</tt>, and then it loads <tt>default_patch.pd</tt> in pd with the graphical user interface (GUI) disabled.
 +
 
 +
To test it, just reboot the kit by typing <tt>sudo reboot</tt> and entering the password <tt>temppwd</tt>. As it is rebooting, plug a pair of ear buds, headphones, or loudspeakers into the 1/8" (2.54mm) jack labeled AUDIO OUT on the beagleboard. Within about a minute, your kit should be fully rebooted. To check this, you can try logging in with SSH. Either way, it should start running <tt>windy_day.pd</tt> upon startup.
 +
 
 +
Once your kit is fully rebooted, if you touch the anaog input pins A0-A7 on the Arduino Nano, it should start making some sound. However, unless you connect up a sensor circuit to some of the analog inputs, the exact behavior may be complicated. In particular, it will depend on the electrical properties of your body (how much sweat is on your fingers, whether you are touching a grounded device such as a laptop with any part of your body. Ask for help if you cannot get any sound.
 +
 
 +
Finally, log back into Satellite CCRMA using the same command as always <tt>ssh -XY ccrma@192.168.1.105</tt>. Type <tt>ps -A</tt> at the prompt to get a list of the currently running processes. <tt>jackd</tt> is the Jack audio sound server, and <tt>pdextended</tt> is the pd process. To stop the default patch from running, type <tt>./stop_default</tt>. To see how <tt>stop_default</tt> works, type <tt>cat stop_default</tt>. (The ./ was necessary in order to run the script <tt>stop_default</tt> because the current user directory ~ is not in the user path, so linux needs the ./ to indicate to look for <tt>stop_default</tt> in the current directory.)
 +
 
 +
 
 +
 
 +
== Halt Your Board When Finished! ==
 +
When you are finished, it is probably best to shut down Satellite CCRMA by issuing the command <tt>sudo halt</tt>, just as you would shut down a linux desktop machine. This ensures that any data that is scheduled to be written to the SD card is written right away.
 +
 
 +
 
 +
 
 +
 
 +
== Appendix: Troubleshooting ==
 +
Tips:
 +
* Type <tt>dmesg</tt> to see if there are any weird messages.
 +
* Check if the Jack audio server has crashed. If so, then restart it.
 +
* Type <tt>ls /dev/tty*</tt> to make sure that the Arduino is showing up on <tt>/dev/ttyUSB0</tt>.
 +
 
 +
Solutions:
 +
* If you are running out of space on the SD card, you can free up some space by deleting items in <tt>/usr/src</tt>. For instance, all of the files needed for building Pure Data Extended are rather large.
 +
* If you are unable to access the internet from Satellite CCRMA, you may need to change the nameservers specified in <tt>/etc/resolv.conf</tt>
  
  
  
<tt> test</tt>
+
== Appendix: Writing the Image to an SD Card ==
 +
See [https://ccrma.stanford.edu/wiki/How_To_Get_Satellite_CCRMA How To Get Satellite CCRMA]

Latest revision as of 03:44, 30 June 2011

By Edgar Berdahl and Wendy Ju

Here we provide instructions for getting the alpha release of Satellite CCRMA up and running.


Required Hardware

  • 4GB SD card or larger (Find the appropriate Satellite CCRMA SDHC card image on the main page.)
  • Two GT Max adjustable-length USB cables
  • Ethernet cable
  • 2.5A 5V switching power adaptor (For example DVE DSA-15P-05 US)
  • Solderless breadboard

Note: Yes, both the host USB connector (for communication) and client USB connector (for power) on the Beagleboard are connected to the hub!

SatelliteTable.png

Satellite CCRMA (Alpha release with additional Wifi adaptor plugged in via USB)

Powering Up For The First Time

Plug the power cable from the 5V supply into the hub. You will see some lights turn on, flickering every now and then. This means that Satellite CCRMA is booting up.


How To Connect

On this page, we explain how to connect to Satellite CCRMA over the Ethernet cable.

Mac OS X

Go to System Preferences, select Network, and choose the Ethernet module. Write down your current settings in case you think that you might need them in the future. (For example, if you use Ethernet to connect to the Internet in your dormitory, you probably want to save these settings for when you go home.) Now change your Ethernet settings to the following:

  • Configure: Manually
  • IP Address: 192.168.1.1
  • Subnet Mask: 255.255.255.0

The remaining items such as Router, DNS Server, and Search Domains can be left blank for now, and click the Apply button in the bottom right to apply the settings.

If your laptop is currently connected to the Internet using some method other than Ethernet: It can be convenient to enable the Beagleboard to get onto the Internet. Go back to System Preferences and choose Sharing. Edit the settings so that your Internet connection is shared with the Ethernet port. In order to do this, you may have to disable Internet Sharing temporarily. Finally, click the Internet Sharing checkbox to enable this option.

You will use the Terminal program to login to Satellite CCRMA over the Ethernet connection. It should be inside the Utilities folder inside of Applications.

Now open up a window in Terminal. Your Satellite CCRMA board should choose the IP address 192.168.1.105. To check that it is visible type the command ping 192.168.1.105, and see how fast the network response is. Once you are satisfied, hit Control-C to quit ping. Then, to finally login to Satellite CCRMA, type

ssh -XY ccrma@192.168.1.105 The password should be temppwd.

Windows 7

<No instructions yet, but it should be analogous to the examples for other operating systems.>

Linux

Instructions for Ubuntu 10.04 Netbook Remix:

  • Run ifconfig in a terminal and look for your wired ethernet device. It will probably be called "eth0". Copy down the value next to HWaddr.
  • Go to "System" -> "Network Connections".
  • Under the "Wired" tab of the dialog that opens click "Add".
  • Set the "Connection name" to something logical, like CCRMA Satellite. Paste the value you copied from HWAddress in the "MAC address" box.
  • Click the "IPv4 Settings" tab. Change "Method" to "Manual". Next to "Addresses" click "Add". In the "Address" column type "192.168.1.1". In the "Netmask" column type "255.255.255.0". Click "Apply".
  • In the notification area on your desktop panel, click the NetworkManager Applet icon. Select the connection you just created. You now should be able to ssh into the board by typing "ssh -XY ccrma@192.168.1.105" in a terminal.

For internet connection sharing, this link might help (I haven't tried it yet): https://help.ubuntu.com/community/Internet/ConnectionSharing


Test Run

Try issuing some of the following commands to explore the possibilities enabled by Satellite CCRMA:

  • qjackctl & (Opens up a GUI for starting the Jack audio server)
  • pd & (Starts pure data extended, an environment for graphical programming for sound synthesis)
  • ls /dev/tty* (To verify that the Arduino Nano is showing up on /dev/ttyUSB0)
  • arduino & (Starts the Arduino software for programming the Arduino Nano microcontroller attached via USB)
    • For instance, you could use the Arduino software to install some default firmware. It can be found under File|Examples|Firmata|StandardFirmata.
  • Run audacity & to edit audio samples.
  • Explore employing Faust to automatically generate audio DSP code in a variety of environments. The source code for Faust is in /usr/src/faust.
  • Run the example script in the directory ~/chuck_examples to takes the ChucK audio programming language for a spin.
  • Type ping yahoo.com to see if you are properly sharing your laptop's Internet connection with Satellite CCRMA. If you cannot ping yahoo, then please see the troubleshooting section.
  • Use the wget command to directly download files from the Internet via URLs.
  • Use scp to copy files to and from your kit.
  • See below for more tips on installing and/or compiling more software.


Installing New Software

If your favorite linux software has been compiled for the ARM architecture, it may be available by way of the apt-get utility.

  • To get a list of packages available on the OMAP's ARM architecture, type sudo apt-cache pkgnames
  • You will notice that this list is way too long to look at. You can pipe it to the text file using the command

sudo apt-cache pkgnames > packages.txt and then look at it using emacs packages.txt, or you search for a particular package, such as sudo apt-cache pkgnames | grep emacs.

  • Or you can compile linux software yourself on the Beagleboard. The gcc, g++ tools etc. are already installed.

Type the df command. You can see that there is not a whole lot more than 1GB available on the SD card, so you should only install software if you decide that you need it.


Autonomous Mode

It is possible to make Satellite CCRMA run a default program at startup. This way you can prototype devices that are fully autonomous of other systems!

Here we show how to cause the Jack audio server and Pure data (with a default patch) to start automatically after the kit boots up.

In the terminal, change to the on-startup directory by typing cd ~/on-startup and type ls -la to see what files are in there. You can see that the link (aka alias) default_patch.pd points to windy-day.pd. In order to enable the default patch to load on boot, rename the file load_default_patch_disabled to load_default_patch using the command mv load_default_patch_disabled load_default patch.

The cat command can be used to display the contents of any ASCII file. To look at the contents of load_default_patch, type cat load_default_patch. As you can see, it starts up Jack using the text-based jackd instead of qjackctl, and then it loads default_patch.pd in pd with the graphical user interface (GUI) disabled.

To test it, just reboot the kit by typing sudo reboot and entering the password temppwd. As it is rebooting, plug a pair of ear buds, headphones, or loudspeakers into the 1/8" (2.54mm) jack labeled AUDIO OUT on the beagleboard. Within about a minute, your kit should be fully rebooted. To check this, you can try logging in with SSH. Either way, it should start running windy_day.pd upon startup.

Once your kit is fully rebooted, if you touch the anaog input pins A0-A7 on the Arduino Nano, it should start making some sound. However, unless you connect up a sensor circuit to some of the analog inputs, the exact behavior may be complicated. In particular, it will depend on the electrical properties of your body (how much sweat is on your fingers, whether you are touching a grounded device such as a laptop with any part of your body. Ask for help if you cannot get any sound.

Finally, log back into Satellite CCRMA using the same command as always ssh -XY ccrma@192.168.1.105. Type ps -A at the prompt to get a list of the currently running processes. jackd is the Jack audio sound server, and pdextended is the pd process. To stop the default patch from running, type ./stop_default. To see how stop_default works, type cat stop_default. (The ./ was necessary in order to run the script stop_default because the current user directory ~ is not in the user path, so linux needs the ./ to indicate to look for stop_default in the current directory.)


Halt Your Board When Finished!

When you are finished, it is probably best to shut down Satellite CCRMA by issuing the command sudo halt, just as you would shut down a linux desktop machine. This ensures that any data that is scheduled to be written to the SD card is written right away.



Appendix: Troubleshooting

Tips:

  • Type dmesg to see if there are any weird messages.
  • Check if the Jack audio server has crashed. If so, then restart it.
  • Type ls /dev/tty* to make sure that the Arduino is showing up on /dev/ttyUSB0.

Solutions:

  • If you are running out of space on the SD card, you can free up some space by deleting items in /usr/src. For instance, all of the files needed for building Pure Data Extended are rather large.
  • If you are unable to access the internet from Satellite CCRMA, you may need to change the nameservers specified in /etc/resolv.conf


Appendix: Writing the Image to an SD Card

See How To Get Satellite CCRMA