FreeDATA/README.md

143 lines
4.7 KiB
Markdown
Raw Normal View History

2021-07-17 09:09:43 +02:00
# codec2 | FreeDATA
2021-07-17 09:26:49 +02:00
My attempt to create a free and opensource TNC with a GUI for [codec2](https://github.com/drowe67/codec2) to send data over HF channels.
2020-12-12 20:01:57 +01:00
2021-07-17 09:09:43 +02:00
## Under development
The project is still a prototype and not usable at this time.
2021-09-12 08:06:01 +02:00
Build steps for other OS than Ubuntu are provided, but not running
## Credits
* David Rowe and the FreeDV team for developing the modem and libraries -
FreeDV Codec 2 : https://github.com/drowe67/codec2
* xssfox, his repository helped me a lot in an early stage of development -
xssfox : https://github.com/xssfox/freedv-tnc
* Wolfgang, for lending me his radio so I'm able to do real hf tests
2020-12-12 20:40:00 +01:00
2021-09-12 08:15:53 +02:00
## Running the app bundle
Just download the latest developer release from the releases section, unpack it and just start the ".AppImage file". No more dependencies
2021-08-13 21:05:42 +02:00
## Manual Installation Ubuntu
2021-09-12 08:06:01 +02:00
### 0. add user to dialout group to access serial devices without root
```
sudo adduser $USER dialout
logout / login
```
2021-09-13 17:25:20 +02:00
### 1. Install dependencies, codec2 and codec2-FreeDATA
2021-08-07 11:01:11 +02:00
```
2021-09-12 07:38:20 +02:00
sudo apt install git build-essential cmake
2021-08-15 13:10:20 +02:00
sudo apt install npm
2021-07-23 15:30:36 +02:00
sudo apt install python3
2021-09-12 09:19:35 +02:00
sudo apt install portaudio19-dev
2021-09-12 08:06:01 +02:00
sudo apt install python3-pyaudio
2021-09-13 17:25:20 +02:00
sudo apt install python3-pip
2021-07-25 16:34:36 +02:00
pip3 install psutil
2021-08-15 13:10:20 +02:00
pip3 install crcengine
2021-08-23 18:29:58 +02:00
pip3 install ujson
2021-09-04 22:14:07 +02:00
pip3 install pyserial
2021-09-11 17:06:25 +02:00
pip3 install numpy
2021-09-12 07:38:20 +02:00
2021-09-13 17:25:20 +02:00
git clone https://github.com/DJ2LS/codec2-FreeDATA.git
cd codec2-FreeDATA/gui
npm i
cd ..
cd tnc
git clone https://github.com/drowe67/codec2.git
cd codec2
mkdir build_linux
cd build_linux
cmake ..
make
2021-09-12 07:38:20 +02:00
```
### 2. starting tnc
You need to set the "--debug" option. Otherwise daemon.py is looking for precompiled binaries which causes an error
2021-08-07 11:01:11 +02:00
```
2021-09-12 07:38:20 +02:00
cd /home/[user]/codec2-FreeDATA/tnc
python3 daemon.py --debug
```
2021-09-12 08:06:01 +02:00
A successfull start looks like this.
```
SRV | STARTING TCP/IP SOCKET FOR CMD ON PORT: 3001
```
As soon as you're connected the gui, it could look like below. If you're getting a bunch of errors from ALSA lib like below - this should't affect usability
```
SRV | STARTING TCP/IP SOCKET FOR CMD ON PORT: 3001
Client connected...
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
...<snip>...
```
2021-09-12 07:38:20 +02:00
### 3. starting gui
There will be an error on startup, that "daemon" can't be found, This is because the gui is looking for precompiled tnc software. This error can be ignored, if you're running the tnc manually from source
The gui is creating a directory "codec2-FreeDATA" for saving settings in /home/[user]/.config/
```
cd /home/[user]/codec2-FreeDATA/gui
npx electron main.js
```
2021-09-12 08:06:01 +02:00
If you start the gui, it will have a look for the daemon, which is by default "localhost / 127.0.0.1". The main window will stay blured as long as it can't connect to the daemon. If you want to connect to a daemon which is running on another host, just select it via "remote TNC" and enter the ip address.
![gui disconnected](https://raw.githubusercontent.com/DJ2LS/codec2-FreeDATA/main/documentation/codec2-FreeDATA-start-disconnected.png "TNC disconnected")
2021-09-12 07:38:20 +02:00
2021-09-12 08:06:01 +02:00
As soon as the gui is able to connect to the daemon, the main window will be getting clear and you can see some settings like your audio devices and connected USB devices like a USB Interface III for example.
![gui connected](https://raw.githubusercontent.com/DJ2LS/codec2-FreeDATA/main/documentation/codec2-FreeDATA-start-connected.png "TNC connected")
2021-09-12 07:38:20 +02:00
2021-09-12 08:06:01 +02:00
# ----------------------------------------------------------------
2021-08-13 21:05:42 +02:00
## Manual Installation macOS
### Install brew and python3
#### https://docs.python-guide.org/starting/install3/osx/
```
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install python
2021-08-23 17:24:05 +02:00
pip3 install psutil
pip3 install crcengine
pip3 install ujson
2021-09-04 22:14:07 +02:00
pip3 install pyserial
2021-09-11 17:06:25 +02:00
pip3 install numpy
2021-09-04 22:14:07 +02:00
2021-08-13 21:05:42 +02:00
```
### Install dependencies
```
xcode-select --install
brew remove portaudio
brew install portaudio
pip3 install pyaudio
```
2021-09-11 16:30:46 +02:00
## Manual Installation Windows
### Install python3
```
Download Python from https://www.python.org/downloads/
Add Python to systempath https://www.educative.io/edpresso/how-to-add-python-to-path-variable-in-windows
Download and install pyaudio from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
eg.: pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl
pip install psutil
pip install crcengine
pip install ujson
pip install pyserial
2021-09-11 17:06:25 +02:00
pip install numpy
2021-09-11 16:30:46 +02:00
python daemon.py
2021-09-11 17:06:25 +02:00
2021-09-11 16:30:46 +02:00
```
2021-08-13 21:05:42 +02:00
2021-09-11 16:30:46 +02:00
### Install nodejs
```
https://nodejs.org/en/download/
cd codec2-FreeDATA/gui
npm i
npm i electron
npx electron main.js
```
2021-09-04 20:34:05 +02:00
##
npm outdated --> list outdated npm packages
npx npm-check-updates -u --> updated all packages
npm install --> install all updated packages