2021-01-15 07:57:56 +00:00
|
|
|
# FreeDV-JATE
|
|
|
|
## FreeDV- Just Another TNC Experiment
|
|
|
|
My first attempt to learn more about FreeDV and how to create a TNC which gets data from a TCP/IP socket
|
2020-12-12 19:01:57 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
## ToDo
|
|
|
|
|
|
|
|
- [x] ARQ: Stop-And-Wait
|
|
|
|
- [x] ARQ: Go-Back-N
|
|
|
|
- [x] ARQ: Selective repeating of lost arq frames
|
|
|
|
- [x] ARQ: Dynamic number of frames per burst
|
|
|
|
- [ ] ARQ: Set frames per burst automatically by channel quality
|
|
|
|
- [ ] SOCKET: Run commands via TCP/IP socket
|
|
|
|
- [ ] TRX: Control radio via hamlib
|
|
|
|
- [ ] MODE: Beacon
|
|
|
|
- [ ] MODE: Broadcast
|
|
|
|
- [ ] MODE: ARQ AX25
|
|
|
|
- [ ] MODE: Gear shifting ARQ
|
|
|
|
- [ ] TNC: CLI GUI for basic settings
|
|
|
|
- [ ] TNC: Multicore support
|
2020-12-12 19:40:00 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
## Setup
|
|
|
|
Install FreeDV-Socket-TNC directly to home folder and compile codec2 automatically
|
|
|
|
```
|
|
|
|
sudo apt install portaudio19-dev build-essential cmake
|
|
|
|
wget https://raw.githubusercontent.com/DJ2LS/FreeDV-Socket-TNC/dev/install_socket_tnc.sh -O ~/install_socket_tnc.sh
|
|
|
|
chmod +x ~/install_socket_tnc.sh
|
|
|
|
./install_socket_tnc.sh
|
|
|
|
```
|
2020-12-12 19:40:00 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
## Usage main program
|
|
|
|
```
|
|
|
|
./main.py --port 3000 --tx 1 --rx 1 --mode 12
|
|
|
|
```
|
2021-02-16 18:39:08 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
## Usage TCP/IP socket client
|
|
|
|
```
|
|
|
|
python3 readfromsocket.py --port 3000 --data "GET:RX_BUFFER:0
|
|
|
|
```
|
2021-02-16 18:39:08 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
## Socket Commands
|
2020-12-12 19:40:00 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### SOCKETTEST
|
|
|
|
Message for testing purposes which repeats:
|
|
|
|
```
|
|
|
|
SOCKETTEST
|
|
|
|
```
|
|
|
|
"WELL DONE! YOU ARE ABLE TO COMMUNICATE WITH THE TNC"
|
2021-02-16 18:39:08 +00:00
|
|
|
|
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### TRANSMIT ARQ MESSAGE 'HELLO!'
|
|
|
|
```
|
|
|
|
ARQ:HELLO!
|
|
|
|
```
|
2020-12-12 19:40:00 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### SET NEW CALLSIGN
|
|
|
|
```
|
|
|
|
SET:MYCALLSIGN:AA1AA
|
|
|
|
```
|
2020-12-12 19:40:00 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### GET CALLSIGN
|
2020-12-12 19:08:40 +00:00
|
|
|
```
|
2021-02-18 14:27:55 +00:00
|
|
|
GET:MYCALLSIGN
|
2020-12-12 19:08:40 +00:00
|
|
|
```
|
2020-12-12 19:07:38 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### GET CALLSIGN CRC8
|
2020-12-23 20:13:30 +00:00
|
|
|
```
|
2021-02-18 14:27:55 +00:00
|
|
|
GET:MYCALLSIGN_CRC8
|
2020-12-23 20:13:30 +00:00
|
|
|
```
|
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### GET DX CALLSIGN
|
2020-12-23 20:13:30 +00:00
|
|
|
```
|
2021-02-18 14:27:55 +00:00
|
|
|
GET:DXCALLSIGN
|
2020-12-23 20:13:30 +00:00
|
|
|
```
|
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### GET ARQ STATE
|
|
|
|
```
|
|
|
|
GET:ARQ_STATE
|
|
|
|
```
|
2020-12-12 19:07:38 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### GET RX BUFFER LENGTH / SIZE
|
|
|
|
```
|
|
|
|
GET:RX_BUFFER_LENGTH
|
|
|
|
```
|
2020-12-12 19:07:38 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
#### GET RX BUFFER
|
2020-12-12 19:40:36 +00:00
|
|
|
```
|
2021-02-18 14:27:55 +00:00
|
|
|
GET:RX_BUFFER:POSITION
|
2020-12-12 19:40:36 +00:00
|
|
|
```
|
2021-02-18 14:27:55 +00:00
|
|
|
Position = 0 --> Latest Data
|
|
|
|
Position 1-N --> Buffer positions
|
|
|
|
|
|
|
|
#### DELETE RX BUFFER
|
2020-12-26 09:48:53 +00:00
|
|
|
```
|
2021-02-18 14:27:55 +00:00
|
|
|
DEL:RX_BUFFER
|
2020-12-26 09:48:53 +00:00
|
|
|
```
|
2020-12-12 19:07:38 +00:00
|
|
|
|
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
|
|
|
|
|
2020-12-12 19:39:26 +00:00
|
|
|
## Other stuff
|
|
|
|
|
2020-12-26 09:51:49 +00:00
|
|
|
### Audio sinkhole
|
|
|
|
Send real audio without external devices or sound cards
|
2020-12-12 19:39:26 +00:00
|
|
|
```
|
|
|
|
sudo modprobe snd-aloop index=1,2 enable=1,1 pcm_substreams=1,1 id=CHAT1,CHAT2
|
|
|
|
```
|
2020-12-26 09:50:37 +00:00
|
|
|
### TNC 1
|
2020-12-26 09:50:07 +00:00
|
|
|
```
|
|
|
|
./main.py --port 3000 --tx 1 --rx 1
|
|
|
|
```
|
2020-12-26 09:50:37 +00:00
|
|
|
### TNC 2
|
2020-12-26 09:50:07 +00:00
|
|
|
```
|
|
|
|
./main.py --port 3001 --tx 2 --rx 2
|
|
|
|
```
|
2020-12-12 19:39:26 +00:00
|
|
|
|
2021-02-18 14:27:55 +00:00
|
|
|
|
|
|
|
## Credits
|
|
|
|
|
|
|
|
David Rowe and the FreeDV team for developing the modem and libraries
|
|
|
|
FreeDV Codec 2 : https://github.com/drowe67/codec2
|
|
|
|
|
|
|
|
|
|
|
|
This software has been inspired by https://github.com/xssfox/freedv-tnc/
|
|
|
|
|