Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
262 kaklik 1
Installation and setup notes for sidd-0.93, 15th March 2005.
2
------------------------------------------------------------
3
 
4
You have unpacked the tgz file and have 3 files:-
5
 
6
 * README - this one
7
 * sidd.c - source code
8
 * sidd.conf - a sample configuration file.
9
 
10
Installation steps
11
------------------
12
* 1/
13
You will need FFTW3 from www.fftw.org, if not already installed.
14
 
15
* 2/
16
Compile the sidd source with
17
 
18
 gcc -Wall -O4 -ffast-math -DPENTIUM -Wall -o sidd sidd.c -lfftw3 -lm
19
 
20
which produces an executable sidd in the current directory.
21
 
22
* 3/
23
Edit sidd.conf to suit your requirements.
24
 
25
* 4/
26
Start sidd in verbose foreground mode with the command
27
 
28
 ./sidd -vf
29
 
30
* 5/
31
Examine the log file - it should look something like
32
 
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]
54
 
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).
59
 
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).
63
 
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.
70
 
71
* 8/
72
Once you're happy with the gain settings, stop sidd and run it again with
73
the command
74
 
75
 ./sidd -m
76
 
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.
83
 
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.
87
 
88
* 10/
89
Restart sidd in background with
90
 
91
  ./sidd -v
92
 
93
Inspect the log file to make sure your mixer settings have been applied.
94
 
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.
101
 
102
* 12/
103
After a midnight crossing, make sure sidd has switched to the next
104
output file.
105
 
106
Command line options
107
--------------------
108
There are just a few command line options - most controls are
109
in the config file. 
110
 
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.
117
 
118
Miscellaneous notes
119
-------------------
120
*
121
sidd will set the soundcard to the nearest available sample rate to that
122
specified in sidd.conf
123
 
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.
129
 
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.
135
 
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.
141
 
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.
146
 
147
Revisions
148
---------
149
v0.9: Original.
150
v0.91: Fixes a header file problem with some gcc.
151
       No longer produces a static binary.
152
v0.93: Another bug fixed.
153
       Added control of mixer input and gains.
154
       Added stereo mode to make a 2 channel monitor. 
155