FreeDATA/README.md

135 lines
4.6 KiB
Markdown
Raw Normal View History

2021-09-13 16:25:12 +00:00
# FreeDATA
2021-07-17 07:26:49 +00: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 19:01:57 +00:00
2021-07-17 07:09:43 +00:00
## Under development
2021-09-25 11:52:50 +00:00
This project is still a prototype and not usable at this time.
Build steps for other OS than Ubuntu are provided, but not working, yet.
2021-09-12 06:06:01 +00:00
## Credits
* David Rowe and the FreeDV team for developing the modem and libraries -
FreeDV Codec 2 : https://github.com/drowe67/codec2
2021-10-01 13:54:17 +00:00
* xssfox, her repository helped me a lot in an early stage of development -
2021-09-12 06:06:01 +00:00
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 19:40:00 +00:00
2021-11-03 20:19:49 +00:00
## Running the Ubuntu app bundle
2021-09-12 06:15:53 +00:00
Just download the latest developer release from the releases section, unpack it and just start the ".AppImage file". No more dependencies
2021-08-13 19:05:42 +00:00
## Manual Installation Ubuntu
2021-09-12 06:06:01 +00:00
### 0. add user to dialout group to access serial devices without root
```
sudo adduser $USER dialout
logout / login
```
2021-09-13 16:25:12 +00:00
### 1. Install dependencies, codec2 and FreeDATA
2021-08-07 09:01:11 +00:00
```
2021-11-07 11:35:24 +00:00
sudo apt install git build-essential cmake npm
2021-09-25 11:24:54 +00:00
npm cache clean -f
sudo npm install -g n
sudo n stable
2021-11-07 11:35:24 +00:00
sudo apt install python3 python3-hamlib portaudio19-dev python3-pyaudio python3-pip
pip3 install psutil crcengine ujson pyserial numpy
2021-09-12 05:38:20 +00:00
2021-09-13 16:25:12 +00:00
git clone https://github.com/DJ2LS/FreeDATA.git
cd FreeDATA/gui
2021-09-13 15:25:20 +00:00
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 05:38:20 +00:00
```
### 2. starting tnc
2021-08-07 09:01:11 +00:00
```
2021-11-07 11:35:24 +00:00
cd /home/$USER/FreeDATA/tnc
2021-11-03 20:19:49 +00:00
python3 daemon.py
2021-09-12 05:38:20 +00:00
```
2021-09-12 06:06:01 +00:00
A successfull start looks like this.
```
2021-11-07 11:35:24 +00:00
running Hamlib from internal library
running Hamlib Version - Hamlib 4.4~git - from precompiled bundle
2021-09-12 06:06:01 +00:00
SRV | STARTING TCP/IP SOCKET FOR CMD ON PORT: 3001
Client connected...
2021-11-07 11:35:24 +00:00
2021-09-12 06:06:01 +00:00
```
2021-09-12 05:38:20 +00:00
### 3. starting gui
2021-11-07 11:35:24 +00:00
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 and should occur if you're using the app bundle.
2021-09-12 05:38:20 +00:00
2021-11-07 11:35:24 +00:00
The gui is creating a directory "FreeDATA" for saving settings in /home/$USER/.config/
2021-09-12 05:38:20 +00:00
```
2021-11-07 11:35:24 +00:00
cd /home/$USER/FreeDATA/gui
2021-09-12 05:38:20 +00:00
npx electron main.js
```
2021-11-07 11:35:24 +00:00
If you're starting 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.
![gui disconnected](https://raw.githubusercontent.com/DJ2LS/FreeDATA/main/documentation/FreeDATA-no-daemon-connection.png "TNC disconnected")
If you want to connect to a daemon which is running on another host, just select it via the ethernet icon and enter the ip address.
![gui disconnected](https://raw.githubusercontent.com/DJ2LS/FreeDATA/main/documentation/FreeDATA-connect-to-remote-daemon.png "TNC disconnected")
2021-09-12 05:38:20 +00:00
2021-11-07 11:35:24 +00: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 or the radio itself.
You can also set advanced hamlib settings or test them. Your settings will be saved, as soon as you start the tnc.
![gui connected](https://raw.githubusercontent.com/DJ2LS/FreeDATA/main/documentation/FreeDATA-settings.png "TNC connected")
2021-09-12 05:38:20 +00:00
2021-11-07 11:35:24 +00:00
If you set your radio settings correctly, you can start the TNC. The settings dialog will be hidden and you can control the TNC now.
![gui connected](https://raw.githubusercontent.com/DJ2LS/FreeDATA/main/documentation/FreeDATA-tnc-running.png "TNC connected")
2021-09-12 05:38:20 +00:00
2021-11-07 11:35:24 +00:00
# --------------------------
2021-08-13 19:05:42 +00: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-11-07 11:35:24 +00:00
pip3 install psutil crcengine ujson pyserial numpy
2021-09-04 20:14:07 +00:00
2021-08-13 19:05:42 +00:00
```
2021-11-07 11:35:24 +00:00
### Install protaudio dependencies
2021-08-13 19:05:42 +00:00
```
xcode-select --install
brew remove portaudio
brew install portaudio
pip3 install pyaudio
```
2021-09-11 14:30:46 +00: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
2021-11-07 11:35:24 +00:00
pip3 install psutil crcengine ujson pyserial numpy
2021-09-11 14:30:46 +00:00
python daemon.py
2021-09-11 15:06:25 +00:00
2021-09-11 14:30:46 +00:00
```
2021-08-13 19:05:42 +00:00
2021-09-11 14:30:46 +00:00
### Install nodejs
```
https://nodejs.org/en/download/
2021-09-13 16:25:12 +00:00
cd FreeDATA/gui
2021-09-11 14:30:46 +00:00
npm i
npm i electron
npx electron main.js
```
2021-09-25 11:52:50 +00:00
### npm updating
* npm outdated --> list outdated npm packages
* npx npm-check-updates -u --> updated all packages
* npm install --> install all updated packages
2021-09-04 18:34:05 +00:00
2021-09-25 11:52:50 +00:00
* npm cache clean -f
* sudo npm install -g n
* sudo n stable --> upgrade node to latest version