Qmodem: Release 2.3

This commit is contained in:
fujr 2024-10-20 12:13:37 +08:00
parent 8fbf63e329
commit dcca10e02f
15 changed files with 296 additions and 213 deletions

View File

@ -5,18 +5,24 @@
(使用 js luci 时请添加 luci-compat 软件包) (使用 js luci 时请添加 luci-compat 软件包)
# 使用方法 # 使用方法
### 增加feed源 ### 增加feed源
``` ```
echo >> feeds.conf.default echo >> feeds.conf.default
echo 'src-git modem https://github.com/FUjr/modem_feeds.git;main' >> feeds.conf.default echo 'src-git modem https://github.com/FUjr/modem_feeds.git;main' >> feeds.conf.default
./scripts/feeds update modem ./scripts/feeds update modem
./scripts/feeds install -a -p modem ./scripts/feeds install -a -p modem
``` ```
### 集成软件包 ### 集成软件包
``` ```
make menuconfig make menuconfig
``` ```
### 选择软件包 ### 选择软件包
``` ```
LuCI ---> LuCI --->
3. Applications ---> 3. Applications --->
@ -26,6 +32,7 @@ LuCI --->
<*> luci-app-qmodem-sms.......................... Luci qwrt modem sms support <*> luci-app-qmodem-sms.......................... Luci qwrt modem sms support
< > luci-app-qmodem-ttl.......................... Luci qwrt modem ttl support < > luci-app-qmodem-ttl.......................... Luci qwrt modem ttl support
``` ```
# 鸣谢 # 鸣谢
在模组管理插件的开发过程中,参考了以下仓库 在模组管理插件的开发过程中,参考了以下仓库
@ -131,29 +138,32 @@ LuCI --->
### sms-tool_q ### sms-tool_q
#### 介绍 #### 介绍
添加了补丁以支持发送原始 pdu ,其余与原项目相同
添加了补丁以支持发送原始 pdu ,其余与原项目相同
### luci-app ### luci-app
#### 坑 #### 坑
为了给未来切换 js luci 做准备的同时兼顾lua luci的兼容性我使用脚本写了一个rpcd的warpper来调用modem_ctrl目前的rpcd仅有获取信息功能无设置功能。在htdoc下实现了一个简易的首页信息展示 为了给未来切换 js luci 做准备的同时兼顾lua luci的兼容性我使用脚本写了一个rpcd的warpper来调用modem_ctrl目前的rpcd仅有获取信息功能无设置功能。在htdoc下实现了一个简易的首页信息展示
#### 坑 #### 坑
原来设计的扫描所有usb设备的方法在部分路由器下存在性能问题同时 at探测功能会发送非预期的at指令因此策略修改为提前把模组可能的slot写入配置文件只扫描特定slot目前认为不需要对普通用户暴露该功能故没做luci界面 原来设计的扫描所有usb设备的方法在部分路由器下存在性能问题同时 at探测功能会发送非预期的at指令因此策略修改为提前把模组可能的slot写入配置文件只扫描特定slot目前认为不需要对普通用户暴露该功能故没做luci界面
#### 坑 #### 坑
led 状态的实现目前led状态的实现相当不优雅被集成在了modem_dial里每次拨号状态改变时会触发led状态的修改因此如果脚本非正常退出等情况出现时灯会失效。灯与slot的绑定状态同样暂未考虑对用户暴露 led 状态的实现目前led状态的实现相当不优雅被集成在了modem_dial里每次拨号状态改变时会触发led状态的修改因此如果脚本非正常退出等情况出现时灯会失效。灯与slot的绑定状态同样暂未考虑对用户暴露
#### 坑 #### 坑
更改了配置文件名称ttl mwan hc 暂未经测试,可能出现错误
更改了配置文件名称ttl mwan hc 暂未经测试,可能出现错误
对于2、3号坑可以参考 ```luci/luci-app-qmodem/root/etc/uci-defaults/99-add-5g-handler``` 添加你的设备 对于2、3号坑可以参考 ```luci/luci-app-qmodem/root/etc/uci-defaults/99-add-5g-handler``` 添加你的设备
### 开发计划 ### 开发计划
| 计划 | 进度 | | 计划 | 进度 |
| ------------------------------------------------- | ----- | | ------------------------------------------------- | ---------- |
| 将后端程序与luci-app完全分离 | 0 | | 将后端程序与luci-app完全分离 | 0 |
| 修复quectel-CM乱call udhcpd和删除默认路由表的问题 | 0 | | 修复quectel-CM乱call udhcpd和删除默认路由表的问题 | 0 |
| 加入pcie模组支持 | 0 | | 加入pcie模组支持 | 实验性支持 |
| 自己实现at收发程序 | 50% | | 自己实现at收发程序 | 50% |
| 切换js luci | 5% | | 切换js luci | 5% |
| 修复ipv6 | 5% | | 修复ipv6 | 5% |

