Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
483 kaklik 1
Installation and setup notes for sidd-0.93, 15th March 2005.
2
------------------------------------------------------------
411 kaklik 3
 
483 kaklik 4
You have unpacked the tgz file and have 3 files:-
411 kaklik 5
 
483 kaklik 6
 * README - this one
7
 * sidd.c - source code
8
 * sidd.conf - a sample configuration file.
411 kaklik 9
 
483 kaklik 10
Installation steps
11
------------------
12
* 1/
13
You will need FFTW3 from www.fftw.org, if not already installed.
411 kaklik 14
 
483 kaklik 15
* 2/
16
Compile the sidd source with
411 kaklik 17
 
483 kaklik 18
 gcc -Wall -O4 -ffast-math -DPENTIUM -Wall -o sidd sidd.c -lfftw3 -lm
411 kaklik 19
 
483 kaklik 20
which produces an executable sidd in the current directory.
411 kaklik 21
 
483 kaklik 22
* 3/
23
Edit sidd.conf to suit your requirements.
411 kaklik 24
 
483 kaklik 25
* 4/
26
Start sidd in verbose foreground mode with the command
411 kaklik 27
 
483 kaklik 28
 ./sidd -vf
411 kaklik 29
 
483 kaklik 30
* 5/
31
Examine the log file - it should look something like
411 kaklik 32
 
483 kaklik 33
 2005/03/15 20:03:17 logfile /root/sidd.log
34
 2005/03/15 20:03:17 los threshold 0.060, timeout 5 seconds
35
 2005/03/15 20:03:17 band LB 18200 18400
36
 2005/03/15 20:03:17 band AN 19480 19680
37
 2005/03/15 20:03:17 band SK 22050 22150
38
 2005/03/15 20:03:17 band BG 23300 23500
39
 2005/03/15 20:03:17 band TV 20190 20340
40
 2005/03/15 20:03:17 band NV 16300 16500
41
 2005/03/15 20:03:17 band B1 20800 21000
42
 2005/03/15 20:03:17 band B2 22650 22850
43
 2005/03/15 20:03:17 requesting line input gains left=77 right=100
44
 2005/03/15 20:03:17 line input gains set to: left=77 right=100
45
 2005/03/15 20:03:17 taking data from [/dev/dsp]
46
 2005/03/15 20:03:17 requesting rate 48000
47
 2005/03/15 20:03:17 actual rate set: 48662 samples/sec
48
 2005/03/15 20:03:17 soundcard channels: 1  bits: 16
49
 2005/03/15 20:03:17 resolution: bins=2048 fftwid=4096 df=11.880371
50
 2005/03/15 20:03:17 spectrum file: /tmp/sidspec
51
 2005/03/15 20:03:17 using SCHED_FIFO priority 1
52
 2005/03/15 20:03:17 sidd version 0.93: starting work
53
 2005/03/15 20:03:17 using output file [./050315.dat]
411 kaklik 54
 
483 kaklik 55
* 6/
56
Now tail the output file (in my example, ./050315.dat).  The first
57
three columns are the timestamp (seconds from 01/01/1970), peak signal
58
level (range 0 to 1), and rms signal level (also range 0 to 1).
411 kaklik 59
 
483 kaklik 60
Adjust your mixer gain settings so that the peak hovers around the
61
range 0.1 to 0.5 (the rms will be around 1/2 or 1/3 of the peak, depending
62
on your level of impulsive noise and sferics).
411 kaklik 63
 
483 kaklik 64
* 7/ 
65
Plot the spectrum file, in my case /tmp/sidspec. This file is two columns,
66
bin centre frequency in Hz, and relative power.  The file is re-written by
67
sidd every 10 seconds or so, depending on your sidd.conf settings.  Adjust
68
antennas, receivers, etc to obtain desired signal to noise ratios.  You
69
may want to reconsider the band settings in sidd.conf at this point too.
411 kaklik 70
 
483 kaklik 71
* 8/
72
Once you're happy with the gain settings, stop sidd and run it again with
73
the command
411 kaklik 74
 
483 kaklik 75
 ./sidd -m
411 kaklik 76
 
483 kaklik 77
This will read and display the applicable mixer gain settings.  Now edit
78
your sidd.conf, commenting in the gain commands and putting in your gain
79
settings.   Then, whenever sidd starts, it will setup the mixer with these
80
settings.  All mixers will have a line input gain control, but only some
81
will have an overall input gain control and/or a record level control.  
82
The -m option will report what you need to put in the config file.
411 kaklik 83
 
483 kaklik 84
* 9/ 
85
Set your PC clock and activate your favourite time synchronisation 
86
software.  Make sure it slews the clock rather than stepping the time.
411 kaklik 87
 
483 kaklik 88
* 10/
89
Restart sidd in background with
411 kaklik 90
 
483 kaklik 91
  ./sidd -v
411 kaklik 92
 
483 kaklik 93
Inspect the log file to make sure your mixer settings have been applied.
411 kaklik 94
 
483 kaklik 95
* 11/
96
After a period of time, plot some of the data from the output file.
97
Output file columns 4 onwards correspond to the 'band' commands in the
98
order they appear in sidd.conf.   Each column is a total relative power,
99
so you will need to apply a square root function during plotting if you
100
want to display relative amplitudes.
411 kaklik 101
 
483 kaklik 102
* 12/
103
After a midnight crossing, make sure sidd has switched to the next
104
output file.
411 kaklik 105
 
483 kaklik 106
Command line options
107
--------------------
108
There are just a few command line options - most controls are
109
in the config file. 
411 kaklik 110
 
483 kaklik 111
 -v    Be a little more verbose with log messages.
112
 -f    Run in foreground.  By default, sidd detaches from the process
113
       group and terminal and becomes a daemon.  In foreground mode,
114
       log messages are duplicated to stderr.
115
 -m    Interrogate the soundcard mixer and report settings, then exit.
116
       This option overrides any others.
411 kaklik 117
 
483 kaklik 118
Miscellaneous notes
119
-------------------
120
*
121
sidd will set the soundcard to the nearest available sample rate to that
122
specified in sidd.conf
411 kaklik 123
 
483 kaklik 124
*
125
Make sure you have enough disk space.   The example sidd.conf with 8 bands
126
generates files of about 100Mbytes per day, which compress down to about 
127
30Mbytes.    Arrange scripts for plotting.  Arrange scripts for compressing
128
and archiving files that are a few days old.
411 kaklik 129
 
483 kaklik 130
*
131
You can specify an ordinary file or a pipe as the input 'device' instead
132
of /dev/dsp.  In this case, you must set the sample rate in sidd.conf 
133
to whatever the actual sample rate is.  sidd is looking for unsigned bytes
134
in 8 bit mode, or signed words in 16 bit mode.
411 kaklik 135
 
483 kaklik 136
*
137
Once sidd has started up and set the mixer gains, it no longer takes any
138
notice of the mixer.  Therefore once sidd is running, a rogue user can
139
mess things up by twiddling the mixer settings with Xmixer or some other
140
utility.  Kill off any mixer control panels to avoid the risk of any upset.
411 kaklik 141
 
483 kaklik 142
*
143
If your PC is set to autoboot after a power outage, you might want to put
144
a startup command for sidd into /etc/rc.d/rc.local or similar - but make
145
sure the RTC setting commands are done first.