fmtools 0.2.5.
[fmtools.git] / README
blobd69badd21d3752f32797cc6fc05c4a7a40095a78
1 * fmtools information
3 * Russell Kroll <rkroll@exploits.org>
5 * Program support page: http://www.exploits.org/v4l/fmtools.html
7 * Released under the GNU GPL - See COPYING for details.
9 Package information
10 ===================
12 This is intended to become a collection of interesting programs that 
13 control the v4l radio card drivers.  Right now, this "collection" is
14 merely a pair of hopefully interesting utilities:
16  fm      - a simple tuner
17  fmscan  - a simple band scanner
22 This is a very simple controller that will send commands to tuner 0 of the 
23 first v4l radio card on the system.  It was written mostly so I could have
24 something to send commands at the drivers being created or debugged here.
26 I'll discuss the options a little, but it should be fairly simple to run.
28 The usual mode of operation is to tell the radio to come on to a given
29 freqency.  In these examples, 94.3 will be used since that's a station
30 that happens to get tuned here frequently.
32 To turn the radio on to that frequency at the default volume, you'd do
33 "fm 94.3" and call it done.  If you wanted to crank it up to full volume, 
34 another argument would be needed and the command becomes "fm 94.3 65535".
35 Volumes range from 0 (off) to 65535 (full intensity).  This is a direct
36 link to the value used in the v4l API by the actual drivers.
38 There is a -q option that will suppress messages about tuning, volume
39 changes, and so forth.  Keeping your tuner quiet may not seem like such
40 a useful thing at first, but it can be very handy inside an IRC script.
41 Having a program scribble over your channel window when you do /KILO
42 or similar is not enjoyable.
44 Besides direct tuning, there are also "on" and "off" commands.  They will
45 turn the card on and off (mute) as you may have guessed.
47 Finally, there is volume control.  To go up a notch, use +.  To go down
48 a notch, use -.  Simple.
50 fm configuration
51 ----------------
53 You can create a file called .fmrc in your home directory that contains
54 values for the default volume and default volume stepping.  This way,
55 you can have your radio card always come on at a certain volume when you
56 don't explicitly list it on the command line.  The volume stepping 
57 controls how much the volume changes during a - or + operation.
59 This file is not required for operation of the program, and it will not
60 even give so much as a peep if it doesn't find it.  The defaults are
61 used when you don't specify values.  The values are 12.5% for default 
62 volume and 10% for default volume stepping.  
64 Here's what a real .fmrc might look like ...
66 VOL 32000
67 INCR 6554
69 Here we say the default volume is 32000 - just shy of 50%.  Then we
70 say the increment value for volume changes with + and - is 6554 - 
71 approximately 10%.  These values were obtained by playing around with
72 the numbers until things behaved the way I wanted. 
74 There are some other options available:
76 -o - override card frequency range - Some radio card drivers don't actively
77      enforce the frequencies that you can tune to.  Use this switch and fm
78      will send any frequency you want to the driver.
80 -t - select tuner - Certain cards have multiple tuners - usually used for
81      different bands.  The ADS Cadet driver is apparently the first one to
82      support this v4l feature.  The first tuner is 0, the second is 1, and
83      so on.  
85 fmscan
86 ======
88 This simple little program will command your radio card through the radio
89 band and show which ones have a accumulated signal strength of 50% or 
90 higher.  This process can take awhile, and can vary greatly depending on
91 the radio card in use.  
93 By default, the range scanned is 87.9-107.9 MHz in .2 MHz steps, since
94 that's the standard band here in the USA.  Users in other regions should
95 set the appropriate information for best results.
97 This program didn't work at all with the radio-aimslab driver until I got
98 around to adding fine tuning support.  If you have one of these cards and
99 it seems to report 0% for all stations, make sure you have patched your
100 driver.
102 Also, the radio-aztech driver doesn't seem to do anything useful with
103 this.  This is particularly disturbing, since that card supposedly has
104 both a signal meter and a stereo detector.  The 0.50 patch to add fine
105 tuning hasn't helped.
107 v4l /dev entries
108 ================
110 This program uses /dev/radio0.  If you have been using v4l radio cards
111 for awhile, you may already have a /dev/radio.  That is now "legacy", and
112 should be symlinked to /dev/radio0.  To create the proper device entry, 
113 either do "make devices" as root, or create it by hand with mknod (c 81 64).
115 The proper device listing looks something like this in 'ls -la' ...
117 lrwxrwxrwx   1 root     root           11 Jan 20 03:19 /dev/radio -> /dev/radio0
118 crw-r--r--   1 root     root      81,  64 Jan 20 03:19 /dev/radio0
120 The owner and permission data should be set to values that agree with
121 your system's personality.  If it's mostly a solitary system with few or
122 no users, the above settings will be fine.
124 However, if you have other people running around on your system,  consider 
125 making the device part of a "radio" group or maybe even "console" if you
126 use such a thing.  That will keep random individuals from doing odd things
127 to your radio like changing it to a classical station while you're 
128 listening to some death metal (or vice versa).  You have been warned.
130 Old interim Linux 2.1 /dev/radio interface
131 ==========================================
133 Around 2.1.60, there was another /dev/radio specification that controlled
134 two boards - namely the AIMSLab RadioTrack and later the Aztech/Packard
135 Bell radio card.  This didn't last very long, as the entire radio card
136 driver tree was eventually redone under the expanded Video for Linux API.
138 These programs are not compatible with that interface.  Very few things
139 are.  If you are still using it, you should throw it away and upgrade to
140 the V4L drivers.  There have been many improvements since then, and you
141 will be able to use the fmtools programs on your card.