View File

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-qmodem PKG_NAME:=luci-app-qmodem
LUCI_TITLE:=LuCI support for QWRT Modem LUCI_TITLE:=LuCI support for QWRT Modem
LUCI_PKGARCH:=all LUCI_PKGARCH:=all
PKG_VERSION:=2.1 PKG_VERSION:=2.3
PKG_LICENSE:=GPLv3 PKG_LICENSE:=GPLv3
PKG_LINCESE_FILES:=LICENSE PKG_LINCESE_FILES:=LICENSE
PKG_MAINTAINER:=Tom <fjrcn@outlook.com> PKG_MAINTAINER:=Tom <fjrcn@outlook.com>

View File

@ -28,6 +28,12 @@ sms_at_port = s:taboption("general",Value, "sms_at_port", translate("SMS AT Port
sms_at_port.rmempty = true sms_at_port.rmempty = true
valid_at_ports = uci:get("qmodem",arg[1],"valid_at_ports") valid_at_ports = uci:get("qmodem",arg[1],"valid_at_ports")
avalible_ports = uci:get("qmodem",arg[1],"ports") avalible_ports = uci:get("qmodem",arg[1],"ports")
if valid_at_ports == nil then
valid_at_ports = {}
end
if avalible_ports == nil then
avalible_ports = {}
end
for i1,v1 in ipairs(avalible_ports) do for i1,v1 in ipairs(avalible_ports) do
for i2,v2 in ipairs(valid_at_ports) do for i2,v2 in ipairs(valid_at_ports) do
if v1 == v2 then if v1 == v2 then
@ -47,7 +53,7 @@ at_port.placeholder = translate("Not null")
at_port.rmempty = false at_port.rmempty = false
ra_master = s:taboption("advanced", Flag, "ra_master", translate("RA Master")) ra_master = s:taboption("advanced", Flag, "ra_master", translate("RA Master"))
ra_master.description = translate("Once checking, This interface will enable IPV6 RA Master.Only one interface can be set to RA Master.") ra_master.description = translate("Caution: Enabling this option will make it the IPV6 RA Master, and only one interface can be configured as such.")
ra_master.default = "0" ra_master.default = "0"
extend_prefix = s:taboption("advanced", Flag, "extend_prefix", translate("Extend Prefix")) extend_prefix = s:taboption("advanced", Flag, "extend_prefix", translate("Extend Prefix"))

View File

@ -5,8 +5,8 @@ m.title = translate("QModem Setting")
this_page = d.build_url("admin", "network", "qmodem", "settings") this_page = d.build_url("admin", "network", "qmodem", "settings")
s = m:section(NamedSection, "main", "main", translate("Modem Probe setting")) s = m:section(NamedSection, "main", "main", translate("Modem Probe setting"))
manual_configuration = s:option(Flag, "manual_configuration", translate("Block Auto Probe/Remove")) block_auto_probe = s:option(Flag, "block_auto_probe", translate("Block Auto Probe/Remove"))
manual_configuration.description = translate("If enabled, the modem auto scan will be blocked.") block_auto_probe.description = translate("If enabled, the modem auto scan will be blocked.")
enable_pcie_scan = s:option(Flag, "enable_pcie_scan", translate("Enable PCIE Scan")) enable_pcie_scan = s:option(Flag, "enable_pcie_scan", translate("Enable PCIE Scan"))
enable_pcie_scan.description = translate("Once enabled, the PCIe ports will be scanned on every boot.") enable_pcie_scan.description = translate("Once enabled, the PCIe ports will be scanned on every boot.")

View File

@ -1,449 +1,466 @@
#controller/qmodem.lua #controller/qmodem.lua
msgid "QModem" msgid "QModem"
msgstr "" msgstr "QWRT模组管理"
msgid "QModem Information" msgid "QModem Information"
msgstr "" msgstr "模组信息"
msgid "Dial Overview" msgid "Dial Overview"
msgstr "" msgstr "拨号概览"
msgid "Advance Modem Settings" msgid "Advance Modem Settings"
msgstr "" msgstr "高级模组设置"
msgid "QModem Settings" msgid "QModem Setting"
msgstr "" msgstr "QModem 设置"
# model/cbi/dial_config.lua # model/cbi/dial_config.lua
msgid "Modem Configuration" msgid "Modem Configuration"
msgstr "" msgstr "模组配置"
msgid "General Settings" msgid "General Settings"
msgstr "" msgstr "一般设置"
msgid "Advanced Settings" msgid "Advanced Settings"
msgstr "" msgstr "高级设置"
msgid "Enable Dial" msgid "Enable Dial"
msgstr "" msgstr "启用拨号"
msgid "Modem Alias" msgid "Modem Alias"
msgstr "" msgstr "模组别名"
msgid "AT Port" msgid "AT Port"
msgstr "" msgstr "AT端口"
msgid "SMS AT Port" msgid "SMS AT Port"
msgstr "" msgstr "短信AT端口"
msgid "RA Master" msgid "RA Master"
msgstr "" msgstr "作为RA上游"
msgid "After checking, This interface will enable IPV6 RA Master.Only one interface can be set to RA Master." msgid "After checking, This interface will enable IPV6 RA Master.Only one interface can be set to RA Master."
msgstr "" msgstr "设置后该接口会作为IPV6 RA上游同一时间只有一个接口可以是RA上游"
msgid "Extend Prefix" msgid "Extend Prefix"
msgstr "" msgstr "扩展前缀"
msgid "Once checking, the prefix will be apply to lan zone" msgid "Once checking, the prefix will be apply to lan zone"
msgstr "" msgstr "启用后该接口的前缀会被通告至Lan区域"
msgid "PDP Type" msgid "PDP Type"
msgstr "" msgstr "PDP类型"
msgid "Auto Choose" msgid "Auto Choose"
msgstr "" msgstr "自动选择"
msgid "China Mobile" msgid "China Mobile"
msgstr "" msgstr "中国移动"
msgid "China Unicom" msgid "China Unicom"
msgstr "" msgstr "中国联通"
msigd "China Telecom" msigd "China Telecom"
msgstr "" msgstr "中国电信"
msgid "China Broadcast" msgid "China Broadcast"
msgstr "" msgstr "中国广电"
msgid "Skytone" msgid "Skytone"
msgstr "" msgstr "天际通"
msgid "Authentication Type" msgid "Authentication Type"
msgstr "" msgstr "认证类型"
msgid "None" msgid "None"
msgstr "" msgstr ""
msgid "PAP" msgid "PAP"
msgstr "" msgstr "PAP认证"
msgid "CHAP" msgid "CHAP"
msgstr "" msgstr "CHAP认证"
msgid "PAP/CHAP (both)" msgid "PAP/CHAP (both)"
msgstr "" msgstr "PAP/CHAP认证"
msgid "PAP/CHAP Username" msgid "PAP/CHAP Username"
msgstr "" msgstr "PAP/CHAP 用户名"
msgid "PAP/CHAP Password" msgid "PAP/CHAP Password"
msgstr "" msgstr "PAP/CHAP 密码"
msgid "PIN Code" msgid "PIN Code"
msgstr "" msgstr "Pin码"
msgid "If the PIN code is not set, leave it blank." msgid "If the PIN code is not set, leave it blank."
msgstr "" msgstr "如果未设置PIN码请留空。"
msgid "If solt 2 config is not set,will use slot 1 config." msgid "If solt 2 config is not set,will use slot 1 config."
msgstr "" msgstr "如果卡2的设置为空会使用卡1的设置"
msgid "The metric value is used to determine the priority of the route. The smaller the value, the higher the priority. Cannot duplicate." msgid "The metric value is used to determine the priority of the route. The smaller the value, the higher the priority. Cannot duplicate."
msgstr "" msgstr "路由优先级,越小的数字优先级越高。不可以和其他接口重复"
#odel/cbi/dial_overview.lua #odel/cbi/dial_overview.lua
msgid "Dial Overview" msgid "Dial Overview"
msgstr "" msgstr "拨号总览"
msgid "Global Config" msgid "Global Config"
msgstr "" msgstr "全局设置"
msgid "Enable Dial" msgid "Enable Dial"
msgstr "" msgstr "启用拨号"
msgid "(Global)" msgid "(Global)"
msgstr "" msgstr "(全局)"
msgid "Restart Dial Service" msgid "Restart Dial Service"
msgstr "" msgstr "重启拨号服务"
msgid "Config List" msgid "Config List"
msgstr "" msgstr "配置列表"
msgid "Modem Model" msgid "Modem Model"
msgstr "" msgstr "模组型号"
msgid "Modem Alias" msgid "Modem Alias"
msgstr "" msgstr "模组别名"
msgid "Modem Status" msgid "Modem Status"
msgstr "" msgstr "模组状态"
msgid "Remove Modem" msgid "Remove Modem"
msgstr "" msgstr "移除模组"
# model/cbi/settings.lua # model/cbi/settings.lua
msgid "QModem Settings" msgid "QModem Settings"
msgstr "" msgstr "QModem设置"
msgid "Modem Probe setting" msgid "Modem Probe setting"
msgstr "" msgstr "模组加载设置"
msgid "Block Auto Probe/Remove" msgid "Block Auto Probe/Remove"
msgstr "" msgstr "禁用自动加载/移除模组"
msgid "If enabled, the modem auto scan will be blocked." msgid "If enabled, the modem auto scan will be blocked."
msgstr "" msgstr "富国开启了,自动扫描模组服务会关闭"
msgid "Enable PCIE Scan" msgid "Enable PCIE Scan"
msgstr "" msgstr "启用PCIe模组扫描"
msgid "Once enabled, the PCIe ports will be scanned on every boot." msgid "Once enabled, the PCIe ports will be scanned on every boot."
msgstr "" msgstr "如果启用了每次开机会扫描PCIe接口"
msgid "Enable USB Scan" msgid "Enable USB Scan"
msgstr "" msgstr "启用USB模组扫描"
msgid "Once enabled, the USB ports will be scanned on every boot." msgid "Once enabled, the USB ports will be scanned on every boot."
msgstr "" msgstr "如果启用了每次开机会扫描USB接口"
msgid "Try Preset USB Port" msgid "Try Preset USB Port"
msgstr "" msgstr "监控预设的USB端口"
msgid "Attempt to use pre-configured USB settings from the cpe vendor." msgid "Attempt to use pre-configured USB settings from the cpe vendor."
msgstr "" msgstr "尝试使用预设USB端口"
msgid "Try Preset PCIE Port" msgid "Try Preset PCIE Port"
msgstr "" msgstr "监控预设的PCIe端口"
msgid "Attempt to use pre-configured PCIE settings from the cpe vendor." msgid "Attempt to use pre-configured PCIE settings from the cpe vendor."
msgstr "" msgstr "尝试使用预设PCIe端口"
msgid "Scan ALL Manually" msgid "Scan ALL Manually"
msgstr "" msgstr "手动扫描所有"
msgid "Scan PCIE manually." msgid "Scan PCIE Manually"
msgstr "" msgstr "手动扫描PCIe"
msgid "Scan USB Manually" msgid "Scan USB Manually"
msgstr "" msgstr "手动扫描USB"
msgid "Modem Slot Config List" msgid "Modem Slot Config List"
msgstr "" msgstr "模组插槽配置列表"
msgid "Slot Type" msgid "Slot Type"
msgstr "" msgstr "插槽类型"
msgid "Slot Path" msgid "Slot Path"
msgstr "" msgstr "插槽路径"
msgid "Config Name" msgid "Config Name"
msgstr "" msgstr "配置名称"
# model/cbi/slot_config.lua # model/cbi/slot_config.lua
msgid "Slot Configuration" msgid "Slot Configuration"
msgstr "" msgstr "插槽配置"
msgid "Slot Type" msgid "Slot Type"
msgstr "" msgstr "插槽类型"
msgid "Slot ID" msgid "Slot ID"
msgstr "" msgstr "插槽ID"
msgid "SIM LED" msgid "SIM LED"
msgstr "" msgstr "SIM卡指示灯"
msgid "NET LED" msgid "NET LED"
msgstr "" msgstr "网络指示灯"
msgid "Enable 5G Ethernet" msgid "Enable 5G Ethernet"
msgstr "" msgstr "启用5G转网口"
msgid "If a 5G module is connected to the Ethernet PHY, please specify the associated interface name here." msgid "For 5G modules using the Ethernet PHY connection, please specify the network interface name. (e.g., eth0, eth1)"
msgstr "" msgstr "如果模组使用PHY连接请指定网卡名称如eth1 eth2)"
msgid "Associated USB" msgid "Associated USB"
msgstr "" msgstr "关联的USB"
msgid "If a USB modem is connected to the USB port, please specify the associated USB port here.(for tty port)" msgid "For M.2 slots with both PCIe and USB support, specify the associated USB port (for ttyUSB access)"
msgstr "" msgstr "如果M.2接口同时提供pcie和usb请关联usb用于使用usb tty接口"
# view/qmodem/dial_overview.htm # view/qmodem/dial_overview.htm
msgid "Connected" msgid "Connected"
msgstr "" msgstr "已连接"
msgid "Disconnected" msgid "Disconnected"
msgstr "" msgstr "未连接"
msgid "Unknown" msgid "Unknown"
msgstr "" msgstr "未知"
msgid "Download" msgid "Download"
msgstr "" msgstr "下载"
msgid "Clear" msgid "Clear"
msgstr "" msgstr "清除"
msgid "Modem Status" msgid "Modem Status"
msgstr "" msgstr "模组状态"
msgid "Modem Log" msgid "Modem Log"
msgstr "" msgstr "模组日志"
# view/qmodem/modem_debug.htm # view/qmodem/modem_debug.htm
msgid "Lock Band" msgid "Lock Band"
msgstr "" msgstr "锁频"
msgid "Select All" msgid "Select All"
msgstr "" msgstr "全选"
msgid "Submit" msgid "Submit"
msgstr "" msgstr "提交"
msgid "Rat Prefer" msgid "Rat Prefer"
msgstr "" msgstr "制式偏好"
msgid "Current Mode%" msgid "Current Mode"
msgstr "" msgstr "当前模式"
msgid "Setting"
msgstr "设置"
msgid "Dial Mode" msgid "Dial Mode"
msgstr "" msgstr "拨号模式"
msgid "Neighbor Cell" msgid "Neighbor Cell"
msgstr "" msgstr "邻区"
msgid "Lock Cell Setting" msgid "Lock Cell Setting"
msgstr "" msgstr "锁频设置"
msgid "RAT" msgid "RAT"
msgstr "" msgstr "制式"
msgid "PCI" msgid "PCI"
msgstr "" msgstr "物理小区IDPCI)"
msgid "ARFCN" msgid "ARFCN"
msgstr "" msgstr "频点ARFCN"
msgid "TAC" msgid "TAC"
msgstr "" msgstr "TAC"
msgid "Band" msgid "Band"
msgstr "" msgstr "频段"
msgid "SCS" msgid "SCS"
msgstr "" msgstr "子载波间隔SCS"
msgid "Status" msgid "Status"
msgstr "" msgstr "状态"
msgid "Copy" msgid "Copy"
msgstr "" msgstr "复制"
msgid "Set IMEI" msgid "Set IMEI"
msgstr "" msgstr "设置IMEI"
msgid "Modem Name" msgid "Modem Name"
msgstr "" msgstr "模组名称"
msgid "Warning!" msgid "Warning!"
msgstr "" msgstr "警告!"
# root/usr/share/qmodem/fibocom.sh # root/usr/share/qmodem/fibocom.sh
msgid "Voltage" msgid "Voltage"
msgstr "" msgstr "电压"
msgid "Temperature" msgid "Temperature"
msgstr "" msgstr "温度"
msgid "Manufacturer" msgid "Manufacturer"
msgstr "" msgstr "制造商"
msgid "SIM Status" msgid "SIM Status"
msgstr "" msgstr "SIM 状态"
msgid "Internet Service Provider" msgid "Internet Service Provider"
msgstr "" msgstr "互联网服务提供商"
msgid "SIM Slot" msgid "SIM Slot"
msgstr "" msgstr "SIM 插槽"
msgid "SIM Number" msgid "SIM Number"
msgstr "" msgstr "SIM 卡号码"
msgid "International Mobile Equipment Identity" msgid "International Mobile Equipment Identity"
msgstr "" msgstr "国际移动设备身份IMEI"
msgid "International Mobile Subscriber Identity" msgid "International Mobile Subscriber Identity"
msgstr "" msgstr "国际移动用户身份IMSI"
msgid "Integrate Circuit Card Identity" msgid "Integrate Circuit Card Identity"
msgstr "" msgstr "集成电路卡身份ICCID"
msgid "Network Type" msgid "Network Type"
msgstr "" msgstr "网络类型"
msgid "Channel Quality Indicator for Uplink" msgid "Channel Quality Indicator for Uplink"
msgstr "" msgstr "上行链路信道质量指示器CQI"
msgid "Channel Quality Indicator for Downlink" msgid "Channel Quality Indicator for Downlink"
msgstr "" msgstr "下行链路信道质量指示器CQI"
msgid "Access Maximum Bit Rate for Uplink" msgid "Access Maximum Bit Rate for Uplink"
msgstr "" msgstr "上行链路最大比特率"
msgid "Access Maximum Bit Rate for Downlink" msgid "Access Maximum Bit Rate for Downlink"
msgstr "" msgstr "下行链路最大比特率"
msgid "Transmit Rate" msgid "Transmit Rate"
msgstr "" msgstr "传输速率"
msgid "Receive Rate" msgid "Receive Rate"
msgstr "" msgstr "发送速率"
msgid "Network Mode" msgid "Network Mode"
msgstr "" msgstr "网络模式"
msgid "Mobile Country Code" msgid "Mobile Country Code"
msgstr "" msgstr "移动国家代码MCC"
msgid "Mobile Network Code" msgid "Mobile Network Code"
msgstr "" msgstr "移动网络代码MMC"
msgid "Duplex Mode" msgid "Duplex Mode"
msgstr "" msgstr "双工模式"
msgid "Physical Cell ID" msgid "Physical Cell ID"
msgstr "" msgstr "物理小区 IDPCI"
msgid "Tracking area code of cell servedby neighbor Enb" msgid "Tracking area code of cell servedby neighbor Enb"
msgstr "" msgstr "邻近 eNB 服务的小区跟踪区代码TAC"
msgid "Absolute Radio-Frequency Channel Number" msgid "Absolute Radio-Frequency Channel Number"
msgstr "" msgstr "绝对射频信道编号ARRCN"
msgid "Band" msgid "Band"
msgstr "" msgstr "频段"
msgid "DL Bandwidth"
msgstr ""
msgid "Reference Signal Received Power" msgid "Reference Signal Received Power"
msgstr "" msgstr "参考信号接收功率RSRP"
msgid "Reference Signal Received Quality" msgid "Reference Signal Received Quality"
msgstr "" msgstr "参考信号接收质量RSRQ"
msgid "Signal to Interference plus Noise Ratio Bandwidth" msgid "Signal to Interference plus Noise Ratio Bandwidth"
msgstr "" msgstr "信号与干扰加噪声比带宽SINRB"
msgid "Received Signal Level" msgid "Received Signal Level"
msgstr "" msgstr "接收信号水平RSL"
msgid "SCS" msgid "SCS"
msgstr "" msgstr "子载波间隔SCS"
msgid "Serving Cell Receive Level" msgid "Serving Cell Receive Level"
msgstr "" msgstr "服务小区接收水平SCRL"
msgid "E-UTRA Absolute Radio Frequency Channel Number" msgid "E-UTRA Absolute Radio Frequency Channel Number"
msgstr "" msgstr "E-UTRA 绝对射频信道编号ARFCN"
msgid "Freq band indicator" msgid "Freq band indicator"
msgstr "" msgstr "频段指示器FBI"
msgid "UL Bandwidth" msgid "UL Bandwidth"
msgstr "" msgstr "上行带宽"
msgid "DL Bandwidth" msgid "DL Bandwidth"
msgstr "" msgstr "下行带宽"
msgid "Received Signal Strength Indicator" msgid "Received Signal Strength Indicator"
msgstr "" msgstr "接收信号强度指示器(RSSI)"
msgid "Radio Signal Strength Noise Ratio" msgid "Radio Signal Strength Noise Ratio"
msgstr "" msgstr "无线信号强度噪声比(RSSNR)"
msgid "Channel Quality Indicator" msgid "Channel Quality Indicator"
msgstr "" msgstr "信道质量指示器(CQI)"
msgid "TX Power" msgid "TX Power"
msgstr "" msgstr "发射功率"
msgid "ocation Area Code" msgid "ocation Area Code"
msgstr "" msgstr "位置区域代码"
msgid "Speech Code" msgid "Speech Code"
msgstr "" msgstr "语音编码"
msgid "Ec/No" msgid "Ec/No"
msgstr "" msgstr "Ec/No"
msgid "Ec/Io" msgid "Ec/Io"
msgstr "" msgstr "Ec/Io"
msgid "Spreading Factor" msgid "Spreading Factor"
msgstr "" msgstr "扩频因子"
msgid "Compression Mode" msgid "Compression Mode"
msgstr "" msgstr "压缩模式"
msgid "RxLev" msgid "RxLev"
msgstr "" msgstr "接收电平"
# root/usr/share/qmodem/generic.sh # root/usr/share/qmodem/generic.sh
msgid " "SIM Error,Error code:" "warning"" msgid " "SIM Error,Error code:"
msgstr "" msgstr "SIM 错误,错误代码:"
msgid "warning"
msgstr "警告"
msgid "Connect Status" msgid "Connect Status"
msgstr "" msgstr "连接状态"
msgid "Cell Information"
msgstr "基站信息"
msgid "Base Information"
msgstr "基本信息"
msgid "Network Information"
msgstr "网络信息"
msgid "SIM Information"
msgstr "SIM卡信息"

View File

@ -11,7 +11,7 @@ msgstr "拨号概览"
msgid "Advance Modem Settings" msgid "Advance Modem Settings"
msgstr "高级模组设置" msgstr "高级模组设置"
msgid "QModem Settings" msgid "QModem Setting"
msgstr "QModem 设置" msgstr "QModem 设置"
# model/cbi/dial_config.lua # model/cbi/dial_config.lua
@ -158,7 +158,7 @@ msgstr "启用USB模组扫描"
msgid "Once enabled, the USB ports will be scanned on every boot." msgid "Once enabled, the USB ports will be scanned on every boot."
msgstr "如果启用了每次开机会扫描USB接口" msgstr "如果启用了每次开机会扫描USB接口"
msgid "Try Preset USB" msgid "Try Preset USB Port"
msgstr "监控预设的USB端口" msgstr "监控预设的USB端口"
msgid "Attempt to use pre-configured USB settings from the cpe vendor." msgid "Attempt to use pre-configured USB settings from the cpe vendor."
@ -173,7 +173,7 @@ msgstr "尝试使用预设PCIe端口"
msgid "Scan ALL Manually" msgid "Scan ALL Manually"
msgstr "手动扫描所有" msgstr "手动扫描所有"
msgid "Scan PCIE manually." msgid "Scan PCIE Manually"
msgstr "手动扫描PCIe" msgstr "手动扫描PCIe"
msgid "Scan USB Manually" msgid "Scan USB Manually"
@ -208,7 +208,7 @@ msgid "NET LED"
msgstr "网络指示灯" msgstr "网络指示灯"
msgid "Enable 5G Ethernet" msgid "Enable 5G Ethernet"
msgstr "启用5G转口" msgstr "启用5G转口"
msgid "For 5G modules using the Ethernet PHY connection, please specify the network interface name. (e.g., eth0, eth1)" msgid "For 5G modules using the Ethernet PHY connection, please specify the network interface name. (e.g., eth0, eth1)"
msgstr "如果模组使用PHY连接请指定网卡名称如eth1 eth2)" msgstr "如果模组使用PHY连接请指定网卡名称如eth1 eth2)"
@ -257,6 +257,9 @@ msgstr "制式偏好"
msgid "Current Mode" msgid "Current Mode"
msgstr "当前模式" msgstr "当前模式"
msgid "Setting"
msgstr "设置"
msgid "Dial Mode" msgid "Dial Mode"
msgstr "拨号模式" msgstr "拨号模式"
@ -449,3 +452,15 @@ msgstr "警告"
msgid "Connect Status" msgid "Connect Status"
msgstr "连接状态" msgstr "连接状态"
msgid "Cell Information"
msgstr "基站信息"
msgid "Base Information"
msgstr "基本信息"
msgid "Network Information"
msgstr "网络信息"
msgid "SIM Information"
msgstr "SIM卡信息"

View File

@ -11,7 +11,7 @@ msgstr "拨号概览"
msgid "Advance Modem Settings" msgid "Advance Modem Settings"
msgstr "高级模组设置" msgstr "高级模组设置"
msgid "QModem Settings" msgid "QModem Setting"
msgstr "QModem 设置" msgstr "QModem 设置"
# model/cbi/dial_config.lua # model/cbi/dial_config.lua
@ -39,8 +39,8 @@ msgstr "短信AT端口"
msgid "RA Master" msgid "RA Master"
msgstr "作为RA上游" msgstr "作为RA上游"
msgid "After checking, This interface will enable IPV6 RA Master.Only one interface can be set to RA Master." msgid "Caution: Enabling this option will make it the IPV6 RA Master, and only one interface can be configured as such."
msgstr "设置后该接口会作为IPV6 RA上游同一时间只有一个接口可以是RA上游" msgstr "警告启用此选项将使其成为IPV6 RA Master只能配置一个接口为RA Master"
msgid "Extend Prefix" msgid "Extend Prefix"
msgstr "扩展前缀" msgstr "扩展前缀"
@ -158,7 +158,7 @@ msgstr "启用USB模组扫描"
msgid "Once enabled, the USB ports will be scanned on every boot." msgid "Once enabled, the USB ports will be scanned on every boot."
msgstr "如果启用了每次开机会扫描USB接口" msgstr "如果启用了每次开机会扫描USB接口"
msgid "Try Preset USB" msgid "Try Preset USB Port"
msgstr "监控预设的USB端口" msgstr "监控预设的USB端口"
msgid "Attempt to use pre-configured USB settings from the cpe vendor." msgid "Attempt to use pre-configured USB settings from the cpe vendor."
@ -173,7 +173,7 @@ msgstr "尝试使用预设PCIe端口"
msgid "Scan ALL Manually" msgid "Scan ALL Manually"
msgstr "手动扫描所有" msgstr "手动扫描所有"
msgid "Scan PCIE manually." msgid "Scan PCIE Manually"
msgstr "手动扫描PCIe" msgstr "手动扫描PCIe"
msgid "Scan USB Manually" msgid "Scan USB Manually"
@ -208,7 +208,7 @@ msgid "NET LED"
msgstr "网络指示灯" msgstr "网络指示灯"
msgid "Enable 5G Ethernet" msgid "Enable 5G Ethernet"
msgstr "启用5G转口" msgstr "启用5G转口"
msgid "For 5G modules using the Ethernet PHY connection, please specify the network interface name. (e.g., eth0, eth1)" msgid "For 5G modules using the Ethernet PHY connection, please specify the network interface name. (e.g., eth0, eth1)"
msgstr "如果模组使用PHY连接请指定网卡名称如eth1 eth2)" msgstr "如果模组使用PHY连接请指定网卡名称如eth1 eth2)"
@ -257,6 +257,9 @@ msgstr "制式偏好"
msgid "Current Mode" msgid "Current Mode"
msgstr "当前模式" msgstr "当前模式"
msgid "Setting"
msgstr "设置"
msgid "Dial Mode" msgid "Dial Mode"
msgstr "拨号模式" msgstr "拨号模式"
@ -449,3 +452,15 @@ msgstr "警告"
msgid "Connect Status" msgid "Connect Status"
msgstr "连接状态" msgstr "连接状态"
msgid "Cell Information"
msgstr "基站信息"
msgid "Base Information"
msgstr "基本信息"
msgid "Network Information"
msgstr "网络信息"
msgid "SIM Information"
msgstr "SIM卡信息"

View File

@ -1,15 +1,7 @@
config main 'main' config main 'main'
option enable_dial '1' option enable_dial '1'
option modem_number '0' option block_auto_probe '0'
option manual_configuration '0' option enable_pcie_scan "0"
option enable_pcie_scan "1"
option enable_usb_scan "0" option enable_usb_scan "0"
option try_preset_usb "1" option try_preset_usb "1"
option try_preset_pcie "1" option try_preset_pcie "1"
config modem-slot 'm2_0'
option type 'pcie'
option slot '0001:11:00.0'
option net_led 'B:LED3'
option associated_usb '8-1'
option sim_led 'G:LED2'

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2024 Tom <fjrcn@outlook.com> # Copyright (C) 2024 Tom <fjrcn@outlook.com>
manual=$(uci get -q qmodem.global.manual_configuration) manual=$(uci get -q qmodem.main.block_auto_probe)
[ "${manual}" -eq 1 ] && exit [ "${manual}" -eq 1 ] && exit
logger -t modem_hotplug "net slot: ${DEVPATH} action: ${ACTION}" logger -t modem_hotplug "net slot: ${DEVPATH} action: ${ACTION}"
#网络设备名称不存在,退出 #网络设备名称不存在,退出

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2024 Tom <fjrcn@outlook.com> # Copyright (C) 2024 Tom <fjrcn@outlook.com>
manual=$(uci get -q qmodem.global.manual_configuration) manual=$(uci get -q qmodem.main.block_auto_probe)
[ "${manual}" -eq 1 ] && exit [ "${manual}" -eq 1 ] && exit
logger -t modem_hotplug "usb_event slot: ${DEVPATH} action: ${ACTION}" logger -t modem_hotplug "usb_event slot: ${DEVPATH} action: ${ACTION}"
[ -z "${DEVNUM}" ] && exit [ -z "${DEVNUM}" ] && exit

View File

@ -9,19 +9,19 @@ start_service() {
config_load qmodem config_load qmodem
config_foreach _mk_rundir modem-device config_foreach _mk_rundir modem-device
config_get manual_configuration main manual_configuration 0 config_get block_auto_probe main block_auto_probe 0
config_get enable_pcie main enable_pcie_scan 0 config_get enable_pcie_scan main enable_pcie_scan 0
config_get enable_usb main enable_usb_scan 0 config_get enable_usb_scan main enable_usb_scan 0
config_get try_preset_usb main try_vendor_preset_usb 1 config_get try_preset_usb main try_preset_usb 1
config_get try_preset_pcie main try_vendor_preset_pcie 1 config_get try_preset_pcie main try_preset_pcie 1
#once enabled, skip all check or scan #once enabled, skip all check or scan
[ "$manual_configuration" -eq 1 ] && return [ "$block_auto_probe" -eq 1 ] && return
#enabled by default #enabled by default
if [ "$try_vendor_preset_pcie" -eq 1 ];then if [ "$try_preset_pcie" -eq 1 ];then
_try_vendor_preset_pcie _try_vendor_preset_pcie
fi fi
if [ "$try_vendor_preset_usb" -eq 1 ];then if [ "$try_preset_usb" -eq 1 ];then
_try_vendor_preset_usb _try_vendor_preset_usb
fi fi
@ -32,7 +32,6 @@ start_service() {
if [ "$enable_pcie_scan" -eq 1 ];then if [ "$enable_pcie_scan" -eq 1 ];then
_scan_pcie _scan_pcie
fi fi
} }
_try_vendor_preset_usb() _try_vendor_preset_usb()
@ -119,7 +118,16 @@ _try_slot()
_try_device() _try_device()
{ {
config_get path "$1" path config_get path "$1" path
config_get type "$1" type
case "$type" in
usb)
path="/sys/bus/usb/devices/${path}"
;;
pcie)
path="/sys/bus/pci/devices/${path}"
;;
esac
if [ ! -d "$path" ]; then if [ ! -d "$path" ]; then
/usr/share/modem/modem_scan.sh disable "$1" /usr/share/qmodem/modem_scan.sh disable "$1"
fi fi
} }

