<%+header%> <% local cnt = 1 local tt = {} tt[0] = "********************************************************************************************************" os.execute("cat /sys/kernel/debug/usb/devices > /tmp/modstat 2>&1") local file = io.open("/tmp/modstat", "r") repeat local line = file:read("*line") if line == nil then break end if string.len(line) < 3 then line = "********************************************************************************************************" end tt[cnt] = line cnt = cnt + 1 until 1 == 0 cnt = cnt - 1 file:close() os.execute("/usr/lib/rooter/luci/luaops.sh delete /tmp/modstat") pci = 0 file = io.open("/usr/lib/rooter/mhi/create-pci.sh", "r") if file ~= nil then os.execute("lspci -vD > /tmp/modstat 2>&1") pcnt = 1 ptt = {} ptt[0] = "********************************************************************************************************" file = io.open("/tmp/modstat", "r") repeat local line = file:read("*line") if line == nil then break end if string.len(line) < 3 then line = "********************************************************************************************************" end if not string.find(line, "lspci: Unable") then ptt[pcnt] = line pcnt = pcnt + 1 end until 1 == 0 pcnt = pcnt - 1 file:close() pci = 1 end %>

<%:Modem Debug Information%>

<%:AT-Command Execution%>
<%:Device Information%> <% for i=1,cnt do s, e = string.find(tt[i], "Vendor") s1, e = string.find(tt[i], "Manufacturer") s2, e = string.find(tt[i], "Product") if s ~= nil or s1 ~= nil or s2 ~= nil then %> <% else %> <% end end %>
USB Devices
<%=tt[i]%>
<%=tt[i]%>
<% if pci == 1 then %> <% for i=0,pcnt do s, e = string.find(ptt[i], "Device") if s ~= nil then %> <% else %> <%end %> <%end %>
PCI Devices
<%=ptt[i]%>
<%=ptt[i]%>
<%end %>


<%+footer%>