Continue Linrad installation (For Linux novices only.)
(May 5 2009)
All packages needed for Linrad should now be installed on your system. and you should have a terminal owned by root open in terminal mode.

It is an unorthodox situation. You can read everywhere that one should not run Linux as root. It does not give protection against user errors such as deleting system files. In my experience however, security creates many more problems than it solves and I do my best to make my "radio receivers" as unsecure as possible. The instructions below are for the installation of Linux on a computer that will be used as a radio receiver or transceiver running Linrad. In case you want to use the same Linux installation for transactions with your bank account or any other activities that really need security you should go through the procedures needed to run Linrad as a normal user. You would not be a newcomer to Linux and should be able to find appropriate procedures elsewhere.

Linrad is already downloaded to the desktop of your ordinary user and unpacked into a subdirectory. It is a good idea to leave it unchanged so you can easily restore the original in case you make some modification that fails.

Create a new directory for your current working copy of Linrad. I always use /home/dsp To do that, the command is mkdir /home/dsp

Descend into the new directory by typing cd /home/dsp and copy the contents of your latest Linrad source code into /home/dsp by typing cp /home/bsz/Desktop/linrad-03.05/* .

Then give the command ./configure
The configure script should execute fast and finish with "Normal End"
Execute the commands:
make linrad
make xlinrad
make svgalib


The installation is now complete for xlinrad. To use it, start X11 by typing startx. Some Linux distributions will issue warning messages saying that you should not use X11 as root. Just ignore the warnings.

To be able to use svgalib you may have to edit /etc/vga/libvga.config To check if your video card works properly for your monitor, give the command ./vgatest.
On this particular system, 800x600 is ok and gives this image:
exit from vgatest by pressing any key. 1024x768 does not give sync frequencies that the monitor can accept:
svgalib does not support all possible chip sets. In case your computer hangs or obviously misbehaves you may have to edit the /etc/vga/libvga.config file and remove the comment mark # in front of chipset VESA near line 364. Other things could also be needed. If you have problems, skip svgalib for now and use xlinrad in graphical mode instead.

It is important that svgalib knows the correct limits for your monitor. Use the joe editor to edit /etc/vga/libvga.config
This particular monitor has a horizontal sync range from 31 to 80 kHz as you can see my handwritten note on the screen telling. After changing lines 271 and 272 a new run of vgatest shows the following modes:
Mode 13 is the recommended mode for the particular screen and it now works beautifully with vgatest and will also do so with linrad.

To check whether the mouse is properly configured, execute the command ./mousetest When you press enter after the command you should see a black screen, but when you start moving the mouse yellow boxes should appear. They should change colour when you click the left mouse button and you should be able to exit from mousetest by right clicking the mouse. In case it does not work properly, edit the mouse section of /etc/vga/libvga.config
Here IMPS2 is selected. Comment it by placing # first on the line and un-comment another line. Save by pressing Ctrl K then W but do not exit from the joe editor. It is a good idea to open a second terminal to use for running mousetest again. To do that, press Alt F2 log in as root and type cd /home/dsp Then type ./mousetest and find out if you made the correct choice. You can go back to the first terminal with Alt F1 and try another choice.




After finishing the svgalib setup (or possibly with a broken svgalib installation) it may be a good idea to continue under X11, the graphical user interface. At this point you are supposed to have logged in as root in terminal mode. Start X11 by giving the command startx. Under some distributions there will be warning messages which you should ignore.

In case logging in as root is not allowed at all, press Alt F6 or another Alt F key from F1 to F6 to find a free terminal where you can log in as an ordinary user. You would then have to type sudo prior to some commands to get root privileges.

When X11 has started and your desktop environment has appeared on screen, start a terminal window. (It may be a good idea to right click on the "Terminal" menu line to add launcher to the desktop or to the panel.)

The ALSA sound system will be automatic if you only have a single soundcard. With Linrad you may want two or three soundcards and then it will be convenient to tell the system once and for all in which order you want them to appear. Give the command cat /proc/asound/modules
Here you can see how the terminal launcher can be added to the panel in Gnome.

The terminal windows shows three different soundcards:
The M Audio Delta 44, ICE1712, is a high end soundcard that gives 24 bit samples from up to four audio channels with sampling rates ranging from 8 to 96 kHz.
The Ensoniq Audio PCI, ENS1371, is another PCI card. It allows sampling speeds from 4 to 48 kHz with 16 bit samples. (It can also use 8 bit samples).
The Intel ICH5 is the motherboard sound system. It works only at 48 kHz with 16 bit data.

I want the Motherboard soundcard to be the first device. The one that various other programs than Linrad will use by default. As the second device I want the Delta 44 and then, as the last one I want the Ensoniq Audio PCI.

To set the soundcard ordering, edit the file /etc/modprobe.d/alsa-base as described in the file z_ALSA.txt In my case it will look like this under Fedora 10 where there is no alsa-base file in the /etc/modprobe.d directory by default.
Under Debian there is an alsa-base file and there the three lines specifying the soundcard ordering (index number) should be placed at the bottom of the file like this:
In case you are using any of the abnormal drivers that are given index -2 you should probably not give it index 0 and you should probably also coment out the index -2 line by putting a # first on the line.

In case you are going to use Linrad with an SDR-14 or an SDR-IQ Go to the /home/dsp directory and type make sdr14 The command executes rapidly.






Now it is time to reboot. Log in again as root in terminal mode, start X11 with the startx command and open a terminal window. Go to the /home/dsp folder and give the command ./xlinrad
Press N and feed in what seems reasonable:
When you press enter on the screen height percentage Linrad will open a new window with its main menu (In newcomer mode.)
Press U for A/D and D/A setup for Rx to get to the first step of the ALSA configuration. Press T to select the other sound interface.
The other interface is ALSA native. You get the choice because all alsa development files were in place on your system when you last executed ./configure. Incomplete alsa installations will only allow alsa-oss. It is also possible to run Linrad with the 4Front OSS sound system as well as with legacy Linux sound.
Press enter for the next screen:
Press A to select the Rx input. (In case you have an SDR-14 or SDR-IQ connected you will have an opportunity to select it.)
The above figure first prompts for a device-seq-nmbr. After 5 is entered for the Delta 44, the next input is for the sample rate. Be careful to enter a rate that is actually supported by your hardware. Otherwise you will get an error for invalid period size at a later stage. When the enter key is pressed to enter the sampling rate you will return to the previous menu which has changed like this:
Press B to select the Rx output:
Here 0 is selected for the motherboard sound system and the DMA rate is set to 50 Hz. A high DMA rate may help to reduce the delay from antenna to loudspeaker, but 50 Hz with an associated extra delay of about 50 ms at both the input and the output is not a problem in the first phase when you start learning how to use Linrad. After the DMA rate you get back to the previous menu which has again changed:
Press X to return to the Linrad main menu, then W to save all the global parameters. They will be stored in par_userint.
Set the Mode parameters for one of the receive modes by pressing the key for one of the receive modes You are now in newcomer mode so your choices are limited.

After the last parameter you will enter the processing mode and find a screen similar to this one:
The screen may seem dead. It is not really, click the main spectrum, the one with a blue dB scale. That will make the time in the baseband window, the one with green dB scale, appear and move slowly. The CPU load in the lower left corner of the window also has fluctuations in its decimal value.

The problem is that the default setting of the Delta 44 soundcard is with zero volume. There is no input signal. Only zeroes. One has to open the mixer program that belongs to this particular soundcard and use it to set the recording volume properly. Click Applications then Sound & video and finally the mixer of your soundcard:
The mixer program for the Delta 44 has tabs for the different menus. Click Analog Volume and bring the ADC volume controls to max. That will awake the soundcard and Linrad will get real data. The image below is with a WSE RX2500 connected to the Delta 44 but with no input to the RX2500.
Use the mouse to bring the volume control high enough to give some output. The volume control is the red vertical bar in the baseband graph (green dB scale.) At the left side of the volume bar there is a small square showing the current output amplitude. Mid-scale as in the figure is fine. If the output is saturated the square becomes red and if the output is very low, the square becomes green. With some luck you will hear something in the loudspeakers now. It depends on the mixer program for the soundcard that you have selected for output.

Click the AGC box and bring the volume control to maximum. Then open the mixer program of your output sound card.
Set the output volume of your soundcard to a comfortable level for the loudspeaker or head phones that you use.

There are many mixer programs. There are also many different models and manufacturers of soundcards. You may run into problems e.g. when using the same soundcard for input and output. Sometimes there is a direct connection from the input to the output. Then you have to find the button to disable it and it is not present in all the mixer programs. Should you get into trouble here, post a question to the Linrad mailing list

What remains now is setting mode parameters for the different modes to fit the kind of Linrad usage of your choice.

Linrad should run equally well as xlinrad under X11 and as linrad in terminal mode. It is also possible to run linrad under X11.

If your svgalib installation was sucessful, exit from X11
You will return to terminal mode from where you started X11 with the startx command. Give ths command cd /home/dsp then the command ./linrad Linrad will start with a low resolution screen. The configuration file par_userint was created under X11 without any knowledge of your svgalib capabilities.
Press S to enter the parameters of your choice. The screen may now look something like this:
The Linrad installation is now complete. You may run under X11 or in terminal mode using the same parameters as long as your parameters are compatible with the screen sizes you have selected in both cases.

It is time to start experimenting. Read for example z_USERS_HWARE.txt


To SM 5 BSZ Main Page