1,167 → 1,145 |
Basic Installation |
================== |
Installation and setup notes for sidd-0.93, 15th March 2005. |
------------------------------------------------------------ |
|
These are generic installation instructions. |
You have unpacked the tgz file and have 3 files:- |
|
The `configure' shell script attempts to guess correct values for |
various system-dependent variables used during compilation. It uses |
those values to create a `Makefile' in each directory of the package. |
It may also create one or more `.h' files containing system-dependent |
definitions. Finally, it creates a shell script `config.status' that |
you can run in the future to recreate the current configuration, a file |
`config.cache' that saves the results of its tests to speed up |
reconfiguring, and a file `config.log' containing compiler output |
(useful mainly for debugging `configure'). |
* README - this one |
* sidd.c - source code |
* sidd.conf - a sample configuration file. |
|
If you need to do unusual things to compile the package, please try |
to figure out how `configure' could check whether to do them, and mail |
diffs or instructions to the address given in the `README' so they can |
be considered for the next release. If at some point `config.cache' |
contains results you don't want to keep, you may remove or edit it. |
Installation steps |
------------------ |
* 1/ |
You will need FFTW3 from www.fftw.org, if not already installed. |
|
The file `configure.in' is used to create `configure' by a program |
called `autoconf'. You only need `configure.in' if you want to change |
it or regenerate `configure' using a newer version of `autoconf'. |
* 2/ |
Compile the sidd source with |
|
The simplest way to compile this package is: |
gcc -Wall -O4 -ffast-math -DPENTIUM -Wall -o sidd sidd.c -lfftw3 -lm |
|
1. `cd' to the directory containing the package's source code and type |
`./configure' to configure the package for your system. If you're |
using `csh' on an old version of System V, you might need to type |
`sh ./configure' instead to prevent `csh' from trying to execute |
`configure' itself. |
which produces an executable sidd in the current directory. |
|
Running `configure' takes a while. While running, it prints some |
messages telling which features it is checking for. |
* 3/ |
Edit sidd.conf to suit your requirements. |
|
2. Type `make' to compile the package. |
* 4/ |
Start sidd in verbose foreground mode with the command |
|
3. Type `make install' to install the programs and any data files and |
documentation. |
./sidd -vf |
|
4. You can remove the program binaries and object files from the |
source code directory by typing `make clean'. |
* 5/ |
Examine the log file - it should look something like |
|
Compilers and Options |
===================== |
2005/03/15 20:03:17 logfile /root/sidd.log |
2005/03/15 20:03:17 los threshold 0.060, timeout 5 seconds |
2005/03/15 20:03:17 band LB 18200 18400 |
2005/03/15 20:03:17 band AN 19480 19680 |
2005/03/15 20:03:17 band SK 22050 22150 |
2005/03/15 20:03:17 band BG 23300 23500 |
2005/03/15 20:03:17 band TV 20190 20340 |
2005/03/15 20:03:17 band NV 16300 16500 |
2005/03/15 20:03:17 band B1 20800 21000 |
2005/03/15 20:03:17 band B2 22650 22850 |
2005/03/15 20:03:17 requesting line input gains left=77 right=100 |
2005/03/15 20:03:17 line input gains set to: left=77 right=100 |
2005/03/15 20:03:17 taking data from [/dev/dsp] |
2005/03/15 20:03:17 requesting rate 48000 |
2005/03/15 20:03:17 actual rate set: 48662 samples/sec |
2005/03/15 20:03:17 soundcard channels: 1 bits: 16 |
2005/03/15 20:03:17 resolution: bins=2048 fftwid=4096 df=11.880371 |
2005/03/15 20:03:17 spectrum file: /tmp/sidspec |
2005/03/15 20:03:17 using SCHED_FIFO priority 1 |
2005/03/15 20:03:17 sidd version 0.93: starting work |
2005/03/15 20:03:17 using output file [./050315.dat] |
|
Some systems require unusual options for compilation or linking that |
the `configure' script does not know about. You can give `configure' |
initial values for variables by setting them in the environment. Using |
a Bourne-compatible shell, you can do that on the command line like |
this: |
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure |
* 6/ |
Now tail the output file (in my example, ./050315.dat). The first |
three columns are the timestamp (seconds from 01/01/1970), peak signal |
level (range 0 to 1), and rms signal level (also range 0 to 1). |
|
Or on systems that have the `env' program, you can do it like this: |
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure |
Adjust your mixer gain settings so that the peak hovers around the |
range 0.1 to 0.5 (the rms will be around 1/2 or 1/3 of the peak, depending |
on your level of impulsive noise and sferics). |
|
Compiling For Multiple Architectures |
==================================== |
* 7/ |
Plot the spectrum file, in my case /tmp/sidspec. This file is two columns, |
bin centre frequency in Hz, and relative power. The file is re-written by |
sidd every 10 seconds or so, depending on your sidd.conf settings. Adjust |
antennas, receivers, etc to obtain desired signal to noise ratios. You |
may want to reconsider the band settings in sidd.conf at this point too. |
|
You can compile the package for more than one kind of computer at the |
same time, by placing the object files for each architecture in their |
own directory. To do this, you must use a version of `make' that |
supports the `VPATH' variable, such as GNU `make'. `cd' to the |
directory where you want the object files and executables to go and run |
the `configure' script. `configure' automatically checks for the |
source code in the directory that `configure' is in and in `..'. |
* 8/ |
Once you're happy with the gain settings, stop sidd and run it again with |
the command |
|
If you have to use a `make' that does not supports the `VPATH' |
variable, you have to compile the package for one architecture at a time |
in the source code directory. After you have installed the package for |
one architecture, use `make distclean' before reconfiguring for another |
architecture. |
./sidd -m |
|
Installation Names |
================== |
This will read and display the applicable mixer gain settings. Now edit |
your sidd.conf, commenting in the gain commands and putting in your gain |
settings. Then, whenever sidd starts, it will setup the mixer with these |
settings. All mixers will have a line input gain control, but only some |
will have an overall input gain control and/or a record level control. |
The -m option will report what you need to put in the config file. |
|
By default, `make install' will install the package's files in |
`/usr/local/bin', `/usr/local/man', etc. You can specify an |
installation prefix other than `/usr/local' by giving `configure' the |
option `--prefix=PATH'. |
* 9/ |
Set your PC clock and activate your favourite time synchronisation |
software. Make sure it slews the clock rather than stepping the time. |
|
You can specify separate installation prefixes for |
architecture-specific files and architecture-independent files. If you |
give `configure' the option `--exec-prefix=PATH', the package will use |
PATH as the prefix for installing programs and libraries. |
Documentation and other data files will still use the regular prefix. |
* 10/ |
Restart sidd in background with |
|
If the package supports it, you can cause programs to be installed |
with an extra prefix or suffix on their names by giving `configure' the |
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. |
./sidd -v |
|
Optional Features |
================= |
Inspect the log file to make sure your mixer settings have been applied. |
|
Some packages pay attention to `--enable-FEATURE' options to |
`configure', where FEATURE indicates an optional part of the package. |
They may also pay attention to `--with-PACKAGE' options, where PACKAGE |
is something like `gnu-as' or `x' (for the X Window System). The |
`README' should mention any `--enable-' and `--with-' options that the |
package recognizes. |
* 11/ |
After a period of time, plot some of the data from the output file. |
Output file columns 4 onwards correspond to the 'band' commands in the |
order they appear in sidd.conf. Each column is a total relative power, |
so you will need to apply a square root function during plotting if you |
want to display relative amplitudes. |
|
For packages that use the X Window System, `configure' can usually |
find the X include and library files automatically, but if it doesn't, |
you can use the `configure' options `--x-includes=DIR' and |
`--x-libraries=DIR' to specify their locations. |
* 12/ |
After a midnight crossing, make sure sidd has switched to the next |
output file. |
|
Specifying the System Type |
========================== |
Command line options |
-------------------- |
There are just a few command line options - most controls are |
in the config file. |
|
There may be some features `configure' can not figure out |
automatically, but needs to determine by the type of host the package |
will run on. Usually `configure' can figure that out, but if it prints |
a message saying it can not guess the host type, give it the |
`--host=TYPE' option. TYPE can either be a short name for the system |
type, such as `sun4', or a canonical name with three fields: |
CPU-COMPANY-SYSTEM |
-v Be a little more verbose with log messages. |
-f Run in foreground. By default, sidd detaches from the process |
group and terminal and becomes a daemon. In foreground mode, |
log messages are duplicated to stderr. |
-m Interrogate the soundcard mixer and report settings, then exit. |
This option overrides any others. |
|
See the file `config.sub' for the possible values of each field. If |
`config.sub' isn't included in this package, then this package doesn't |
need to know the host type. |
Miscellaneous notes |
------------------- |
* |
sidd will set the soundcard to the nearest available sample rate to that |
specified in sidd.conf |
|
If you are building compiler tools for cross-compiling, you can also |
use the `--target=TYPE' option to select the type of system they will |
produce code for and the `--build=TYPE' option to select the type of |
system on which you are compiling the package. |
* |
Make sure you have enough disk space. The example sidd.conf with 8 bands |
generates files of about 100Mbytes per day, which compress down to about |
30Mbytes. Arrange scripts for plotting. Arrange scripts for compressing |
and archiving files that are a few days old. |
|
Sharing Defaults |
================ |
* |
You can specify an ordinary file or a pipe as the input 'device' instead |
of /dev/dsp. In this case, you must set the sample rate in sidd.conf |
to whatever the actual sample rate is. sidd is looking for unsigned bytes |
in 8 bit mode, or signed words in 16 bit mode. |
|
If you want to set default values for `configure' scripts to share, |
you can create a site shell script called `config.site' that gives |
default values for variables like `CC', `cache_file', and `prefix'. |
`configure' looks for `PREFIX/share/config.site' if it exists, then |
`PREFIX/etc/config.site' if it exists. Or, you can set the |
`CONFIG_SITE' environment variable to the location of the site script. |
A warning: not all `configure' scripts look for a site script. |
* |
Once sidd has started up and set the mixer gains, it no longer takes any |
notice of the mixer. Therefore once sidd is running, a rogue user can |
mess things up by twiddling the mixer settings with Xmixer or some other |
utility. Kill off any mixer control panels to avoid the risk of any upset. |
|
Operation Controls |
================== |
|
`configure' recognizes the following options to control how it |
operates. |
|
`--cache-file=FILE' |
Use and save the results of the tests in FILE instead of |
`./config.cache'. Set FILE to `/dev/null' to disable caching, for |
debugging `configure'. |
|
`--help' |
Print a summary of the options to `configure', and exit. |
|
`--quiet' |
`--silent' |
`-q' |
Do not print messages saying which checks are being made. |
|
`--srcdir=DIR' |
Look for the package's source code in directory DIR. Usually |
`configure' can determine that directory automatically. |
|
`--version' |
Print the version of Autoconf used to generate the `configure' |
script, and exit. |
|
`configure' also accepts some other, not widely useful, options. |
|
* |
If your PC is set to autoboot after a power outage, you might want to put |
a startup command for sidd into /etc/rc.d/rc.local or similar - but make |
sure the RTC setting commands are done first. |