Skip to content

Commit

Permalink
Merge pull request #7 from vahid-dan/main
Browse files Browse the repository at this point in the history
Separate noeveio and noevio-nat modes
  • Loading branch information
vahid-dan authored Aug 29, 2023
2 parents 7c4cb26 + 6e4d846 commit 50be239
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gateways/config-files/annie/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ led_monitor: # Not working with newer Linux kernels
lora_radio:
is_enabled: false
log_file: lora-radio.log
mode: pendant # "evio" or "noevio" or "pendant"
mode: noevio # "evio", "noevio", "noevio-nat", or "pendant"
serial_interface: ttyUSB0
lora_interface: tnc0
evio_interface: appCIBR6
Expand Down
2 changes: 1 addition & 1 deletion gateways/config-files/bita/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ led_monitor:
lora_radio:
is_enabled: false
log_file: lora-radio.log
mode: pendant # "evio" or "noevio" or "pendant"
mode: noevio # "evio", "noevio", "noevio-nat", or "pendant"
serial_interface: ttyUSB0
lora_interface: tnc0
evio_interface: appCIBR6
Expand Down
2 changes: 1 addition & 1 deletion gateways/config-files/bjorn/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ led_monitor:
lora_radio:
is_enabled: false
log_file: lora-radio.log
mode: pendant # "evio" or "noevio" or "pendant"
mode: noevio # "evio", "noevio", "noevio-nat", or "pendant"
serial_interface: ttyUSB0
lora_interface: tnc0
evio_interface: appCIBR6
Expand Down
2 changes: 1 addition & 1 deletion gateways/config-files/carina/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ led_monitor: # Not working with newer Linux kernels
lora_radio:
is_enabled: true
log_file: lora-radio.log
mode: pendant # "evio" or "noevio" or "pendant"
mode: noevio # "evio", "noevio", "noevio-nat", or "pendant"
serial_interface: ttyUSB0
lora_interface: tnc0
evio_interface: appCIBR6
Expand Down
2 changes: 1 addition & 1 deletion gateways/config-files/diana/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ led_monitor: # Not working with newer Linux kernels
lora_radio:
is_enabled: true
log_file: lora-radio.log
mode: pendant # "evio" or "noevio" or "pendant"
mode: pendant # "evio", "noevio", "noevio-nat", or "pendant"
serial_interface: ttyUSB0
lora_interface: tnc0
evio_interface: appCIBR6
Expand Down
2 changes: 1 addition & 1 deletion gateways/config-files/henrietta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ led_monitor: # Not working with newer Linux kernels
lora_radio:
is_enabled: true
log_file: lora-radio.log
mode: pendant # "evio" or "noevio" or "pendant"
mode: noevio # "evio", "noevio", "noevio-nat", or "pendant"
serial_interface: ttyUSB0
lora_interface: tnc0
evio_interface: appCIBR6
Expand Down
4 changes: 2 additions & 2 deletions gateways/config-files/norvel/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ led_monitor: # Not working with newer Linux kernels
lora_radio:
is_enabled: true
log_file: lora-radio.log
mode: noevio # "evio" or "noevio" or "pendant"
mode: noevio-nat # "evio", "noevio", "noevio-nat", or "pendant"
serial_interface: ttyUSB0
lora_interface: tnc0
evio_interface: appCIBR6
switch_interface: enp1s0
switch_interface: enx0015ff030033
node_ip: 10.10.101.1/24 # ip/netmask
switch_ip: 10.10.101.1/24 # ip/netmask, IP address of the gateway on the other side of the LoRa link
baud_rate: 115200
Expand Down
6 changes: 6 additions & 0 deletions gateways/remote-access/lora-radio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ echo "########## START ##########"
sudo /usr/bin/killall tncattach || true
sleep 5

echo "LoRa in $lora_radio_mode mode"
case $lora_radio_mode in
"pendant")
sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i $lora_radio_node_ip
Expand All @@ -47,6 +48,11 @@ case $lora_radio_mode in
;;

"noevio")
sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i $lora_radio_node_ip
sudo /usr/sbin/tc qdisc add dev $lora_radio_lora_interface root tbf rate "$lora_radio_rate"kbit burst "$lora_radio_burst"kbit latency "$lora_radio_latency"ms
;;

"noevio-nat")
sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i $lora_radio_node_ip
sudo /usr/sbin/tc qdisc add dev $lora_radio_lora_interface root tbf rate "$lora_radio_rate"kbit burst "$lora_radio_burst"kbit latency "$lora_radio_latency"ms
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward > /dev/null
Expand Down

0 comments on commit 50be239

Please sign in to comment.