Skip to content

Software defined modem example

Oleksiy Kebkal edited this page Jan 25, 2017 · 1 revision

Table of Contents

Compile

Go to the directory with checked out evins and run:

make

Configuration file

In the example below is assumed, that you have two SDM EvoLogics modems with IP addresses 192.168.0.178 and 192.168.0.179.

Create configuration file /usr/local/etc/fsm.conf:

{module, m1, [{role, sdmcli, iface, {socket, "0.0.0.0", 7001, server}},
             {role, sdm, iface, {socket, "192.168.0.137", 4200, client}},
             {mfa, mod_sdm, run, []}]}.
{module, m2, [{role, sdmcli, iface, {socket, "0.0.0.0", 7002, server}},
             {role, sdm, iface, {socket, "192.168.0.138", 4200, client}},
             {mfa, mod_sdm, run, []}]}.

Enable SDM mode

Switch the modem to SDM mode by sending ATP command on both the modems:

> nc 192.168.0.137 9200
ATP
INITIATION PHY
AT?S
Local Address: 2
Remote Address: 0
Acoustic Link Status: PHY
Pool Status: 0 packages, 16384 bytes free
Promiscuous Mode: ON

Run

Go to the directory with checked out **evins** and run:

_rel/evins/bin/evins console 
in two another terminal windows run:
> nc localhost 7001
and
> nc localhost 7002

Configure SDM modem parameters

config_dsp,<threshold>,<gain>,<source_level>
Example:
> nc localhost 7001
config,300,0,3
report,config,1

Configure SDM reference signal

ref,<path>
where path is a path to the reference file, 1024 lines of short integer values in text file. Example
nc localhost 7001
ref,/tmp/ref
report,ref,1024

SDM signal reception

rx,<samples>,<path>
where samples is a number of samples to be stored at path file after reference signal triggering
> nc localhost 7001
rx,10000,/tmp/rx
On successful reception:
> nc localhost 7001
rx,10000,/tmp/rx
rx
stop
you will get the file with at least 10240 samples (reception is done 1024 samples per block):
wc /tmp/rx
10240 10240 48530 /tmp/rx

SDM signal transmission

Transmission signal must be generated as a sequence of short integer samples, one sample per line. Transmission signal must begin with the signal, that is used as a reference on the reception side. For transmission use the command:

tx,<path>
Example:
nc localhost 7001
tx,/tmp/tx
report,tx,10240

SDM communication example

> nc localhost 7001          
ref,/tmp/ref
report,ref,1024
config,300,0,3
report,config,1

tx,/tmp/tx
report,tx,10240


> nc localhost 7002          
ref,/tmp/ref
report,ref,1024
config,300,0,3
report,config,1
rx,10000,/tmp/rx


rx
stop