From d4556e94ca210598af0020529fec40d4619a52fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 4 Feb 2024 20:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=84=20Sync=202024-02-04=2020:23:43?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-broadbandacc/Makefile | 4 +- .../files/root/usr/bin/broadband.sh | 41 ++++++++++++++++--- modemband/Makefile | 4 +- modemband/README.md | 1 + .../usr/share/modemband/2c7c0800RM505Q-AE | 12 ++++++ 5 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 modemband/files/usr/share/modemband/2c7c0800RM505Q-AE diff --git a/luci-app-broadbandacc/Makefile b/luci-app-broadbandacc/Makefile index b683c6570..027e93d19 100644 --- a/luci-app-broadbandacc/Makefile +++ b/luci-app-broadbandacc/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-broadbandacc -PKG_VERSION:=3.7 -PKG_RELEASE:=16 +PKG_VERSION:=3.8 +PKG_RELEASE:=17 PKG_MAINTAINER:=Diciya <484154383@qq.com> PKG_LICENSE:=GPLv3 diff --git a/luci-app-broadbandacc/files/root/usr/bin/broadband.sh b/luci-app-broadbandacc/files/root/usr/bin/broadband.sh index fa55b677e..eed912ea9 100644 --- a/luci-app-broadbandacc/files/root/usr/bin/broadband.sh +++ b/luci-app-broadbandacc/files/root/usr/bin/broadband.sh @@ -163,6 +163,7 @@ isp_bandwidth() { local _updatedAt json_get_var _updatedAt "updatedAt" _log "提速开始时间: $_updatedAt" $(( 1 | 1 * 4 )) + #普通 local _targetUpH json_get_var _targetUpH "targetUpH" local _upHExpire @@ -178,18 +179,40 @@ isp_bandwidth() { local _downExpire json_get_var _downExpire "downExpire" _log "下行带宽${_download}M提速截至时间: $_downExpire" $(( 1 | 1 * 4 )) - #50 + #套餐1 + local _downUp50Expire + json_get_var _downUp50Expire "downUp50Expire" + _log "一类套餐带宽$(expr $_targetUpH / 1024)M上行+${_download}M下行提速截至时间: $_downUp50Expire" $(( 1 | 1 * 4 )) + #套餐2 + local _downUpExpire + json_get_var _downUpExpire "downUpExpire" + _log "二类套餐带宽$(expr $_targetUp100 / 1024)M上行+${_download}M下行提速截至时间: $_downUpExpire" $(( 1 | 1 * 4 )) + #普通 local _upHExpireT + local _up100ExpireT + local _downExpireT + #50 json_get_var _upHExpireT "upHExpireT" #100 - local _up100ExpireT json_get_var _up100ExpireT "up100ExpireT" #500 - local _downExpireT json_get_var _downExpireT "downExpireT" + #套餐 + local _downUp50ExpireT + local _downUpExpireT + json_get_var _downUp50ExpireT "downUp50ExpireT" + json_get_var _downUpExpireT "downUpExpireT" #time local cur_sec=`date '+%s'` - if [ $_up100ExpireT != "false" -a $_up100ExpireT -gt $cur_sec ]; then + if [ $_downUpExpireT != "false" -a $_downUpExpireT -gt $cur_sec ]; then + #二类套餐上行提速 + local outmsg="二类套餐上行提速成功,带宽已提升至 $(expr $_targetUp100 / 1024)M"; _log "$outmsg" $(( 1 | 2 * 8 )) + [ $1 -eq 1 ] && down_acc=2 || up_acc=2 + elif [ $_downUp50ExpireT != "false" -a $_downUp50ExpireT -gt $cur_sec ]; then + #一类套餐上行提速 + local outmsg="一类套餐上行提速成功,带宽已提升至 $(expr $_targetUpH / 1024)M"; _log "$outmsg" $(( 1 | 2 * 8 )) + [ $1 -eq 1 ] && down_acc=2 || up_acc=2 + elif [ $_up100ExpireT != "false" -a $_up100ExpireT -gt $cur_sec ]; then #二类上行提速 local outmsg="二类上行提速成功,带宽已提升至 $(expr $_targetUp100 / 1024)M"; _log "$outmsg" $(( 1 | 2 * 8 )) [ $1 -eq 1 ] && down_acc=2 || up_acc=2 @@ -201,7 +224,15 @@ isp_bandwidth() { local outmsg="上行未开通"; _log "$outmsg" $(( 1 | 2 * 8 | 32 )) [ $1 -eq 1 ] && down_acc=0 || up_acc=0 fi - if [ $_downExpireT != "false" -a $_downExpireT -gt $cur_sec ]; then + if [ $_downUpExpireT != "false" -a $_downUpExpireT -gt $cur_sec ]; then + #二类套餐下行提速 + local outmsg="二类套餐下行提速成功,带宽已提升至 ${_download}M"; _log "$outmsg" $(( 1 | 1 * 8 )) + [ $1 -eq 1 ] && down_acc=2 || up_acc=2 + elif [ $_downUp50ExpireT != "false" -a $_downUp50ExpireT -gt $cur_sec ]; then + #一类套餐下行提速 + local outmsg="一类套餐下行提速成功,带宽已提升至 ${_download}M"; _log "$outmsg" $(( 1 | 1 * 8 )) + [ $1 -eq 1 ] && down_acc=2 || up_acc=2 + elif [ $_downExpireT != "false" -a $_downExpireT -gt $cur_sec ]; then #下行提速 local outmsg="下行提速成功,带宽已提升至 ${_download}M"; _log "$outmsg" $(( 1 | 1 * 8 )) [ $1 -eq 1 ] && down_acc=2 || up_acc=2 diff --git a/modemband/Makefile b/modemband/Makefile index 194207a43..73df673d6 100644 --- a/modemband/Makefile +++ b/modemband/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemband -PKG_VERSION:=20240130 -PKG_RELEASE:=16 +PKG_VERSION:=20240204 +PKG_RELEASE:=17 include $(INCLUDE_DIR)/package.mk diff --git a/modemband/README.md b/modemband/README.md index d2e4023fb..39676e230 100644 --- a/modemband/README.md +++ b/modemband/README.md @@ -23,6 +23,7 @@ Supported devices: - Quectel RM500Q-GL - Quectel RM500U-CNV - Quectel RM502Q-AE +- Quectel RM505Q-AE - Quectel RM520N-GL - Sierra Wireless EM7455/MC7455/DW5811e - SIMCOM SIM8200EA-M2 diff --git a/modemband/files/usr/share/modemband/2c7c0800RM505Q-AE b/modemband/files/usr/share/modemband/2c7c0800RM505Q-AE new file mode 100644 index 000000000..31d19dd46 --- /dev/null +++ b/modemband/files/usr/share/modemband/2c7c0800RM505Q-AE @@ -0,0 +1,12 @@ +_DEVICE=/dev/ttyUSB2 +_DEFAULT_LTE_BANDS="1 2 3 4 5 8 12 13 14 17 18 19 20 25 26 28 29 30 32 34 39 40 41 42 43 46 48 66 71" +_DEFAULT_5GNSA_BANDS="1 2 3 5 7 8 12 14 20 25 28 38 40 41 48 66 71 77 78 79" +_DEFAULT_5GSA_BANDS="1 2 3 5 7 8 12 14 20 25 28 38 40 41 48 66 71 77 78 79" + +getinfo() { + echo "Quectel RM505Q-AE" +} + +# +QNWPREFCFG: "lte_band",1:3:7:8:20:28:38 + +. $RES/_quectel_common2