View File

@ -73,7 +73,16 @@ modem_settings()
uci commit qmodem uci commit qmodem
;; ;;
cyber,cyber3588-aib)
uci batch << EOF
set qmodem.m2_0=modem-slot
set qmodem.m2_0.type='pcie'
set qmodem.m2_0.slot='0001:11:00.0'
set qmodem.m2_0.net_led='blue:status'
set qmodem.m2_0.associated_usb='8-1'
set qmodem.m2_0.sim_led='green:status'
commit qmodem
EOF
esac esac
} }

View File

@ -49,7 +49,8 @@ set_led()
;; ;;
net) net)
[ -z "$net_led" ] && return [ -z "$net_led" ] && return
uci set system.led_${net_led}.dev=$value cfg_name=$(echo $net_led |tr ":" ".")
uci set system.led_n${net_led}.dev=$value
uci commit system uci commit system
/etc/init.d/led restart /etc/init.d/led restart
;; ;;

View File

@ -149,7 +149,7 @@ scan_pcie_slot_interfaces()
;; ;;
esac esac
done done
at_ports="$at_ports $tty_devices" at_ports="$dun_devices $tty_devices"
fi fi
validate_at_port validate_at_port
@ -204,7 +204,7 @@ validate_at_port()
for at_port in $at_ports; do for at_port in $at_ports; do
dev_path="/dev/$at_port" dev_path="/dev/$at_port"
[ ! -e "$dev_path" ] && continue [ ! -e "$dev_path" ] && continue
res=$(at $dev_path "ATI") res=$(fastat $dev_path "ATI")
[ -z "$res" ] && continue [ -z "$res" ] && continue
[ "$res" == *"No"* ] && [ "$res" == *"failed"* ] && continue #for sms_tools No response from modem [ "$res" == *"No"* ] && [ "$res" == *"failed"* ] && continue #for sms_tools No response from modem
valid_at_port="$at_port" valid_at_port="$at_port"
@ -275,6 +275,7 @@ add()
modem_path="/sys/bus/pci/devices/$slot/" modem_path="/sys/bus/pci/devices/$slot/"
;; ;;
esac esac
[ -z "$net_devices" ] && return
for at_port in $valid_at_ports; do for at_port in $valid_at_ports; do
get_modem_model "/dev/$at_port" get_modem_model "/dev/$at_port"
echo "modem_name:$modem_name" echo "modem_name:$modem_name"

View File

@ -10,6 +10,15 @@ at()
sms_tool_q -d $at_port at "$atcmd" sms_tool_q -d $at_port at "$atcmd"
} }
fastat()
{
local at_port=$1
local new_str="${2/[$]/$}"
local atcmd="${new_str/\"/\"}"
#过滤空行
sms_tool_q -t 1 -d $at_port at "$atcmd"
}
log2file() log2file()
{ {
local subject="$1" local subject="$1"