first attempt with new wiki

This commit is contained in:
dj2ls 2022-01-26 20:33:41 +01:00
parent 1e109da2e4
commit 0d490db1fe
17 changed files with 428 additions and 0 deletions

View file

@ -0,0 +1,7 @@
---
title: Home
body_classes: 'title-center title-h1h2'
---
## Welcome to the FreeDATA Wiki!
! This wiki exists since just some days and will be updated from time to time. Feel free to contribute on Github

View file

@ -0,0 +1,57 @@
---
title: 'Manual Installation'
---
!!! **Note:** Tested with Ubuntu 20.04 LTS, Debian 10, Mint 20
## 1. Permissions
add user to dialout group to access serial devices without root
```
sudo adduser $USER dialout
logout / login
```
## 2. Dependencies
```
sudo apt install git build-essential cmake npm
sudo npm install -g n
sudo n stable
sudo apt install python3-hamlib (if not found: python3-libhamlib2)
sudo apt install python3 portaudio19-dev python3-pyaudio python3-pip python3-colorama
pip3 install psutil crcengine ujson pyserial numpy structlog
```
## 3. Install FreeDATA
```
git clone https://github.com/DJ2LS/FreeDATA.git
cd FreeDATA/gui
npm i
cd ..
```
## Optional: Install codec2
If you want to use the latest version of codec2, just download and compile it.
The tnc will detect, if a self compiled version is used. Otherwise a precompiled binary will be used.
```
cd tnc (FreeDATA/tnc)
git clone https://github.com/drowe67/codec2.git
cd codec2
mkdir build_linux
cd build_linux
cmake ..
make
```
## Optional: Update Hamlib
Older versions of Ubuntu, like Ubuntu 20.04 LTS or Suse have sometimes outdated versions of Hamlib in their repositories. If you need a newer version, because of your radio for example, you can install the latest version from source.
!! Please uninstall older hamlib version before installing from source with `sudo apt uninstall python3-libhamlib2`!
```
sudo apt install libusb-1.0-0 swig
cd ~/Downloads
https://github.com/Hamlib/Hamlib/releases/download/4.4/hamlib-4.4.tar.gz
tar xvf hamlib-4.4.tar.gz
cd hamlib-4.4
./configure --with-python-binding PYTHON=$(which python3)
make
sudo make install
sudo ldconfig
```

View file

@ -0,0 +1,5 @@
---
title: Ubuntu
---
Tested with Ubuntu 20.04 LTS, Debian 10, Mint 20

View file

@ -0,0 +1,5 @@
---
title: 'Raspberry Pi'
published: true
---

View file

@ -0,0 +1,5 @@
---
title: Debian
---
Test

View file

@ -0,0 +1,54 @@
---
title: 'Manual installation'
---
!!! Tested with openSuse 15.3
!! FreeDATA had a lot of problems the last time it has been tested. Please be careful, specially with hamlib!
# 1. Permissions
add user to dialout group to access serial devices without root
```
sudo usermod -a -G dialout
```
# 2. Dependencies
```
sudo zypper install git cmake npm
sudo zypper install -t pattern devel_basis
sudo zypper install portaudio-devel python3-PyAudio
sudo npm install -g n
sudo n stable
pip3 install psutil crcengine ujson pyserial numpy structlog
```
# 3. Install hamlib python binding
```
sudo zypper install git python3-devel swig
cd ~/Downloads
wget https://github.com/Hamlib/Hamlib/releases/download/4.4/hamlib-4.4.tar.gz
tar xvf hamlib-4.4.tar.gz
cd hamlib-4.4
./configure --with-python-binding PYTHON=$(which python3)
make
sudo make install
sudo ldconfig
```
# 4. Install FreeDATA
```
git clone https://github.com/DJ2LS/FreeDATA.git
cd FreeDATA/gui
npm i
cd ..
```
# Optional: Install codec2
If you want to use the latest version of codec2, just download and compile it.
The tnc will detect, if a self compiled version is used. Otherwise a precompiled binary will be used.
```
cd tnc (FreeDATA/tnc)
git clone https://github.com/drowe67/codec2.git
cd codec2
mkdir build_linux
cd build_linux
cmake ..
make
```

View file

@ -0,0 +1,4 @@
---
title: Suse
---

View file

@ -0,0 +1,6 @@
---
title: 'Linux '
visible: true
---
Test

View file

@ -0,0 +1,4 @@
---
title: 'Installation '
---

View file

@ -0,0 +1,39 @@
---
title: Linux
---
!!! Tested with Ubuntu 20.04 LTS
## 1. Starting the TNC daemon
```
cd /home/$USER/FreeDATA/tnc
python3 daemon.py
```
A successfull start looks like this.
```
2021-11-24 17:45:40 [info ] [DMN] Starting... python=3.8
2021-11-24 17:45:40 [info ] [DMN] Hamlib found version=4.3
2021-11-24 17:45:40 [info ] [DMN] Starting TCP/IP socket port=3001
```
## 2. Starting the GUI
* Note: 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.
* The gui is creating a directory "FreeDATA" for saving settings in /home/$USER/.config/
```
cd /home/$USER/FreeDATA/gui
npx electron main.js
```
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")
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")
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")

View file

@ -0,0 +1,4 @@
---
title: Usage
---

View file

