Updated readme

pull/2/head
Mark Qvist 2020-05-27 19:29:19 +02:00
parent 16dab5028e
commit 1313edb3e5
1 changed files with 44 additions and 21 deletions

View File

@ -46,67 +46,90 @@ optional arguments:
--cr rate Coding rate for TNC mode --cr rate Coding rate for TNC mode
``` ```
## Dependencies ## Installation
The config utility requires Python 2.7, pyserial and cryptography.io. To install: The easiest way to install the configuration utility is with pip:
``` ```sh
sudo apt install python python-pip # If you don't already have pip installed
sudo pip install pyserial cryptography sudo apt install python3-pip
# Install rnodeconf with pip
pip3 install rnodeconf
# Run rnodeconf
rnodeconf --help
``` ```
If you want to use the utility for firmware updating or flashing, you will also need avrdude: If you want to use the utility for firmware updating or flashing, you will also need avrdude:
``` ```sh
sudo apt install avrdude sudo apt install avrdude
``` ```
## Installation You can also clone or download this repository, place it wherever you'd like and run rnodeconf from there:
Just clone or download this repository, place wherever you'd like and run rnodeconf (remember to set executable permissions): ```sh
# Clone repository
```
git clone https://github.com/markqvist/rnodeconfigutil.git git clone https://github.com/markqvist/rnodeconfigutil.git
# Move into folder
cd rnodeconfigutil cd rnodeconfigutil
chmod a+x rnodeconf
# Set executable permission on rnodeconf
chmod a+x rnodeconf/rnodeconf.py
# Symlink executable to main directory
ln -s rnodeconf/rnodeconf.py rnodeconf
# Run rnodeconf
./rnodeconf --help ./rnodeconf --help
``` ```
## Dependencies
The config utility requires Python 3, pyserial and cryptography.io. To install:
```sh
# Install dependencies for rnodeconf
sudo pip3 install pyserial cryptography
```
## Examples ## Examples
### Show device info ### Show device info
Print info like serial number, hardware revision, model and firmware version. Print info like serial number, hardware revision, model and firmware version.
``` ```sh
./rnodeconf /dev/ttyUSB0 -I rnodeconf /dev/ttyUSB0 -I
``` ```
### Update the firmware ### Update the firmware
Grab the latest precompiled firmware from the RNode Firmware repository and flash it to the device. Grab the latest precompiled firmware from the RNode Firmware repository and flash it to the device.
``` ```sh
./rnodeconf /dev/ttyUSB0 -u rnodeconf /dev/ttyUSB0 -u
``` ```
### Set RNode to TNC mode ### Set RNode to TNC mode
If you just specify the -T option, the utility will ask you for the necessary parameters. If you just specify the -T option, the utility will ask you for the necessary parameters.
``` ```sh
./rnodeconf /dev/ttyUSB0 -T rnodeconf /dev/ttyUSB0 -T
``` ```
You can also specify all the options on the command line. You can also specify all the options on the command line.
``` ```sh
./rnodeconf /dev/ttyuUSB0 -T --freq 868000000 --bw 125000 --txp 2 --sf 7 --cr 5 rnodeconf /dev/ttyuUSB0 -T --freq 868000000 --bw 125000 --txp 2 --sf 7 --cr 5
``` ```
### Set RNode to host-controlled mode ### Set RNode to host-controlled mode
Use the -N option to set the device to host-controlled mode. Use the -N option to set the device to host-controlled mode.
``` ```sh
./rnodeconf /dev/ttyUSB0 -N rnodeconf /dev/ttyUSB0 -N
``` ```