2021-12-11 21:39:31 +00:00
# FreeDV-JATE [Just Another TNC Experiment]
## 002_HIGHSNR_PING_PONG
### INSTALL TEST SUITE
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
#### Install prerequierements
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
```
sudo apt update
sudo apt upgrade
sudo apt install git cmake build-essential python3-pip portaudio19-dev python3-pyaudio
pip3 install crcengine
pip3 install threading
```
Go into a directory of your choice
Run the following commands --> They will download and compile the latest codec2 ( dr-packet ) files and LPCNet as well into the directory of your choice
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
```
wget https://raw.githubusercontent.com/DJ2LS/FreeDV-JATE/002_HIGHSNR_PING_PONG/install_test_suite.sh
chmod +x install_test_suite.sh
./install_test_suite.sh
```
### PARAMETERS
2023-02-11 21:49:07 +00:00
| parameter | description | side |
| ---------------- | ------------------------------------------ | ----------------------- |
| - -txmode 12 | set the mode for FreeDV ( 10,11,12,14 ) | Terminal 1 & Terminal 2 |
| - -rxmode 14 | set the mode for FreeDV ( 10,11,12,14 ) | Terminal 1 & Terminal 2 |
| - -frames 1 | set the number of frames per burst | Terminal 1 |
| - -bursts 1 | set the number of bursts | Terminal 1 |
| - -audioinput 2 | set the audio device | Terminal 1 & Terminal 2 |
| - -audiooutput 1 | set the audio device | Terminal 1 & Terminal 2 |
| - -debug | if used, print additional debugging output | Terminal 1 & Terminal 2 |
2021-12-11 21:39:31 +00:00
### AUDIO TESTS VIA VIRTUAL AUDIO DEVICE
2023-02-11 21:49:07 +00:00
#### Create audio sinkhole and subdevices
2021-12-11 21:39:31 +00:00
2023-02-11 21:49:07 +00:00
Note: This command needs to be run again after every reboot
2021-12-11 21:39:31 +00:00
2023-02-11 21:49:07 +00:00
```
sudo modprobe snd-aloop index=1,2 enable=1,1 pcm_substreams=1,1 id=CHAT1,CHAT2
```
check if devices have been created
2021-12-11 21:39:31 +00:00
aplay -l
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
Output should be like this:
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
```
Karte 0: Intel [HDA Intel], Gerät 0: Generic Analog [Generic Analog]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: CHAT1 [Loopback], Gerät 0: Loopback PCM [Loopback PCM]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: CHAT1 [Loopback], Gerät 1: Loopback PCM [Loopback PCM]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 2: CHAT2 [Loopback], Gerät 0: Loopback PCM [Loopback PCM]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 2: CHAT2 [Loopback], Gerät 1: Loopback PCM [Loopback PCM]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
```
### Run tests:
#### Terminal 1: Ping
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
```
python3 PING.py --txmode 12 --rxmode 14 --audioinput 2 --audiooutput 2 --frames 1 --bursts 2
```
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
Output
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
```
BURSTS: 2 FRAMES: 1
-----------------------------------------------------------------
TX | PING | BURST [1/2] FRAME [1/1]
RX | PONG | BURST [1/2] FRAME [1/1]
-----------------------------------------------------------------
TX | PING | BURST [2/2] FRAME [1/1]
RX | PONG | BURST [2/2] FRAME [1/1]
```
#### Terminal 2: Pong
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
```
python3 PONG.py --txmode 14 --rxmode 12 --audioinput 2 --audiooutput 2
```
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
Output
2023-02-11 21:49:07 +00:00
2021-12-11 21:39:31 +00:00
```
RX | BURST [1/2] FRAME [1/1] >>> SENDING PONG
RX | BURST [2/2] FRAME [1/1] >>> SENDING PONG
```