@ -0,0 +1,161 @@
---
title: 'Network commands daemon'
visible: true
---
#### Description:
The current daemon state as default TCP/IP stream
```
{
"COMMAND": "DAEMON_STATE",
"DAEMON_STATE": [],
"PYTHON_VERSION": str(python_version),
"HAMLIB_VERSION": str(hamlib_version),
"INPUT_DEVICES": [],
"OUTPUT_DEVICES": [],
"SERIAL_DEVICES": [],
"CPU": "",
"RAM": "",
"VERSION": "0.1-prototype"
}
```
### SET CALLSIGN
#### Description:
Save your callsign to the daemon
#### Parameters
- Type: SET
- Command: MYCALLSIGN
- Parameter: callsign (str)
- timestamp: unix timestamp (str)
#### Example
```
{"type" : "SET", "command": "MYCALLSIGN" , "parameter": "<callsign>", "timestamp" : "123456789"}
```
### SET GRIDSQUARE
#### Description:
Save your gridsquare/maidenhead-locator to the daemon
#### Parameters
- Type: SET
- Command: MYGRID
- Parameter: gridsquare (str)
- timestamp: unix timestamp (str)
#### Example
```
{"type" : "SET", "command": "MYGRID" , "parameter": "<gridsquare>", "timestamp" : "123456789"}
```
### TEST HAMLIB
#### Description:
Test your hamlib settings
#### Parameters
- Type: GET
- Command: TEST_HAMLIB
- Parameter: obj
- devicename
- deviceport
- pttprotocol
- pttport
- serialspeed
- data_bits
- stop_bits
- handshake
- timestamp: unix timestamp (str)
#### Example
```
{
"type": "GET",
"command" : "TEST_HAMLIB",
"parameter" : [{
"devicename" : "<devicename>",
"deviceport" : "<deviceport>",
"pttprotocol" : "<pttprotocol>",
"pttport" : "<pttport>",
"serialspeed" : "<serialspeed>",
"data_bits" : "<data_bits>",
"stop_bits" : "<stop_bits>",
"handshake" : "<handshake>"
}]
}
```
### START TNC
#### Description:
Start the tnc process
#### Parameters
- Type: GET
- Command: TEST_HAMLIB
- Parameter: obj
- mycall
- mygrid
- rx_audio
- tx_audio
- devicename
- deviceport
- pttprotocol
- pttport
- serialspeed
- data_bits
- stop_bits
- handshake
#### Example
```
{
type: 'SET',
command: 'STARTTNC',
parameter: [{
mycall: mycall,
mygrid: mygrid,
rx_audio: rx_audio,
tx_audio: tx_audio,
devicename: devicename,
deviceport: deviceport,
pttprotocol: pttprotocol,
pttport: pttport,
serialspeed: serialspeed,
data_bits: data_bits,
stop_bits: stop_bits,
handshake: handshake
}]
}
```
### STOP TNC
#### Description:
Stop the tnc process
#### Parameters
- Type: SET
- Command: STOPTNC
- Parameter: ---
#### Example
```
{"type" : "SET", "command": "STOPTNC" , "parameter": "---" }
```

View file

@ -0,0 +1,5 @@
---
title: 'Network commands TNC'
visible: true
---

View file

@ -0,0 +1,11 @@
---
title: Network
---
[sequence]
Daemon/TNC-->Client:TCP/IP Stream as JSON
Client->Daemon/TNC:TCP/IP command as JSON
Daemon/TNC->Client:TCP/IP response as JSON
[/sequence]

View file

@ -0,0 +1,18 @@
---
title: 'App design'
---
!!! Basic design how FreeDATA works
[sequence]
Client->Daemon:TCP/IP Command
Client->TNC:TCP/IP Command
Daemon-->Client:TCP/IP Stream
TNC-->Client:TCP/IP Stream
Daemon->TNC:start/stop
TNC->codec2:data
codec2->TNC:raw modulation
TNC->Audio device: protocol+modulation
Audio device->Radio:direct/interface
TNC->Radio:Control via Hamlib
[/sequence]

View file

@ -0,0 +1,27 @@
---
title: Protocol
---
!!! Simple test for displaying protocol flow chart. Real protocl is much more complex...
[flow]
starttransmission=>start: Start transmission
transmissionsuccess=>end: End|success
transmissionnosuccess=>end: End|invalid
opendatachannel=>operation: Open datachannel
datachannelopened=>condition: Opened?
nretries=>condition: Retry<=5?
sendframe=>operation: Send frame
waitforack=>subroutine: Wait for ACK
ackreceived=>condition: ACK?
starttransmission->opendatachannel->datachannelopened
datachannelopened(no)->nretries(right)
nretries(yes)->opendatachannel
nretries(no, bottom)->transmissionnosuccess
datachannelopened(yes)->sendframe->waitforack->ackreceived
ackreceived(no, left)->sendframe(left)
ackreceived(yes, bottom)->transmissionsuccess(top)
[/flow]

View file

@ -0,0 +1,16 @@
---
title: Development
---
[flow]
st=>start: Start plugin
e=>end: End
op1=>operation: Development|success
sub1=>subroutine: Add features|success
cond=>condition: It is cool?|invalid
io=>inputoutput: Update for users|calm
st->op1->cond
cond(yes)->io->e
cond(no)->sub1(right)->op1
[/flow]