<%+header%> <% local fs = require "nixio.fs" local uci = luci.model.uci.cursor() nosms = 1 if not fs.stat("/etc/nosim") then nosms = 0 end havegps = 0 if fs.stat("/etc/havegps") then havegps = 1 end -- 获取模组的备注 -- @Param network 移动网络 function getModemRemarks(network) local remarks="" uci:foreach("modem", "config", function (config) ---配置启用,且备注存在 if network == config["network"] and config["enable"] == "1" then if config["remarks"] then remarks=" ("..config["remarks"]..")" --" (备注)" return true --跳出循环 end end end) return remarks end -- 获取AT串口 function getATPort() local at_ports={} uci:foreach("modem", "modem-device", function (modem_device) --获取模块的备注 local network=modem_device["network"] local remarks=getModemRemarks(network) local name=modem_device["name"]:upper()..remarks local at_port = modem_device["at_port"] at_ports[at_port]=name end) return at_ports end %>

<%:Modem Info%>

<%:%>
<% at_ports = getATPort() %> <% if next(at_ports) == nil then %>

<%:信息%>

<%:No modems found%>
<% else %>

<%:基本信息%>

<%:模组 :%>
<%:制造商 :%>
<%:固件版本 :%>
<%:数据接口 : %>
<%:拨号模式 : %>
<%:AT串口 : %>
<%:移动网络 : %>
<%:温度 : %>
<%:更新时间 : %>
<% if nosms == 0 then %> <% end %>

<%:SIM卡信息%>

<%:运营商 : %>
<%:IMEI :%>
<%:IMSI : %>
<%:ICCID : %>
<%:SIM卡号码 : %>

<%:网络信息%>

<%:网络类型 :%>
<%:CSQ : %>
<%:信号强度 : %>
<%:信号接收强度 RSSI : %>
<%:参考信号接收质量 RSRQ : %>
<%:参考信号接收功率 RSRP : %>
<%:信噪比 SINR : %>
<%:连接状态监控 : %>

<%:基站信息%>

<%:MCC / MNC :%>
<%:eNB ID : %>
<%:TAC : %>
<%:Cell ID : %>
<%:频段 Band : %>
<%:频点 Channel : %>
<%:物理小区标识 PCI : %>
<%:最大Qos级别 Maximum Qos : %>
<% if havegps == 1 then %>

<%:GPS 定位%>

<%:纬度 :%>
     
    <%:经度 :%>
       
      <% end %> <% end %>
      <%+footer%>