rename readerthread to mainloop

This commit is contained in:
John Goerzen 2019-11-03 11:16:05 -06:00
parent 58bd0911bc
commit 969bb02815
3 changed files with 13 additions and 5 deletions

View File

@ -301,7 +301,7 @@ To interact directly with the modem, something like this will work:
cu -h --line /dev/ttyUSB0 -s 57600 -e -o -f --nostop cu -h --line /dev/ttyUSB0 -s 57600 -e -o -f --nostop
``` ```
# RUNNING TCP/IP OVER LORAPIPE WITH AX.25 # RUNNING SSH AND/OR TCP/IP OVER AX.25 WITH KISS
The AX.25 protocol was initially designed to be used for amateur radio The AX.25 protocol was initially designed to be used for amateur radio
purposes. As the original amateur radio systems have a number of purposes. As the original amateur radio systems have a number of
@ -322,12 +322,12 @@ ax25-apps socat`.
Now, edit `/etc/ax25/axports` and add a line such as: Now, edit `/etc/ax25/axports` and add a line such as:
``` ```
lora NODE1 1200 70 2 lorapipe radio lora NODE1 1200 70 1 lorapipe radio
``` ```
This defines a port named **lora**, with fake "callsign" **NODE1**, This defines a port named **lora**, with fake "callsign" **NODE1**,
speed 1200 (which is ignored), maximum packet length 70, and speed 1200 (which is ignored), maximum packet length 70, and
window 2. Keep the packet length less than the **--maxpacketsize**. window 1. Keep the packet length less than the **--maxpacketsize**.
It is possible that KISS frames may expand due to escaping; It is possible that KISS frames may expand due to escaping;
**lorapipe** will fragment them in this case, but it is best to keep **lorapipe** will fragment them in this case, but it is best to keep
this size significantly less than the **lorapipe** max packet size to this size significantly less than the **lorapipe** max packet size to
@ -364,6 +364,14 @@ For more information, see:
- [The Linux AX.25 HOWTO](http://www.tldp.org/HOWTO/AX25-HOWTO/) - [The Linux AX.25 HOWTO](http://www.tldp.org/HOWTO/AX25-HOWTO/)
## SSH OVER AX.25 WITHOUT TCP/IP
Although TCP/IP will run over AX.25, it adds enough overhead that is
can really slow things down. Plus, it's not really tuned for these
very low-bandwidth links. Fortunately, however, it's possible to run
SSH directly atop AX.25, which will perform better!
# INSTALLATION # INSTALLATION
**lorapipe** is a Rust program and can be built by running **`cargo **lorapipe** is a Rust program and can be built by running **`cargo

View File

@ -286,7 +286,7 @@ impl LoraStik {
Ok(()) Ok(())
} }
pub fn readerthread(&mut self) -> io::Result<()> { pub fn mainloop(&mut self) -> io::Result<()> {
loop { loop {
// First, check to see if we're allowed to transmit. If not, just // First, check to see if we're allowed to transmit. If not, just
// try to read and ignore all else. // try to read and ignore all else.

View File

@ -102,7 +102,7 @@ fn main() {
ls.radiocfg(opt.initfile).expect("Failed to configure radio"); ls.radiocfg(opt.initfile).expect("Failed to configure radio");
let mut ls2 = ls.clone(); let mut ls2 = ls.clone();
thread::spawn(move || ls2.readerthread().expect("Failure in readerthread")); thread::spawn(move || ls2.mainloop().expect("Failure in readerthread"));
let maxpacketsize = opt.maxpacketsize; let maxpacketsize = opt.maxpacketsize;