Below you will find information on how to setup Earthworm (EW) to run our PsnAdSend module on a Raspberry Pi 2 Model B Single Board Computer. The PsnAdSend module can be used by any of our digitizer boards (24-Bit, 16-Bit and Strong Motion Boards) to import data into EW. This setup will only run enough of the modules to collect data from the A/D board and export the data to either another EW installation and / or WinSDR. A/D data is also stored locally on the SD card using the wave_serverV module. Part one will deal with installing the OS and compiling EW. Part two will deal with configuring EW to run the needed modules.
For this installation of EW we will install Ubuntu Mate onto the Raspberry Pi board. The file to download will be named something like ubuntu-mate-15.04-desktop-armhf-raspberry-pi-2.img.bz2. Here is a link to the file: http://sourceforge.net/projects/ubuntu-mate/files/15.04/armhf/. To extract the image file use 7z or any program that can extract *.bz2 files.
You will need a high quality Class 10 16GB or 32GB micro SD card to run the OS on the board. You will also need an SD card to USB adapter to prepare the SD card using a Windows system. I suggest you first format the card using a program like SDFormatter. Use FAT32 as the format type. Now using a program called Win32DiskImager to write the Ubuntu Mate image to the SD card. You can now place the SD card into the PI board and boot up the system. Remember that the PI board only uses a +5VDC power supply. You will also need to connect up a mouse, keyboard and display to the board until you get SSH up and running. The PI board only has a HDMI connector so make sure the monitor has a HDMI input. You will also need to connect up the board to the internet using a Ethernet cable. You can later setup a WIFI connection if needed.
When you first boot up the system you will be presented with several forms to fill out like the default user and password etc. Once the system is up and running you should do a software update. This can be done using the System -> Administration -> Software Updater menu items. After the update is done you will need to reboot the system. Linux user's heads will explode when reading this. I personally like to do most of my system admin work and run EW under the root or superuser account. This way I don't have to keep using the sudo command and worry about hardware and file permissions. The following terminal command should be used to set the root password: sudo passwd You can then log into the root account using sudo su. Next I like to install the SSH server so I can use Putty, a Windows based SSH and Telnet client. The following command should be used to install SSH: sudo apt-get install openssh-server There are a lot of web pages out there on how to setup SSH so you do not need to use a password each time you log into the system.
would be a good time to do any administration stuff like setup a
static IP address for the system or configure a wireless adapter.
This can be done using the System -> Preferences -> Internet
and Network menu items. You may also want to install the editor of
you choose. use the apt-get install command to install any additional
packages you may need. Since we will need to recompile Earthworm we
will need the gcc C compiler and make utility. Type the following
commands in the terminal:
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install make
sudo apt-get install subversion
The last line is needed if you want to get a fresh copy of Earthworm from the repository using svn.
This command will install a nice utility called screen:
sudo apt-get install screen
The screen utility can be used to create virtual terminals that will keep running in the background even if you exit the SSH terminal. We will use this utility in part two of this documentation.
We are now ready to install EW. To keep things simple we will create a /earthquake directory off of the main root drive. Now is the time to run as root so you do not need to add sudo before each command. Here are a set of commands to create the directory.
sudo su -
chmod 777 earthworm
chmod 777 trunk
exit ← This will exit you from the root user account
Now we will get a copy of EW from the repository:
cd /earthworm/trunk ← First make sure we are in the right directory
svn co svn://svn.isti.com/earthworm/trunk . ← Note the period at the end
Get a copy of the ew_linux.bash file:
The first few lines need to be modified to look like this:
cp environment/ew_linux.bash .
Remove the -m32 parameter from the GLOBALFLAGS line.
Here is what the ew_linux.bash (download) file should look like.
This will load the exports into your environment. This can be done in your .bashrc file so you do not need to do this every time you log into the system.We will now create the params and log directories:
We will now compile EW. First move to the src directory:
Clean the directories:
Not all of the modules will compile without errors, but that's OK since we only need a few modules for this setup . Here are the make files you will need to modify.
file /earthworm/trunk/src/libsrc/makefile.unix and comment out
these two lines:
#qlib2:: FRCEdit file /earthworm/trunk/src/data_sources/Makefile and comment out:
# (cd qlib2; make)
# srusb2ew This is under ALL_MODULES and UNIX_MODULES.
Note: Remove the \ from the line above the module name if it is the last module in the list.
Now compile EW by issuing the following command in /earthworm/trunk/src.
It should take about 10 minutes to compile all of the modules.
[ Part 2 ] [ EW Home ] [ Home ]