A Prosody processor needs two kinds of firmware: a kernel, which provides the ability to run software, and the firmware modules, which implement the wide variety of Prosody functionality.
To find out which firmware modules are needed for an application, consult its documentation. If you are writing an application, see the documentation for any Prosody API functions you use.
Firmware appropriate to the type of card must be loaded. For Prosody processors located on Prosody X cards, firmware from a starcore directory must be used, for Prosody processors located on earlier cards, firmware from a sharc directory must be used.
The best way to download the kernel is to use the batch/script file
provided. This is called prosody_ip_card_load_ting_kernel and
is invoked as follows to load the standard Prosody X TiNG kernel located
in starcore directory:
prosody_ip_card_load_ting_kernel <serial number> <module index>
For example to load kernel to first Prosody processor on card with serial number 179083 it would be invoked as follows:
prosody_ip_card_load_ting_kernel 179083 0
Alternatively, the kernel may be loaded by reference to card IP address.
Go to directory $(TiNG)/test where there is a
script/batch file called klx. It is used like this:
klx -i 172.16.1.220 -k mykey -m 0
where 172.16.1.220 is the IP address of the Prosody X card, and
-m 0 indicates the first Prosody Processor module on that
card (the default is module 0). It is very simple, only supplying
defaults to the kloadx program, whose
documentation you should consult for details of the options it
understands. (For example, you need to use the -r option to
reset the Prosody Processor if a kernel has already been downloaded).
The IP address of a Prosody X card can be determined by running
the Aculab utility program acu_serno2ip, specifying the
serial number of the card, which will then output the IP address of
the given card. It is used like this:
acu_serno2ip 179083
The best way to download the kernel is to use the script/batch file
provided. Go to directory $(TiNG)/test where there is a
script/batch file called kl. It is used like this:
kl -c Prosody_1234 -m 0
where Prosody_1234 is the name of the card, and
-m 0 indicates the first Prosody Processor module on that
card (the default is module 0). It is very simple, only supplying
defaults to the kload program, whose
documentation you should consult for details of the options it
understands. (For example, you need to use the -r option to
reset the Prosody Processor if a kernel has already been downloaded).
The card names are the string Prosody_ with their serial
numbers (which appear on stickers fixed to the cards) appended. For
example, a PCI Prosody card with serial number 123 uses the
name Prosody_123. You can use the card_info
command in the $(TiNG)/test directory to find out the card
serial numbers. Use:
card_info/gen-WINNT/card_info -c 0 card_info/gen-WINNT/card_info -c 1 card_info/gen-WINNT/card_info -c 2
etc. and look at the last value (in quotes). On Linux you can also see the names of the cards in /dev/aculab/speech. On Solaris you can also see the names of the cards in /dev/aculab.
When the kernel is running you can see a light rapidly flashing on the card. Since this light is in different places on each type of card, see the hardware installation manual for your card for its location. You can also check that the kernel is running with the Prosody function sm_get_module_info().
On Linux:
The only error possible while using kl on Linux should be a
complaint that it can't find the device special file. Check the system
log to see if the device driver loaded and found the card.
On Solaris:
The only error possible while using kl on Solaris should be a
complaint that it can't find the device special file. Check the system
log to see if the device driver loaded and found the card.
To download a firmware module you must have already downloaded the firmware kernel as described above.
The best way to download firmware modules is to use the script/batch file
provided. This is called prosody_ip_card_load_ting_fw and
is invoked as follows to load Prosody X firmware modules located in starcore directory:
prosody_ip_card_load_ting_fw <serial number> <module index> <firmware module> ...
For example to load modules datafeed, td, and inchan to
first Prosody processor on card with serial number 179083 it would be invoked as follows:
prosody_ip_card_load_ting_fw 179083 0 datafeed td inchan
Alternatively, firmware modules may be loaded by reference to card IP address.
Go to directory $(TiNG)/test. There is a
script/batch file called lmx to download a module.
Use it like this:
lmx v110 -i 172.16.1.220 -k mykey
where v110 is the name of the module to load and
172.16.1.220 is the card IP address as used when loading the
kernel. As with klx, you add the -m option to
specify a Prosody processor module (default 0) like this:
lmx v110 -i 172.16.1.220 -k mykey -m 1
This script/batch file is very simple, only supplying defaults to the modload program, whose documentation you should consult for details of the options it understands.
The firmware modules are listed in Prosody software modules. If you want to run a test application, look at the documentation of that application for a list of required modules: if you are writing an application, details of required firmware modules are given in the documentation for the API functions: if you are using an application written by someone else, they should have provided details of the firmware it requires.
Note in general, applications running on Prosody X cards will require an additional firmware module datafeed
To download a firmware module you must have already downloaded the firmware kernel as described above.
The best way to download the kernel is to use the script/batch file
provided. Go to directory $(TiNG)/test. There is a
script/batch file called lm to download a module.
Use it like this:
lm v110 -c Prosody_1234
where v110 is the name of the module to load and
Prosody_1234 is the card name as used when loading the
kernel. As with kl, you add the -m option to
specify a Prosody processor module (default 0) like this:
lm v110 -c Prosody_1234 -m 1
This script/batch file is very simple, only supplying defaults to the elfload program, whose documentation you should consult for details of the options it understands.
The firmware modules are listed in Prosody software modules. If you want to run a test application, look at the documentation of that application for a list of required modules: if you are writing an application, details of required firmware modules are given in the documentation for the API functions: if you are using an application written by someone else, they should have provided details of the firmware it requires.
It can be very convenient to have a script which downloads a set of firmware modules. Here is an example of a shell-script which does this:
#!/bin/sh for fw in inchan outchan recA playA do lm $fw $* done
And the equivalent Microsoft Windows batch file:
for %%i in (inchan outchan recA playA) do call lm %%i %*
You would use this script to download that set of firmware modules to a particular Prosody processor like this: (assuming you call it 'loadalaw')
loadalaw -c Prosody_1234 -m 1
Obviously, you can then use this in a script combined with the command to download the kernel and the commands for other Prosody processors, giving you a single script to do all the setup required. For example:
kl -c Prosody_1234 -m 0 loadalaw -c Prosody_1234 -m 0 kl -c Prosody_1234 -m 1 loadalaw -c Prosody_1234 -m 1 kl -c Prosody_654321 -m 0 loadfax -c Prosody_654321 -m 0 kl -c Prosody_654321 -m 1 loadfax -c Prosody_654321 -m 1
which does all the downloading for two Prosody processors on each of
two cards. For Microsoft Windows batch files you need to use call
lm, call loadalaw etc. as batch files do not
resume after calling other batch files unless the keyword
call is used to make the call.
If you want to perform downloads from within an application, you may be interested in the program fmwdnld program in the $(TiNG)/test directory which is an application which downloads firmware (this example program is currently not applicable to Prosody X card downloads). However, while it is possible for an application to download firmware, it is normally better to do so before starting the application. This makes testing and debugging much easier because when a special firmware module is needed to help with a test, you can simply download it first and run your application normally. If the application downloads the firmware, it would have to be modified to download the extra module. For example, if you want to determine what signal is being processed, you might run a recording using locrec from the $(TiNG)/test directory, which would allow you to make a recording while your application was running.