summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2024-01-06 19:53:30 +0100
committerDirk Brenken <dev@brenken.org>2024-01-06 19:55:32 +0100
commitce20f8d88be4fefaae15b06d18eef1639e992cd8 (patch)
treedeef200177de87f9130bf833cd0f41675fcb578a
parent6d47f6635672934d8f1a8643955c332854f15604 (diff)
travelmate: release 2.1.2-1
* fix a station scanning issue on single radio units (mainly a LuCI/JS issue) reported in the forum by multiple users Signed-off-by: Dirk Brenken <dev@brenken.org>
-rw-r--r--net/travelmate/Makefile6
-rw-r--r--net/travelmate/files/README.md5
-rwxr-xr-xnet/travelmate/files/travelmate.init22
3 files changed, 17 insertions, 16 deletions
diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile
index ef0bf2779..93f405efd 100644
--- a/net/travelmate/Makefile
+++ b/net/travelmate/Makefile
@@ -1,13 +1,13 @@
#
-# Copyright (c) 2016-2023 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2016-2024 Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=2.1.1
-PKG_RELEASE:=3
+PKG_VERSION:=2.1.2
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
diff --git a/net/travelmate/files/README.md b/net/travelmate/files/README.md
index c089e668e..5b794cd55 100644
--- a/net/travelmate/files/README.md
+++ b/net/travelmate/files/README.md
@@ -43,9 +43,8 @@ To avoid these kind of deadlocks, travelmate will set all station interfaces to
## Installation & Usage
* **Please note:** before you start with travelmate ...
- * you should setup at least one Access Point, ideally on a separate radio,
- * if you're updating from a former 1.x release, please use the '--force-reinstall --force-maintainer' options in opkg,
- * and remove any existing travelmate related uplink stations in your wireless config manually
+ * setup at least one AP, ideally on a separate radio
+ * if you're using a single radio unit set the AP channel to 'auto'
* download [travelmate](https://downloads.openwrt.org/snapshots/packages/x86_64/packages)
* download [luci-app-travelmate](https://downloads.openwrt.org/snapshots/packages/x86_64/luci)
* install both packages (_opkg install travelmate_, _opkg install luci-app-travelmate_)
diff --git a/net/travelmate/files/travelmate.init b/net/travelmate/files/travelmate.init
index be10d77f2..4a7dbf260 100755
--- a/net/travelmate/files/travelmate.init
+++ b/net/travelmate/files/travelmate.init
@@ -1,5 +1,5 @@
#!/bin/sh /etc/rc.common
-# Copyright (c) 2016-2023 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2016-2024 Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the GNU General Public License v3.
# set (s)hellcheck exceptions
@@ -15,6 +15,7 @@ extra_command "setup" "[<iface>] [<zone>] [<metric>] Setup the travelmate uplink
trm_init="/etc/init.d/travelmate"
trm_script="/usr/bin/travelmate.sh"
trm_pidfile="/var/run/travelmate.pid"
+trm_scanfile="/var/run/travelmate.scan"
boot() {
if [ -s "${trm_pidfile}" ]; then
@@ -76,19 +77,20 @@ status_service() {
}
scan() {
- local result scan_name radio="${1}"
+ local result radio="${1}"
+ : > "${trm_scanfile}"
if [ -z "${radio}" ]; then
- scan_name="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -q -l1 -e '@[@.up=true].interfaces[0].ifname')"
+ radio="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -q -l1 -e '@[@.up=true].interfaces[0].ifname')"
fi
- result="$(iwinfo "${radio:-${scan_name}}" scan 2>/dev/null |
+ result="$(iwinfo "${radio}" scan 2>/dev/null |
awk 'BEGIN{FS="[[:space:]]"}/Address:/{var1=$NF}/ESSID:/{var2="";
for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i}}/Channel:/{var3=$NF}/Quality:/{split($NF,var0,"/")}/Encryption:/{var4="";
for(j=12;j<=NF;j++)if(var4==""){var4=$j}else{var4=var4" "$j};printf " %-11i%-10s%-35s%-20s%s\n",(var0[1]*100/var0[2]),var3,var2,var1,var4}' |
sort -rn)"
- printf "%s\n" "::: Available nearby uplinks on '${radio:-${scan_name}}'"
- printf "%s\n" ":::"
+ printf "::: %s\n:::\n" "Available nearby uplinks on '${radio}'"
if [ -n "${result}" ]; then
+ printf "%s\n" "${result}" > "${trm_scanfile}"
printf "%-15s%-10s%-35s%-20s%s\n" " Strength" "Channel" "ESSID" "BSSID" "Encryption"
printf "%s\n" " --------------------------------------------------------------------------------------"
printf "%s\n" "${result}"
@@ -162,13 +164,13 @@ setup() {
}
assoc() {
- local result assoc_name radio="${1}"
+ local result radio="${1}"
if [ -z "${radio}" ]; then
- assoc_name="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -q -l1 -e '@[@.*.*.config.mode="ap"].interfaces[0].ifname')"
+ radio="$(ubus -S call network.wireless status 2>/dev/null | jsonfilter -q -l1 -e '@[@.*.*.config.mode="ap"].interfaces[0].ifname')"
fi
- result="$(iwinfo "${radio:-${assoc_name}}" assoc 2>/dev/null | awk '/^[A-Z0-9:]+/{printf " %s\n",$1}')"
- printf "%s\n" "::: Associated wlan stations on '${radio:-${assoc_name}}'"
+ result="$(iwinfo "${radio}" assoc 2>/dev/null | awk '/^[A-Z0-9:]+/{printf " %s\n",$1}')"
+ printf "%s\n" "::: Associated wlan stations on '${radio}'"
printf "%s\n" ":::"
if [ -n "${result}" ]; then
printf "%s\n" " MAC addresses"