From 05465f45173d17aa2039582fe0bf6c28fac6fad1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Wabik?= <4rafal@gmail.com>
Date: Sun, 19 May 2024 16:13:57 +0200
Subject: [PATCH] Up to 1.0.72-20240519
---
luci-app-3ginfo-lite/Makefile | 2 +-
.../resources/view/modem/3gdebug.js | 170 +-
.../po/pl/luci-app-3ginfo-lite.po | 247 ++
luci-app-3ginfo-lite/root/etc/config/3ginfo | 4 +
.../root/etc/uci-defaults/set_3ginfo_port.sh | 17 +
.../root/usr/share/3ginfo-lite/3ginfo.sh | 505 +++
.../root/usr/share/3ginfo-lite/check.gcom | 13 +
.../root/usr/share/3ginfo-lite/detect.sh | 104 +
.../root/usr/share/3ginfo-lite/info.gcom | 51 +
.../root/usr/share/3ginfo-lite/mccmnc.dat | 2970 +++++++++++++++++
.../modem/hilink/alcatel_hilink.sh | 63 +
.../3ginfo-lite/modem/hilink/huawei_hilink.sh | 248 ++
.../usr/share/3ginfo-lite/modem/hilink/zte.sh | 62 +
.../usr/share/3ginfo-lite/modem/pci/105be0b0 | 204 ++
.../usr/share/3ginfo-lite/modem/usb/03f00857 | 128 +
.../usr/share/3ginfo-lite/modem/usb/03f00a57 | 128 +
.../usr/share/3ginfo-lite/modem/usb/03f0581d | 113 +
.../usr/share/3ginfo-lite/modem/usb/05c66000 | 29 +
.../usr/share/3ginfo-lite/modem/usb/05c69215 | 117 +
.../usr/share/3ginfo-lite/modem/usb/0e8d7126 | 310 ++
.../usr/share/3ginfo-lite/modem/usb/0e8d7127 | 310 ++
.../usr/share/3ginfo-lite/modem/usb/0f3d68aa | 84 +
.../usr/share/3ginfo-lite/modem/usb/119968a2 | 39 +
.../usr/share/3ginfo-lite/modem/usb/11999041 | 103 +
.../usr/share/3ginfo-lite/modem/usb/11999071 | 104 +
.../usr/share/3ginfo-lite/modem/usb/119990d3 | 147 +
.../usr/share/3ginfo-lite/modem/usb/12d11506 | 122 +
.../usr/share/3ginfo-lite/modem/usb/12d1155e | 122 +
.../usr/share/3ginfo-lite/modem/usb/12d1156c | 113 +
.../usr/share/3ginfo-lite/modem/usb/16907588 | 148 +
.../usr/share/3ginfo-lite/modem/usb/19d20167 | 19 +
.../usr/share/3ginfo-lite/modem/usb/19d20189 | 62 +
.../usr/share/3ginfo-lite/modem/usb/19d21275 | 58 +
.../usr/share/3ginfo-lite/modem/usb/19d21432 | 134 +
.../usr/share/3ginfo-lite/modem/usb/19d21485 | 202 ++
.../usr/share/3ginfo-lite/modem/usb/19d21489 | 139 +
.../usr/share/3ginfo-lite/modem/usb/1bc71040 | 162 +
.../usr/share/3ginfo-lite/modem/usb/1bc71201 | 42 +
.../usr/share/3ginfo-lite/modem/usb/1bc71900 | 128 +
.../usr/share/3ginfo-lite/modem/usb/1bc71901 | 128 +
.../usr/share/3ginfo-lite/modem/usb/1e0e9000 | 100 +
.../usr/share/3ginfo-lite/modem/usb/1e0e9001 | 100 +
.../usr/share/3ginfo-lite/modem/usb/1e0e9003 | 100 +
.../usr/share/3ginfo-lite/modem/usb/1e2d00b3 | 225 ++
.../usr/share/3ginfo-lite/modem/usb/1e2d00b7 | 225 ++
.../usr/share/3ginfo-lite/modem/usb/20202033 | 89 +
.../usr/share/3ginfo-lite/modem/usb/2c7c0122 | 502 +++
.../usr/share/3ginfo-lite/modem/usb/2c7c0125 | 120 +
.../usr/share/3ginfo-lite/modem/usb/2c7c0306 | 149 +
.../usr/share/3ginfo-lite/modem/usb/2c7c0512 | 251 ++
.../usr/share/3ginfo-lite/modem/usb/2c7c0620 | 255 ++
.../usr/share/3ginfo-lite/modem/usb/2c7c0800 | 510 +++
.../usr/share/3ginfo-lite/modem/usb/2c7c0801 | 503 +++
.../usr/share/3ginfo-lite/modem/usb/2c7c0900 | 519 +++
.../usr/share/3ginfo-lite/modem/usb/2c7c6026 | 116 +
.../usr/share/3ginfo-lite/modem/usb/2cb70104 | 205 ++
.../usr/share/3ginfo-lite/modem/usb/2cb70105 | 176 +
.../usr/share/3ginfo-lite/modem/usb/2cd20001 | 88 +
.../usr/share/3ginfo-lite/modem/usb/2cd20004 | 101 +
.../usr/share/3ginfo-lite/modem/usb/413c81b6 | 103 +
.../usr/share/3ginfo-lite/modem/usb/413c81d7 | 221 ++
.../usr/share/3ginfo-lite/modem/usb/808707f9 | 482 +++
.../usr/share/3ginfo-lite/modem/usb/8087095a | 482 +++
.../usr/share/3ginfo-lite/vendorproduct.gcom | 91 +
.../luci/menu.d/luci-app-3ginfo-lite.json | 50 +
.../rpcd/acl.d/luci-app-3ginfo-lite.json | 29 +
66 files changed, 13625 insertions(+), 18 deletions(-)
create mode 100644 luci-app-3ginfo-lite/po/pl/luci-app-3ginfo-lite.po
create mode 100644 luci-app-3ginfo-lite/root/etc/config/3ginfo
create mode 100644 luci-app-3ginfo-lite/root/etc/uci-defaults/set_3ginfo_port.sh
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/check.gcom
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/detect.sh
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/info.gcom
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/mccmnc.dat
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/alcatel_hilink.sh
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/huawei_hilink.sh
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/zte.sh
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/pci/105be0b0
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f00857
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f00a57
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f0581d
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/05c66000
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/05c69215
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0e8d7126
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0e8d7127
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0f3d68aa
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/119968a2
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/11999041
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/11999071
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/119990d3
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d11506
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d1155e
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d1156c
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/16907588
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d20167
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d20189
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21275
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21432
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21485
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21489
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71040
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71201
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71900
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71901
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9000
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9001
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9003
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e2d00b3
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e2d00b7
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/20202033
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0122
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0125
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0306
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0512
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0620
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0800
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0801
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0900
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c6026
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cb70104
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cb70105
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cd20001
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cd20004
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/413c81b6
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/413c81d7
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/808707f9
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/8087095a
create mode 100644 luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/vendorproduct.gcom
create mode 100644 luci-app-3ginfo-lite/root/usr/share/luci/menu.d/luci-app-3ginfo-lite.json
create mode 100644 luci-app-3ginfo-lite/root/usr/share/rpcd/acl.d/luci-app-3ginfo-lite.json
diff --git a/luci-app-3ginfo-lite/Makefile b/luci-app-3ginfo-lite/Makefile
index c130a442..f30900db 100644
--- a/luci-app-3ginfo-lite/Makefile
+++ b/luci-app-3ginfo-lite/Makefile
@@ -12,7 +12,7 @@ MAINTAINER:=Rafał Wabik <4Rafal@gmail.com>
LUCI_DESCRIPTION:=LuCI JS interface for the 3ginfo-lite. The package allows you to view the parameters of the mobile internet connection.
LUCI_DEPENDS:=+sms-tool +comgt +kmod-usb-serial-option
LUCI_PKGARCH:=all
-PKG_VERSION:=1.0.71-20240512
+PKG_VERSION:=1.0.72-20240519
include $(TOPDIR)/feeds/luci/luci.mk
diff --git a/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdebug.js b/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdebug.js
index b80a02ab..8e3684ec 100644
--- a/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdebug.js
+++ b/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdebug.js
@@ -1,7 +1,9 @@
'use strict';
'require view';
+'require dom';
'require fs';
'require ui';
+'require uci';
/*
Copyright 2021-2024 Rafał Wabik - IceG - From eko.one.pl forum
@@ -10,34 +12,168 @@
*/
return view.extend({
- load: function() {
- return fs.read_direct('/sys/kernel/debug/usb/devices', [ '-r' ]).catch(function(err) {
- ui.addNotification(null, E('p', {}, _('Unable to load data: ' + err.message)));
- return '';
+ handleCommand: function(exec, args) {
+ var buttons = document.querySelectorAll('.diag-action > .cbi-button');
+
+ for (var i = 0; i < buttons.length; i++)
+ buttons[i].setAttribute('disabled', 'true');
+
+ return fs.exec(exec, args).then(function(res) {
+ var out = document.querySelector('textarea');
+ out.style.display = '';
+
+ dom.content(out, [ res.stdout || '', res.stderr || '' ]);
+ fs.write('/tmp/debug_result.txt', [ res.stdout || '' ]);
+ }).catch(function(err) {
+ ui.addNotification(null, E('p', [ err ]))
+ }).finally(function() {
+ var viewbc = document.getElementById('clear');
+ viewbc.style.display = '';
+ var viewbd = document.getElementById('download');
+ viewbd.style.display = '';
+
+ for (var i = 0; i < buttons.length; i++)
+ buttons[i].removeAttribute('disabled');
});
},
- render: function(data) {
- var dlines = data.trim().split(/\n/).map(function(line) {
- return line.replace(/^<\d+>/, '');
+ handleUSB: function(ev, cmd) {
+ return this.handleCommand('/bin/cat', ['/sys/kernel/debug/usb/devices']);
+ },
+
+ handleTTY: function(ev, cmd) {
+ return this.handleCommand('/bin/ls', ['/dev']);
+ },
+
+ handleDBG: function(ev, cmd) {
+ return this.handleCommand('/bin/sh', ['-x', '/usr/share/3ginfo-lite/3ginfo.sh']);
+ },
+
+ handleClear: function(ev) {
+ var out = document.getElementById('pre');
+ out.style.display = 'none';
+ var viewbc = document.getElementById('clear');
+ viewbc.style.display = 'none';
+ var viewbd = document.getElementById('download');
+ viewbd.style.display = 'none';
+ fs.write('/tmp/debug_result.txt', '');
+ },
+
+ handleDownload: function(ev) {
+ return L.resolveDefault(fs.read_direct('/tmp/debug_result.txt'), null).then(function (res) {
+ if (res) {
+ var link = E('a', {
+ 'download': 'debug_result.txt',
+ 'href': URL.createObjectURL(
+ new Blob([ res ], { type: 'text/plain' })),
+ });
+ link.click();
+ URL.revokeObjectURL(link.href);
+ }
+ }).catch(() => {
+ ui.addNotification(null, E('p', {}, _('Download error') + ': ' + err.message));
});
+ },
+
+ load: function() {
+ return L.resolveDefault(uci.load('luci'));
+ },
+
+ render: function(res) {
+
+ var table = E('table', { 'class': 'table' }, [
+ E('tr', { 'class': 'tr' }, [
+ E('td', { 'class': 'td left', 'style': 'overflow:initial' }, [
+ E('label', { 'class': 'cbi-value-title' },
+ _("USB debug information")
+ ),
+ E('p'),
+ E('label', { 'class': 'cbi-value-title' },
+ _("cat /sys/kernel/debug/usb/devices
.")
+ ),
+ E('p'),
+ E('span', { 'class': 'diag-action' }, [
+ E('button', {
+ 'class': 'cbi-button cbi-button-action',
+ 'click': ui.createHandlerFn(this, 'handleUSB')
+ }, [ _('Show devices') ])
+ ])
+ ]),
+
+ E('td', { 'class': 'td left', 'style': 'overflow:initial' }, [
+ E('label', { 'class': 'cbi-value-title' },
+ _("Check availability of ttyX ports.")
+ ),
+ E('p'),
+ E('label', { 'class': 'cbi-value-title' },
+ _("ls /dev
.")
+ ),
+ E('p'),
+ E('span', { 'class': 'diag-action' }, [
+ E('button', {
+ 'class': 'cbi-button cbi-button-action',
+ 'click': ui.createHandlerFn(this, 'handleTTY')
+ }, [ _('Show devices') ])
+ ])
+ ]),
+
+ E('td', { 'class': 'td left' }, [
+ E('label', { 'class': 'cbi-value-title' },
+ _("Check data read by the 3ginfo scripts.")
+ ),
+ E('p'),
+ E('label', { 'class': 'cbi-value-title' },
+ _("sh -x /usr/share/3ginfo-lite/3ginfo.sh
.")
+ ),
+ E('p'),
+ E('span', { 'class': 'diag-action' }, [
+ E('button', {
+ 'class': 'cbi-button cbi-button-action',
+ 'click': ui.createHandlerFn(this, 'handleDBG')
+ }, [ _('Debug') ])
+ ])
+ ]),
+ ])
+ ]);
+
+
var info = _('More information about the 3ginfo on the %seko.one.pl forum%s.').format('', '');
- return E([], [
- E('h2', {}, [ _('3ginfo-lite') ]),
- E('div', { class: 'cbi-section-descr' }, info),
- E('div', { 'id': 'content_syslog' }, [
+ var view = E('div', { 'class': 'cbi-map'}, [
+ E('h2', {}, [ _('Diagnostics') ]),
+ E('div', { 'class': 'cbi-map-descr'}, _('Execution of various commands to check the availability of the modem and eliminate errors in the data collected by the scripts.') + '
' + info),
+ table,
+ E('hr'),
+ E('div', {'class': 'cbi-section'}, [
+ E('p'),
E('textarea', {
- 'id': 'syslog',
- 'style':'border: 1px solid var(--border-color-medium); border-radius: 5px; font-family: monospace; font-size:12px; white-space:pre; width: 100%; resize: none;',
+ 'id': 'pre',
+ 'style':'display:none; border: 1px solid var(--border-color-medium); border-radius: 5px; font-family: monospace; font-size:12px; white-space:pre; width: 100%; resize: none;',
'readonly': true,
'wrap': 'off',
- 'rows': dlines.length + 1
- }, [ dlines.join('\n') ])
- ]),
-
+ 'rows': '25'
+ }, []),
+ E('p'),
+ E('div', { 'class': 'right' }, [
+ E('button', {
+ 'class': 'cbi-button cbi-button-remove',
+ 'id': 'clear',
+ 'style': 'display:none',
+ 'click': ui.createHandlerFn(this, 'handleClear')
+ }, [ _('Clear') ]),
+ '\xa0\xa0\xa0',
+ E('button', {
+ 'class': 'cbi-button cbi-button-apply important',
+ 'id': 'download',
+ 'style': 'display:none',
+ 'click': ui.createHandlerFn(this, 'handleDownload')
+ }, [ _('Download') ]),
+ ]),
+ ])
]);
+
+ return view;
},
handleSaveApply: null,
diff --git a/luci-app-3ginfo-lite/po/pl/luci-app-3ginfo-lite.po b/luci-app-3ginfo-lite/po/pl/luci-app-3ginfo-lite.po
new file mode 100644
index 00000000..b98d012f
--- /dev/null
+++ b/luci-app-3ginfo-lite/po/pl/luci-app-3ginfo-lite.po
@@ -0,0 +1,247 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8"
+
+msgid "Information about 3G/4G/5G connection"
+msgstr "Informacja o statusie połączenia 3G/4G/5G"
+
+msgid "More information about the 3ginfo on the %seko.one.pl forum%s."
+msgstr "Więcej informacji o 3ginfo na %sforum eko.one.pl%s."
+
+msgid "eko.one.pl forum"
+msgstr "forum eko.one.pl"
+
+msgid "Details"
+msgstr "Szczegóły"
+
+msgid "Configuration"
+msgstr "Konfiguracja"
+
+msgid "General Information"
+msgstr "Informacje ogólne"
+
+msgid "Modem Information"
+msgstr "Informacje o modemie"
+
+msgid "Cell / Signal Information"
+msgstr "Informacje o sieci / sygnale"
+
+msgid "Technology"
+msgstr "Technologia"
+
+msgid "Operator"
+msgstr "Operator"
+
+msgid "Signal strength"
+msgstr "Siła sygnału"
+
+msgid "Connection statistics"
+msgstr "Statystyki połączenia"
+
+msgid "Modem type"
+msgstr "Typ modemu"
+
+msgid "Additional information"
+msgstr "Informacje dodatkowe"
+
+msgid "Revision / Firmware"
+msgstr "Rewizja / Wersja firmware"
+
+msgid "IP adress / Communication Port"
+msgstr "Adres IP / Port do komunikacji"
+
+msgid "Chip Temperature"
+msgstr "Temperatura układu"
+
+msgid "Configuration 3ginfo-lite"
+msgstr "Konfiguracja 3ginfo-lite"
+
+msgid "Configuration panel for the 3ginfo-lite application."
+msgstr "Panel konfiguracyjny dla aplikacji 3ginfo-lite."
+
+msgid "Network"
+msgstr "Sieć"
+
+msgid "IP adress / Port for communication with the modem"
+msgstr "Adres IP / Port do komunikacji z modemem"
+
+msgid "Protocol"
+msgstr "Protokół"
+
+msgid ""
+"Select the appropriate settings.
Traditional "
+"modem.
Select one of the available ttyUSBX "
+"ports.
HiLink modem.
Enter the IP address "
+"192.168.X.X under which the modem is available."
+msgstr ""
+"Wybierz odpowiednie ustawienia.
Tradycyjny "
+"modem.
Wybierz jeden z dostępnych portów "
+"ttyUSBX.
Modem typu HiLink.
Wprowadź adres IP "
+"192.168.X.X pod którym dostępny jest modem."
+
+msgid "Very good"
+msgstr "Bardzo dobry"
+
+msgid "Good"
+msgstr "Dobry"
+
+msgid "Weak"
+msgstr "Słaby"
+
+msgid "Very weak"
+msgstr "Bardzo słaby"
+
+msgid "Excellent"
+msgstr "Doskonały"
+
+msgid "Good"
+msgstr "Dobry"
+
+msgid "Mid cell"
+msgstr "Średni zasięg"
+
+msgid "Cell edge"
+msgstr "Na krawędzi zasięgu"
+
+msgid "SIM status"
+msgstr "Status karty SIM"
+
+msgid "Not registered"
+msgstr "Nie zalogowana do sieci"
+
+msgid "Registered"
+msgstr "Zalogowana do sieci"
+
+msgid "Registered (roaming)"
+msgstr "Zalogowana do sieci (roaming)"
+
+msgid "Registered, only SMS"
+msgstr "Zalogowana do sieci, tylko SMS"
+
+msgid "Registered (roaming), only SMS"
+msgstr "Zalogowana do sieci (roaming), tylko SMS"
+
+msgid "Searching.."
+msgstr "Wyszukiwanie.."
+
+msgid "Registering denied"
+msgstr "Odmowa zalogowana do sieci"
+
+msgid "Waiting to read data from the modem..."
+msgstr "Oczekiwanie na odczyt danych z modemu..."
+
+msgid "Waiting for connection data..."
+msgstr "Oczekiwanie na dane połączenia..."
+
+msgid "BTS Search"
+msgstr "Lokalizacja stacji bazowej"
+
+msgid "Search"
+msgstr "Szukaj"
+
+msgid "Search BTS using Cell ID"
+msgstr "Wyszukaj BTS po Cell ID"
+
+msgid "Hint: To set up a BTS search engine, all you have to do is select the dedicated website for your location."
+msgstr "Wskazówka: Aby skonfigurować wyszukiwarkę BTS, wystarczy wybrać stronę odpowiednią dla swojej lokalizacji."
+
+msgid "BTS search settings"
+msgstr "Ustawienia wyszukiwania stacji bazowej"
+
+msgid "Website to search for BTS"
+msgstr "Strona do wyszukiwania BTS"
+
+msgid "Select a website for searching."
+msgstr "Wybierz stronę internetową służącą do wyszukiwania."
+
+msgid "SIM Slot"
+msgstr "Slot SIM"
+
+msgid "Problem with registering to the network, check the SIM card."
+msgstr "Problem z rejestracją do sieci, sprawdź kartę SIM."
+
+msgid "SIM PIN required"
+msgstr "Wymagany jest kod PIN dla karty SIM"
+
+msgid "SIM PUK required"
+msgstr "Wymagany jest kod PUK dla karty SIM"
+
+msgid "SIM failure"
+msgstr "Awaria karty SIM"
+
+msgid "SIM busy"
+msgstr "Karta SIM jest zajęta"
+
+msgid "SIM wrong"
+msgstr "Nieprawidłowa karta SIM"
+
+msgid "SIM PIN2 required"
+msgstr "Wymagany jest kod PIN2 dla karty SIM"
+
+msgid "SIM PUK2 required"
+msgstr "Wymagany jest kod PUK2 dla karty SIM"
+
+msgid ""
+"There is a problem reading data from the modem.
Please "
+"check:
- 1. Modem availability in the system.
- 2. The correct "
+"installation of the SIM card in the modem.
- 3. Port for communication with the modem.
"
+msgstr ""
+"Wystąpił problem z odczytem danych z modemu.
Proszę "
+"sprawdzić: - 1. Dostępność modemu w systemie.
- 2. Poprawność "
+"montażu karty SIM w modemie.
- 3. Port do komunikacji z modemem.
"
+
+msgid ""
+"There is a problem reading connection data.
Please "
+"check: - 1. Connection of the modem to the internet, the correctness of the entered APN. Some modems need to force the APN on the modem using at commands "
+"to connect to internet.
- 2. Check that the correct interface assigned to the modem is selected. The default name of the interface in the package is wan.
"
+msgstr ""
+"Wystąpił problem z odczytem danych połączenia.
Proszę "
+"sprawdzić: - 1. Połączenie modemu z internetem, poprawność wprowadzonego APN. Niektóre modemy wymagają wymuszenia APN w modemie za pomocą komend at, aby "
+"połączyć się z internetem.
- 2. Sprawdź, czy wybrany został właściwy interfejs przypisany do modemu. Domyślną nazwą interfejsu w pakiecie jest wan.
"
+
+msgid "Defined modems"
+msgstr "Zdefiniowane modemy"
+
+msgid "Interface for selecting user defined modems."
+msgstr "Interfejs wyboru modemów zdefiniowanych przez użytkownika."
+
+msgid "Modem selection menu"
+msgstr "Menu wyboru modemu"
+
+msgid "SIM card menu"
+msgstr "Menu karty SIM"
+
+msgid "Information read from the SIM card and device."
+msgstr "Informacje odczytane z karty SIM oraz z urządzenia."
+
+msgid "Hint"
+msgstr "Podpowiedź"
+
+msgid "CLICK ME TO SEE NEW MENU"
+msgstr "KLIKNIJ MNIE, ABY ZOBACZYĆ NOWE MENU"
+
+msgid "Diagnostics"
+msgstr "Diagnostyka"
+
+msgid "Execution of various commands to check the availability of the modem and eliminate errors in the data collected by the scripts."
+msgstr "Wykonywanie różnych poleceń sprawdzających dostępność modemu i eliminujących błędy w danych zbieranych przez skrypty."
+
+msgid "USB debug information"
+msgstr "Debugowanie portu USB"
+
+msgid "Show devices"
+msgstr "Pokaż urządzenia"
+
+msgid "Check availability of ttyX ports."
+msgstr "Sprawdź dostępność portów ttyX."
+
+msgid "Check data read by the 3ginfo scripts."
+msgstr "Sprawdź dane odczytywane przez skrypty 3ginfo."
+
+msgid "Debug"
+msgstr "Debugowanie"
+
+msgid "Clear"
+msgstr "Wyczyść"
+
+msgid "Download"
+msgstr "Pobierz"
diff --git a/luci-app-3ginfo-lite/root/etc/config/3ginfo b/luci-app-3ginfo-lite/root/etc/config/3ginfo
new file mode 100644
index 00000000..f47d3851
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/etc/config/3ginfo
@@ -0,0 +1,4 @@
+
+config 3ginfo
+ option device ''
+ option website 'http://www.btsearch.pl/szukaj.php?mode=std&search='
diff --git a/luci-app-3ginfo-lite/root/etc/uci-defaults/set_3ginfo_port.sh b/luci-app-3ginfo-lite/root/etc/uci-defaults/set_3ginfo_port.sh
new file mode 100644
index 00000000..d3fd50d8
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/etc/uci-defaults/set_3ginfo_port.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Copyright 2020-2024 Rafał Wabik (IceG) - From eko.one.pl forum
+# MIT License
+
+chmod +x /usr/share/3ginfo-lite/3ginfo.sh 2>&1 &
+chmod +x /usr/share/3ginfo-lite/detect.sh 2>&1 &
+chmod +x /usr/share/3ginfo-lite/check.gcom 2>&1 &
+chmod +x /usr/share/3ginfo-lite/info.gcom 2>&1 &
+chmod +x /usr/share/3ginfo-lite/vendorproduct.gcom 2>&1 &
+chmod +x /usr/share/3ginfo-lite/modem/hilink/alcatel_hilink.sh 2>&1 &
+chmod +x /usr/share/3ginfo-lite/modem/hilink/huawei_hilink.sh 2>&1 &
+chmod +x /usr/share/3ginfo-lite/modem/hilink/zte.sh 2>&1 &
+rm -rf /tmp/luci-indexcache 2>&1 &
+rm -rf /tmp/luci-modulecache/ 2>&1 &
+
+exit 0
+
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh
new file mode 100644
index 00000000..5f293ba9
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh
@@ -0,0 +1,505 @@
+#!/bin/sh
+
+#
+# (c) 2010-2024 Cezary Jackiewicz
+#
+# (c) 2021-2024 modified by Rafał Wabik - IceG - From eko.one.pl forum
+#
+
+
+band4g() {
+# see https://en.wikipedia.org/wiki/LTE_frequency_bands
+ echo -n "B${1}"
+ case "${1}" in
+ "1") echo " (2100 MHz)";;
+ "2") echo " (1900 MHz)";;
+ "3") echo " (1800 MHz)";;
+ "4") echo " (1700 MHz)";;
+ "5") echo " (850 MHz)";;
+ "7") echo " (2600 MHz)";;
+ "8") echo " (900 MHz)";;
+ "11") echo " (1500 MHz)";;
+ "12") echo " (700 MHz)";;
+ "13") echo " (700 MHz)";;
+ "14") echo " (700 MHz)";;
+ "17") echo " (700 MHz)";;
+ "18") echo " (850 MHz)";;
+ "19") echo " (850 MHz)";;
+ "20") echo " (800 MHz)";;
+ "21") echo " (1500 MHz)";;
+ "24") echo " (1600 MHz)";;
+ "25") echo " (1900 MHz)";;
+ "26") echo " (850 MHz)";;
+ "28") echo " (700 MHz)";;
+ "29") echo " (700 MHz)";;
+ "30") echo " (2300 MHz)";;
+ "31") echo " (450 MHz)";;
+ "32") echo " (1500 MHz)";;
+ "34") echo " (2000 MHz)";;
+ "37") echo " (1900 MHz)";;
+ "38") echo " (2600 MHz)";;
+ "39") echo " (1900 MHz)";;
+ "40") echo " (2300 MHz)";;
+ "41") echo " (2500 MHz)";;
+ "42") echo " (3500 MHz)";;
+ "43") echo " (3700 MHz)";;
+ "46") echo " (5200 MHz)";;
+ "47") echo " (5900 MHz)";;
+ "48") echo " (3500 MHz)";;
+ "50") echo " (1500 MHz)";;
+ "51") echo " (1500 MHz)";;
+ "53") echo " (2400 MHz)";;
+ "54") echo " (1600 MHz)";;
+ "65") echo " (2100 MHz)";;
+ "66") echo " (1700 MHz)";;
+ "67") echo " (700 MHz)";;
+ "69") echo " (2600 MHz)";;
+ "70") echo " (1700 MHz)";;
+ "71") echo " (600 MHz)";;
+ "72") echo " (450 MHz)";;
+ "73") echo " (450 MHz)";;
+ "74") echo " (1500 MHz)";;
+ "75") echo " (1500 MHz)";;
+ "76") echo " (1500 MHz)";;
+ "85") echo " (700 MHz)";;
+ "87") echo " (410 MHz)";;
+ "88") echo " (410 MHz)";;
+ "103") echo " (700 MHz)";;
+ "106") echo " (900 MHz)";;
+ "*") echo "";;
+ esac
+}
+
+band5g() {
+# see https://en.wikipedia.org/wiki/5G_NR_frequency_bands
+ echo -n "n${1}"
+ case "${1}" in
+ "1") echo " (2100 MHz)";;
+ "2") echo " (1900 MHz)";;
+ "3") echo " (1800 MHz)";;
+ "5") echo " (850 MHz)";;
+ "7") echo " (2600 MHz)";;
+ "8") echo " (900 MHz)";;
+ "12") echo " (700 MHz)";;
+ "13") echo " (700 MHz)";;
+ "14") echo " (700 MHz)";;
+ "18") echo " (850 MHz)";;
+ "20") echo " (800 MHz)";;
+ "24") echo " (1600 MHz)";;
+ "25") echo " (1900 MHz)";;
+ "26") echo " (850 MHz)";;
+ "28") echo " (700 MHz)";;
+ "29") echo " (700 MHz)";;
+ "30") echo " (2300 MHz)";;
+ "34") echo " (2100 MHz)";;
+ "38") echo " (2600 MHz)";;
+ "39") echo " (1900 MHz)";;
+ "40") echo " (2300 MHz)";;
+ "41") echo " (2500 MHz)";;
+ "46") echo " (5200 MHz)";;
+ "47") echo " (5900 MHz)";;
+ "48") echo " (3500 MHz)";;
+ "50") echo " (1500 MHz)";;
+ "51") echo " (1500 MHz)";;
+ "53") echo " (2400 MHz)";;
+ "54") echo " (1600 MHz)";;
+ "65") echo " (2100 MHz)";;
+ "66") echo " (1700/2100 MHz)";;
+ "67") echo " (700 MHz)";;
+ "70") echo " (2000 MHz)";;
+ "71") echo " (600 MHz)";;
+ "74") echo " (1500 MHz)";;
+ "75") echo " (1500 MHz)";;
+ "76") echo " (1500 MHz)";;
+ "77") echo " (3700 MHz)";;
+ "78") echo " (3500 MHz)";;
+ "79") echo " (4700 MHz)";;
+ "80") echo " (1800 MHz)";;
+ "81") echo " (900 MHz)";;
+ "82") echo " (800 MHz)";;
+ "83") echo " (700 MHz)";;
+ "84") echo " (2100 MHz)";;
+ "85") echo " (700 MHz)";;
+ "86") echo " (1700 MHz)";;
+ "89") echo " (850 MHz)";;
+ "90") echo " (2500 MHz)";;
+ "91") echo " (800/1500 MHz)";;
+ "92") echo " (800/1500 MHz)";;
+ "93") echo " (900/1500 MHz)";;
+ "94") echo " (900/1500 MHz)";;
+ "95") echo " (2100 MHz)";;
+ "96") echo " (6000 MHz)";;
+ "97") echo " (2300 MHz)";;
+ "98") echo " (1900 MHz)";;
+ "99") echo " (1600 MHz)";;
+ "100") echo " (900 MHz)";;
+ "101") echo " (1900 MHz)";;
+ "102") echo " (6200 MHz)";;
+ "104") echo " (6700 MHz)";;
+ "105") echo " (600 MHz)";;
+ "106") echo " (900 MHz)";;
+ "109") echo " (700/1500 MHz)";;
+ "257") echo " (28 GHz)";;
+ "258") echo " (26 GHz)";;
+ "259") echo " (41 GHz)";;
+ "260") echo " (39 GHz)";;
+ "261") echo " (28 GHz)";;
+ "262") echo " (47 GHz)";;
+ "263") echo " (60 GHz)";;
+ "*") echo "";;
+ esac
+}
+
+getdevicevendorproduct() {
+ devname="$(basename $1)"
+ case "$devname" in
+ 'wwan'*'at'*)
+ devpath="$(readlink -f /sys/class/wwan/$devname/device)"
+ T=${devpath%/*/*/*}
+ if [ -e $T/vendor ] && [ -e $T/device ]; then
+ V=$(cat $T/vendor)
+ D=$(cat $T/device)
+ echo "pci/${V/0x/}${D/0x/}"
+ fi
+ ;;
+ 'ttyACM'*)
+ devpath="$(readlink -f /sys/class/tty/$devname/device)"
+ T=${devpath%/*}
+ echo "usb/$(cat $T/idVendor)$(cat $T/idProduct)"
+ ;;
+ 'tty'*)
+ devpath="$(readlink -f /sys/class/tty/$devname/device)"
+ T=${devpath%/*/*}
+ echo "usb/$(cat $T/idVendor)$(cat $T/idProduct)"
+ ;;
+ *)
+ devpath="$(readlink -f /sys/class/usbmisc/$devname/device)"
+ T=${devpath%/*}
+ echo "usb/$(cat $T/idVendor)$(cat $T/idProduct)"
+ ;;
+ esac
+}
+
+RES="/usr/share/3ginfo-lite"
+
+DEVICE=$($RES/detect.sh)
+if [ -z "$DEVICE" ]; then
+ echo '{"error":"Device not found"}'
+ exit 0
+fi
+
+O=""
+if [ -e /usr/bin/sms_tool ]; then
+ O=$(sms_tool -D -d $DEVICE at "AT+CPIN?;+CSQ;+COPS=3,0;+COPS?;+COPS=3,2;+COPS?;+CREG=2;+CREG?")
+else
+ O=$(gcom -d $DEVICE -s $RES/info.gcom 2>/dev/null)
+fi
+
+getpath() {
+ devname="$(basename $1)"
+ case "$devname" in
+ 'wwan'*'at'*)
+ devpath="$(readlink -f /sys/class/wwan/$devname/device)"
+ P=${devpath%/*/*/*}
+ ;;
+ 'ttyACM'*)
+ devpath="$(readlink -f /sys/class/tty/$devname/device)"
+ P=${devpath%/*}
+ ;;
+ 'tty'*)
+ devpath="$(readlink -f /sys/class/tty/$devname/device)"
+ P=${devpath%/*/*}
+ ;;
+ *)
+ devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)"
+ P=${devpath%/*}
+ ;;
+ esac
+}
+
+# --- modemdefine - WAN config ---
+CONFIG=modemdefine
+MODEMZ=$(uci show $CONFIG | grep -o "@modemdefine\[[0-9]*\]\.modem" | wc -l | xargs)
+if [[ $MODEMZ > 1 ]]; then
+ SEC=$(uci -q get modemdefine.@general[0].main_network)
+ fi
+ if [[ $MODEMZ = "0" ]]; then
+ SEC=$(uci -q get 3ginfo.@3ginfo[0].network)
+ fi
+ if [[ $MODEMZ = 1 ]]; then
+ SEC=$(uci -q get modemdefine.@modemdefine[0].network)
+fi
+
+ if [ -z "$SEC" ]; then
+ getpath $DEVICE
+ PORIG=$P
+ for DEV in /sys/class/tty/* /sys/class/usbmisc/*; do
+ getpath "/dev/"${DEV##/*/}
+ if [ "x$PORIG" = "x$P" ]; then
+ SEC=$(uci show network | grep "/dev/"${DEV##/*/} | cut -f2 -d.)
+ [ -n "$SEC" ] && break
+ fi
+ done
+ fi
+# --- modemdefine config ---
+
+CONN_TIME="-"
+RX="-"
+TX="-"
+
+NETUP=$(ifstatus $SEC | grep "\"up\": true")
+if [ -n "$NETUP" ]; then
+
+ CT=$(uci -q -P /var/state/ get network.$SEC.connect_time)
+ if [ -z $CT ]; then
+ CT=$(ifstatus $SEC | awk -F[:,] '/uptime/ {print $2}' | xargs)
+ else
+ UPTIME=$(cut -d. -f1 /proc/uptime)
+ CT=$((UPTIME-CT))
+ fi
+ if [ ! -z $CT ]; then
+
+ D=$(expr $CT / 60 / 60 / 24)
+ H=$(expr $CT / 60 / 60 % 24)
+ M=$(expr $CT / 60 % 60)
+ S=$(expr $CT % 60)
+ CONN_TIME=$(printf "%dd, %02d:%02d:%02d" $D $H $M $S)
+ CONN_TIME_SINCE=$(date "+%Y%m%d%H%M%S" -d "@$(($(date +%s) - CT))")
+
+ fi
+
+ IFACE=$(ifstatus $SEC | awk -F\" '/l3_device/ {print $4}')
+ if [ -n "$IFACE" ]; then
+ RX=$(ifconfig $IFACE | awk -F[\(\)] '/bytes/ {printf "%s",$2}')
+ TX=$(ifconfig $IFACE | awk -F[\(\)] '/bytes/ {printf "%s",$4}')
+ fi
+fi
+
+# CSQ
+CSQ=$(echo "$O" | awk -F[,\ ] '/^\+CSQ/ {print $2}')
+
+[ "x$CSQ" = "x" ] && CSQ=-1
+if [ $CSQ -ge 0 -a $CSQ -le 31 ]; then
+ CSQ_PER=$(($CSQ * 100/31))
+else
+ CSQ=""
+ CSQ_PER=""
+fi
+
+# COPS numeric
+# see https://mcc-mnc.com/
+# Update: 28/04/2024 items: 2970
+COPS=""
+COPS_MCC=""
+COPS_MNC=""
+COPS_NUM=$(echo "$O" | awk -F[\"] '/^\+COPS:\s*.,2/ {print $2}')
+if [ -n "$COPS_NUM" ]; then
+ COPS_MCC=${COPS_NUM:0:3}
+ COPS_MNC=${COPS_NUM:3:3}
+fi
+
+TCOPS=$(echo "$O" | awk -F[\"] '/^\+COPS:\s*.,0/ {print $2}')
+[ "x$TCOPS" != "x" ] && COPS="$TCOPS"
+
+if [ -z "$COPS" ]; then
+ if [ -n "$COPS_NUM" ]; then
+ COPS=$(awk -F[\;] '/^'$COPS_NUM';/ {print $3}' $RES/mccmnc.dat | xargs)
+ LOC=$(awk -F[\;] '/^'$COPS_NUM';/ {print $2}' $RES/mccmnc.dat)
+ fi
+fi
+[ -z "$COPS" ] && COPS=$COPS_NUM
+
+if [[ $COPS =~ " " ]]; then
+ COPS=$(echo "$COPS" | awk '{if(NF==2 && tolower($1)==tolower($2)){print $1}else{print $0}}')
+fi
+
+isp=$(sms_tool -d $DEVICE at "AT+COPS?"|sed -n '2p'|cut -d '"' -f2|tr -d '\r')
+isp_num="$COPS_MCC $COPS_MNC"
+isp_numws="$COPS_MCC$COPS_MNC"
+
+if [[ $COPS =~ ^[0-9]+$ ]]; then
+ if [[ "$COPS" = "$isp_num" || "$COPS" = "$isp_numws" ]]; then
+ if [[ -n "$isp" ]]; then
+ COPS=$(awk -F[\;] '/^'$isp';/ {print $3}' $RES/mccmnc.dat | xargs)
+ LOC=$(awk -F[\;] '/^'$isp';/ {print $2}' $RES/mccmnc.dat)
+ fi
+ fi
+fi
+
+
+# operator location from temporary config
+LOCATIONFILE=/tmp/location
+if [ -e "$LOCATIONFILE" ]; then
+ touch $LOCATIONFILE
+ LOC=$(cat $LOCATIONFILE)
+ if [ -n "$LOC" ]; then
+ LOC=$(cat $LOCATIONFILE)
+ if [[ $LOC == "-" ]]; then
+ rm $LOCATIONFILE
+ LOC=$(awk -F[\;] '/^'$COPS_NUM';/ {print $2}' $RES/mccmnc.dat)
+ if [ -n "$LOC" ]; then
+ echo "$LOC" > /tmp/location
+ fi
+ else
+ LOC=$(awk -F[\;] '/^'$COPS_NUM';/ {print $2}' $RES/mccmnc.dat)
+ if [ -n "$LOC" ]; then
+ echo "$LOC" > /tmp/location
+ fi
+ fi
+ fi
+else
+ if [[ "$COPS_MCC$COPS_MNC" =~ ^[0-9]+$ ]]; then
+ if [ -n "$LOC" ]; then
+ LOC=$(awk -F[\;] '/^'$COPS_MCC$COPS_MNC';/ {print $2}' $RES/mccmnc.dat)
+ echo "$LOC" > /tmp/location
+ else
+ echo "-" > /tmp/location
+ fi
+ fi
+fi
+
+T=$(echo "$O" | awk -F[,\ ] '/^\+CPIN:/ {print $0;exit}' | xargs)
+if [ -n "$T" ]; then
+ [ "$T" = "+CPIN: READY" ] || REG=$(echo "$T" | cut -f2 -d: | xargs)
+fi
+
+T=$(echo "$O" | awk -F[,\ ] '/^\+CME ERROR:/ {print $0;exit}')
+if [ -n "$T" ]; then
+ case "$T" in
+ "+CME ERROR: 10"*) REG="SIM not inserted";;
+ "+CME ERROR: 11"*) REG="SIM PIN required";;
+ "+CME ERROR: 12"*) REG="SIM PUK required";;
+ "+CME ERROR: 13"*) REG="SIM failure";;
+ "+CME ERROR: 14"*) REG="SIM busy";;
+ "+CME ERROR: 15"*) REG="SIM wrong";;
+ "+CME ERROR: 17"*) REG="SIM PIN2 required";;
+ "+CME ERROR: 18"*) REG="SIM PUK2 required";;
+ *) REG=$(echo "$T" | cut -f2 -d: | xargs);;
+ esac
+fi
+
+# CREG
+eval $(echo "$O" | awk -F[,] '/^\+CREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";LAC_HEX=\"%X\";CID_HEX=\"%X\";LAC_DEC=\"%d\";CID_DEC=\"%d\";MODE_NUM=\"%d\"", $2, "0x"$3, "0x"$4, "0x"$3, "0x"$4, $5}')
+case "$T" in
+ 0*) REG="0";;
+ 1*) REG="1";;
+ 2*) REG="2";;
+ 3*) REG="3";;
+ 5*) REG="5";;
+ 6*) REG="6";;
+ 7*) REG="7";;
+ *) REG="";;
+esac
+
+# MODE
+if [ -z "$MODE_NUM" ] || [ "x$MODE_NUM" = "x0" ]; then
+ MODE_NUM=$(echo "$O" | awk -F[,] '/^\+COPS/ {print $4;exit}')
+fi
+case "$MODE_NUM" in
+ 2*) MODE="UMTS";;
+ 3*) MODE="EDGE";;
+ 4*) MODE="HSDPA";;
+ 5*) MODE="HSUPA";;
+ 6*) MODE="HSPA";;
+ 7*) MODE="LTE";;
+ *) MODE="-";;
+esac
+
+# TAC
+OTX=$(sms_tool -d $DEVICE at "at+cereg")
+TAC=$(echo "$OTX" | awk -F[,] '/^\+CEREG/ {printf "%s", toupper($3)}' | sed 's/[^A-F0-9]//g')
+if [ "x$TAC" != "x" ]; then
+ TAC_HEX=$(printf %d 0x$TAC)
+else
+ TAC="-"
+ TAC_HEX="-"
+fi
+
+CONF_DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
+if echo "x$CONF_DEVICE" | grep -q "192.168."; then
+ if grep -q "Vendor=1bbb" /sys/kernel/debug/usb/devices; then
+ . $RES/modem/hilink/alcatel_hilink.sh $DEVICE
+ fi
+ if grep -q "Vendor=12d1" /sys/kernel/debug/usb/devices; then
+ . $RES/modem/hilink/huawei_hilink.sh $DEVICE
+ fi
+ if grep -q "Vendor=19d2" /sys/kernel/debug/usb/devices; then
+ . $RES/modem/hilink/zte.sh $DEVICE
+ fi
+ SEC=$(uci -q get 3ginfo.@3ginfo[0].network)
+ SEC=${SEC:-wan}
+else
+
+if [ -e /usr/bin/sms_tool ]; then
+ REGOK=0
+ [ "x$REG" = "x1" ] || [ "x$REG" = "x5" ] || [ "x$REG" = "x6" ] || [ "x$REG" = "x7" ] && REGOK=1
+ VIDPID=$(getdevicevendorproduct $DEVICE)
+ if [ -e "$RES/modem/$VIDPID" ]; then
+ case $(cat /tmp/sysinfo/board_name) in
+ "zte,mf289f")
+ . "$RES/modem/usb/19d21485"
+ ;;
+ *)
+ . "$RES/modem/$VIDPID"
+ ;;
+ esac
+ fi
+fi
+
+fi
+
+
+cat <
+#
+# (c) 2023-2024 modified by Rafał Wabik - IceG - From eko.one.pl forum
+#
+
+
+#
+# from config modemdefine
+#
+CONFIG=modemdefine
+MODEMZ=$(uci show $CONFIG | grep -o "@modemdefine\[[0-9]*\]\.modem" | wc -l | xargs)
+if [ -n "$MODEMZ" ]; then
+
+ if [[ $MODEMZ = 0 ]]; then
+ DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
+ if [ -n "$DEVICE" ]; then
+ echo $DEVICE
+ exit 0
+ fi
+ fi
+
+ if [[ $MODEMZ = 1 ]]; then
+ DEVICE=$(uci -q get modemdefine.@modemdefine[0].comm_port)
+ if [ -n "$DEVICE" ]; then
+ echo $DEVICE
+ exit 0
+ fi
+ fi
+
+ if [[ $MODEMZ > 1 ]]; then
+ DEVICE=$(uci -q get modemdefine.@general[0].main_modem)
+ if [ -n "$DEVICE" ]; then
+ echo $DEVICE
+ exit 0
+ fi
+ fi
+fi
+
+
+getdevicepath() {
+ devname="$(basename $1)"
+ case "$devname" in
+ 'wwan'*'at'*)
+ devpath="$(readlink -f /sys/class/wwan/$devname/device)"
+ echo ${devpath%/*/*/*}
+ ;;
+ 'ttyACM'*)
+ devpath="$(readlink -f /sys/class/tty/$devname/device)"
+ echo ${devpath%/*}
+ ;;
+ 'tty'*)
+ devpath="$(readlink -f /sys/class/tty/$devname/device)"
+ echo ${devpath%/*/*}
+ ;;
+ *)
+ devpath="$(readlink -f /sys/class/usbmisc/$devname/device)"
+ echo ${devpath%/*}
+ ;;
+ esac
+}
+
+# from config
+DEVICE=$(uci -q get 3ginfo.@3ginfo[0].device)
+if [ -n "$DEVICE" ]; then
+ echo $DEVICE
+ exit 0
+fi
+
+# from temporary config
+MODEMFILE=/tmp/modem
+touch $MODEMFILE
+DEVICE=$(cat $MODEMFILE)
+if [ -n "$DEVICE" ]; then
+ echo $DEVICE
+ exit 0
+fi
+
+# find any device
+DEVICES=$(find /dev -name "ttyUSB*" -o -name "ttyACM*" -o -name "wwan*at*" | sort -r)
+# limit to devices from the modem
+WAN=$(uci -q get network.wan.device)
+if [ -e "$WAN" ]; then
+ DEVPATH=$(getdevicepath "$WAN")
+ DEVICESFOUND=""
+ for DEVICE in $DEVICES; do
+ T=$(getdevicepath $DEVICE)
+ [ "x$T" = "x$DEVPATH" ] && DEVICESFOUND="$DEVICESFOUND $DEVICE"
+ done
+ DEVICES="$DEVICESFOUND"
+fi
+
+for DEVICE in $DEVICES; do
+ gcom -d $DEVICE -s /usr/share/3ginfo-lite/check.gcom >/dev/null 2>&1
+ if [ $? = 0 ]; then
+ echo "$DEVICE" | tee $MODEMFILE
+ exit 0
+ fi
+done
+
+echo ""
+exit 0
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/info.gcom b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/info.gcom
new file mode 100644
index 00000000..e0ff20f8
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/info.gcom
@@ -0,0 +1,51 @@
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.01
+ waitquiet 0.01 0.01
+
+ let $c="AT+CSQ^m"
+ let $r="+CSQ"
+ gosub readatcmd
+
+ let $c="AT+COPS=3,0;+COPS?^m"
+ let $r="+COPS"
+ gosub readatcmd
+
+ let $c="AT+COPS=3,2;+COPS?^m"
+ let $r="+COPS"
+ gosub readatcmd
+
+ let $c="AT+CREG=2;+CREG?^m"
+ let $r="+CREG"
+ gosub readatcmd
+
+ let $c="AT+CPIN?^m"
+ let $r="+CPIN"
+ gosub readatcmd
+
+ exit 0
+
+:readatcmd
+ let i=15
+ send $c
+:loop
+ get 0.1 "^m" $s
+ let l=len($r)
+ if len($s) < l goto loop1
+ if $mid($s,1,l) <> $r goto loop1
+ print $s
+ return
+
+:loop1
+ if len($s) < 2 goto loop2
+ if $mid($s,1,2) = "ER" return
+ if $mid($s,1,2) = "CO" return
+ if len($s) < 10 goto loop2
+ if $mid($s,1,10) != "+CME ERROR" goto loop2
+ print $s
+ return
+:loop2
+ if i = 0 exit 0
+ let i=i-1
+ goto loop
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/mccmnc.dat b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/mccmnc.dat
new file mode 100644
index 00000000..8829d94d
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/mccmnc.dat
@@ -0,0 +1,2970 @@
+28988;Abkhazia;A-Mobile
+28968;Abkhazia;A-Mobile
+28967;Abkhazia;Aquafon
+289299;Abkhazia;Failed Calls
+289999;Abkhazia;Fix Line
+41201;Afghanistan;AWCC
+41250;Afghanistan;Etisalat
+412299;Afghanistan;Failed Calls
+412999;Afghanistan;Fix Line
+41280;Afghanistan;Mobifone
+41288;Afghanistan;Mobifone
+41240;Afghanistan;MTN
+41220;Afghanistan;Roshan
+27603;Albania;ALBtelecom Mobile / Eagle
+276299;Albania;Failed Calls
+276999;Albania;Fix Line
+27601;Albania;One / AMC
+27602;Albania;Vodafone
+60302;Algeria;Djezzy
+603299;Algeria;Failed Calls
+603999;Algeria;Fix Line
+60301;Algeria;Mobilis
+60303;Algeria;Ooredoo
+544780;American Samoa;ASTCA Mobile
+54411;American Samoa;BlueSky
+544299;American Samoa;Failed Calls
+544999;American Samoa;Fix Line
+21303;Andorra;Andorra Telecom / Mobiland
+213299;Andorra;Failed Calls
+213999;Andorra;Fix Line
+631299;Angola;Failed Calls
+631999;Angola;Fix Line
+63104;Angola;MoviCel
+63102;Angola;Unitel
+365850;Anguilla;Digicel
+365299;Anguilla;Failed Calls
+365999;Anguilla;Fix Line
+365840;Anguilla;Flow
+344930;Antigua and Barbuda;Digicel
+34493;Antigua and Barbuda;Digicel
+344299;Antigua and Barbuda;Failed Calls
+344999;Antigua and Barbuda;Fix Line
+344920;Antigua and Barbuda;Flow
+34492;Antigua and Barbuda;Flow
+34403;Antigua and Barbuda;imobile / APUA
+34430;Antigua and Barbuda;imobile / APUA
+722330;Argentina;Claro
+722320;Argentina;Claro
+722310;Argentina;Claro
+72231;Argentina;Claro
+722299;Argentina;Express
+722999;Argentina;Fix Line
+722299;Argentina;Imowi
+722299;Argentina;IPLAN
+722299;Argentina;Kallofer
+72207;Argentina;Movistar
+72270;Argentina;Movistar
+72210;Argentina;Movistar
+722299;Argentina;Nuestro
+72234;Argentina;Personal
+722299;Argentina;Telecentro
+722340;Argentina;Personal
+722341;Argentina;Personal
+28301;Armenia;Beeline
+283299;Armenia;Failed Calls
+283999;Armenia;Fix Line
+28304;Armenia;KT
+28310;Armenia;Orange
+28305;Armenia;Viva-MTS
+36302;Aruba;Digicel
+363299;Aruba;Failed Calls
+363999;Aruba;Fix Line
+363299;Aruba;MIO
+36301;Aruba;SETAR
+505299;Australia;ACMA
+50530;Australia;Compatel
+505999;Australia;Fix Line
+505299;Australia;Get SIM
+50519;Australia;Lycamobile
+50535;Australia;MessageBird
+50510;Australia;Norfolk Telecom
+50590;Australia;Optus
+50550;Australia;Pivotel
+50588;Australia;Pivotel
+50513;Australia;RailCorp
+50526;Australia;Sinch
+50502;Australia;Optus
+505299;Australia;Symbio
+50501;Australia;Telstra
+50511;Australia;Telstra
+50539;Australia;Telstra
+50571;Australia;Telstra
+50572;Australia;Telstra
+50516;Australia;VicTrack
+50507;Australia;Vodafone
+50503;Australia;Vodafone
+50506;Australia;Vodafone
+50512;Australia;Vodafone
+23214;Austria;3
+23205;Austria;3
+23216;Austria;3
+23210;Austria;3
+23219;Austria;3
+23209;Austria;A1 Telekom
+23212;Austria;A1 Telekom
+23202;Austria;A1 Telekom
+23211;Austria;A1 Telekom
+23201;Austria;A1 Telekom
+232299;Austria;ArgoNET
+232299;Austria;DIALOG telekom
+232299;Austria;Digital Privacy
+232299;Austria;DIMOCO
+232299;Austria;educom
+232999;Austria;Fix Line
+23225;Austria;Holding Graz
+232299;Austria;Innsbrucker Kommunalbetriebe
+232299;Austria;kabelplus
+232299;Austria;Lenovo Connect
+232299;Austria;LINK Mobility
+23226;Austria;LIWEST Mobil
+23217;Austria;MRS
+23220;Austria;Mtel
+23291;Austria;OBB Infrastruktur
+23222;Austria;Plintron
+232299;Austria;Simple SMS
+232299;Austria;Skymond Mobile
+23224;Austria;Smartel Services
+23218;Austria;smartspace
+23223;Austria;T-Mobile / Magenta
+23213;Austria;T-Mobile / Magenta
+23204;Austria;T-Mobile / Magenta
+23203;Austria;T-Mobile / Magenta
+232299;Austria;Telfoni
+23227;Austria;Tismi
+23207;Austria;Ventocom
+40001;Azerbaijan;Azercell
+40002;Azerbaijan;Bakcell
+400299;Azerbaijan;Failed Calls
+400999;Azerbaijan;Fix Line
+40003;Azerbaijan;FONEX
+40004;Azerbaijan;Nar Mobile
+40006;Azerbaijan;Naxtel
+364490;Bahamas;Aliv
+364390;Bahamas;Cybercell / BaTelCo
+36439;Bahamas;Cybercell / BaTelCo
+36430;Bahamas;Cybercell / BaTelCo
+364299;Bahamas;Failed Calls
+364999;Bahamas;Fix Line
+42601;Bahrain;Batelco
+426299;Bahrain;Failed Calls
+426999;Bahrain;Fix Line
+42605;Bahrain;Royal Court
+42604;Bahrain;VIVA
+42602;Bahrain;Zain
+47002;Bangladesh;Airtel
+47007;Bangladesh;Airtel
+47003;Bangladesh;Banglalink
+470299;Bangladesh;Failed Calls
+470999;Bangladesh;Fix Line
+47001;Bangladesh;GrameenPhone
+47004;Bangladesh;TeleTalk
+34250;Barbados;Digicel
+342299;Barbados;Failed Calls
+342999;Barbados;Fix Line
+342600;Barbados;Flow / Lime
+342299;Barbados;Ozone
+25704;Belarus;life:)
+257299;Belarus;Failed Calls
+257999;Belarus;Fix Line
+25702;Belarus;MTS
+25701;Belarus;velcom A1
+20620;Belgium;Base
+20628;Belgium;BICS
+20625;Belgium;Dense Air
+20623;Belgium;Dust Mobile
+20633;Belgium;Ericsson
+206299;Belgium;FEBO
+206999;Belgium;Fix Line
+206299;Belgium;GianCom
+20602;Belgium;Infrabel
+206299;Belgium;interactive digital media / IDM
+206299;Belgium;L-mobi
+20699;Belgium;Lancelot
+206299;Belgium;Legos
+20606;Belgium;Lycamobile
+20630;Belgium;Mobile Vikings
+20610;Belgium;Mobistar / Orange
+206299;Belgium;Nord Connect
+20634;Belgium;onoff
+206299;Belgium;PM Factory
+20600;Belgium;Proximus
+20604;Belgium;Proximus
+20601;Belgium;Proximus
+20605;Belgium;Telenet
+20607;Belgium;Vectone Mobile
+20608;Belgium;VOOmobile
+206299;Belgium;Voxbone / Bandwidth
+70267;Belize;DigiCell
+702299;Belize;Failed Calls
+702999;Belize;Fix Line
+70269;Belize;Smart
+70299;Belize;Smart
+616299;Benin;Failed Calls
+616999;Benin;Fix Line
+61602;Benin;Moov
+61603;Benin;MTN
+35001;Bermuda;Digicel
+350299;Bermuda;Failed Calls
+350999;Bermuda;Fix Line
+35000;Bermuda;One
+40211;Bhutan;B-Mobile
+40217;Bhutan;B-Mobile
+402999;Bhutan;Fix Line
+40277;Bhutan;TashiCell
+73602;Bolivia;Entel Movil
+736299;Bolivia;Failed Calls
+736999;Bolivia;Fix Line
+73603;Bolivia;Tigo
+73601;Bolivia;Viva
+21890;Bosnia and Herzegovina;BH Mobile
+21803;Bosnia and Herzegovina;Eronet
+218299;Bosnia and Herzegovina;Failed Calls
+218999;Bosnia and Herzegovina;Fix Line
+21805;Bosnia and Herzegovina;m:tel
+65204;Botswana;beMobile
+652299;Botswana;Failed Calls
+652999;Botswana;Fix Line
+65201;Botswana;Mascom
+65202;Botswana;Orange
+72432;Brazil;Algar Telecom
+72433;Brazil;Algar Telecom
+72434;Brazil;Algar Telecom
+72426;Brazil;Americanet
+724299;Brazil;ARQIA
+724299;Brazil;Bbs Options
+724299;Brazil;Cinco
+72405;Brazil;Claro
+72438;Brazil;Claro
+724299;Brazil;Failed Calls
+724999;Brazil;Fix Line
+72421;Brazil;Ligue
+72400;Brazil;Nextel
+72439;Brazil;Nextel
+724299;Brazil;NLT
+72416;Brazil;Oi Movel
+72431;Brazil;Oi Movel
+72415;Brazil;Sercomtel
+72417;Brazil;Surf
+724299;Brazil;Telecall
+72454;Brazil;TIM
+72403;Brazil;TIM
+72402;Brazil;TIM
+72404;Brazil;TIM
+724299;Brazil;Vecto Mobile
+72411;Brazil;Vivo
+72423;Brazil;Vivo
+72406;Brazil;Vivo
+72410;Brazil;Vivo
+348570;British Virgin Islands;CCT
+348770;British Virgin Islands;Digicel
+348299;British Virgin Islands;Failed Calls
+348999;British Virgin Islands;Fix Line
+348170;British Virgin Islands;Flow
+52802;Brunei;B-Mobile
+52803;Brunei;DST
+52811;Brunei;DST
+528299;Brunei;Failed Calls
+528999;Brunei;Fix Line
+28401;Bulgaria;A1
+28411;Bulgaria;Bulsatcom
+284299;Bulgaria;Failed Calls
+284999;Bulgaria;Fix Line
+28413;Bulgaria;T.com
+28405;Bulgaria;Telenor
+28403;Bulgaria;Vivacom
+613299;Burkina Faso;Failed Calls
+613999;Burkina Faso;Fix Line
+61302;Burkina Faso;Orange
+61303;Burkina Faso;Telecel
+61301;Burkina Faso;Telmob
+642999;Burundi;Fix Line
+64201;Burundi;Leo
+64282;Burundi;Leo
+64208;Burundi;Lumitel
+64203;Burundi;ONAMOB
+64207;Burundi;Smart
+45604;Cambodia;QB
+45601;Cambodia;Cellcard
+456299;Cambodia;CooTel
+456299;Cambodia;Failed Calls
+456999;Cambodia;Fix Line
+45608;Cambodia;Metfone
+456299;Cambodia;MPTC
+45611;Cambodia;Seatel
+45606;Cambodia;Smart
+45605;Cambodia;Smart
+45602;Cambodia;Smart
+624299;Cameroon;Failed Calls
+624999;Cameroon;Fix Line
+62401;Cameroon;MTN
+62404;Cameroon;Nextel
+62402;Cameroon;Orange
+302630;Canada;Bell Mobility
+302610;Canada;Bell Mobility
+302660;Canada;Bell Mobility
+30264;Canada;Bell Mobility
+30269;Canada;Bell Mobility
+30261;Canada;Bell Mobility
+302640;Canada;Bell Mobility
+302690;Canada;Bell Mobility
+30266;Canada;Bell Mobility
+30263;Canada;Bell Mobility
+302270;Canada;eastlink
+302299;Canada;Failed Calls
+302370;Canada;Fido
+30237;Canada;Fido
+302999;Canada;Fix Line
+30249;Canada;Freedom Mobile
+302491;Canada;Freedom Mobile
+302490;Canada;Freedom Mobile
+302620;Canada;Ice Wireless
+30262;Canada;Ice Wireless
+302380;Canada;K-Net Mobile
+302530;Canada;K-Net Mobile
+30253;Canada;K-Net Mobile
+30238;Canada;K-Net Mobile
+302720;Canada;Rogers
+302721;Canada;Rogers
+30232;Canada;Rogers
+30282;Canada;Rogers
+302320;Canada;Rogers
+302820;Canada;Rogers
+30272;Canada;Rogers
+302780;Canada;SaskTel Mobility
+302781;Canada;SaskTel Mobility
+302750;Canada;SaskTel Mobility
+302680;Canada;SaskTel Mobility
+30275;Canada;SaskTel Mobility
+30278;Canada;SaskTel Mobility
+30268;Canada;SaskTel Mobility
+302681;Canada;SaskTel Mobility
+302860;Canada;Telus Mobility
+30286;Canada;Telus Mobility
+30222;Canada;Telus Mobility
+302360;Canada;Telus Mobility
+302760;Canada;Telus Mobility
+302221;Canada;Telus Mobility
+30236;Canada;Telus Mobility
+302220;Canada;Telus Mobility
+30222;Canada;Telus Mobility
+30276;Canada;Telus Mobility
+302520;Canada;Videotron
+302510;Canada;Videotron
+30251;Canada;Videotron
+30250;Canada;Videotron
+302500;Canada;Videotron
+302299;Canada;Xplore Mobile
+62501;Cape Verde;CVMovel
+625299;Cape Verde;Failed Calls
+625999;Cape Verde;Fix Line
+62502;Cape Verde;Unitel T+
+34650;Cayman Islands;Digicel
+346299;Cayman Islands;Failed Calls
+346999;Cayman Islands;Fix Line
+346140;Cayman Islands;Flow / Lime
+34601;Cayman Islands;Logic
+62304;Central African Republic;Azur
+623299;Central African Republic;Failed Calls
+623999;Central African Republic;Fix Line
+62301;Central African Republic;Moov
+62303;Central African Republic;Orange
+623299;Central African Republic;Socatel
+62302;Central African Republic;Telecel
+62201;Chad;Airtel
+622299;Chad;Failed Calls
+622999;Chad;Fix Line
+62203;Chad;Moov
+62204;Chad;Salam
+730299;Chile;Boby
+730299;Chile;CellOPS
+73022;Chile;Cellplus
+73011;Chile;Celupago
+73027;Chile;Cibeles Telecom
+73015;Chile;Cibeles Telecom
+73003;Chile;Claro
+73023;Chile;Claro
+73017;Chile;Compatel
+730299;Chile;Dotcom
+73018;Chile;Empresas Bunker
+73001;Chile;Entel
+73010;Chile;Entel
+730299;Chile;Failed Calls
+730999;Chile;Fix Line
+730299;Chile;GTD Movil
+730299;Chile;Industel
+73006;Chile;INNET
+73020;Chile;Inversiones Santa Fe
+730299;Chile;Mavi
+730299;Chile;Mobilink
+73019;Chile;Movil Falabella
+73007;Chile;Movistar
+73002;Chile;Movistar
+730299;Chile;Mundo Pacifico
+73014;Chile;Netline
+730299;Chile;NetUno
+73016;Chile;Nomade Telecomunicaciones
+730299;Chile;Quantax
+730299;Chile;RedVoiss
+730299;Chile;Simple
+730299;Chile;Swedcom
+730299;Chile;Telcomax
+730299;Chile;Telefonica Uno Uno Cuatro
+73012;Chile;Telestar
+730299;Chile;Television Interactiva
+73013;Chile;Virgin Mobile
+730299;Chile;VOIP Analysis
+73008;Chile;VTR Movil
+73004;Chile;WOM
+73009;Chile;WOM
+73005;Chile;WOM
+46002;China;China Mobile
+46000;China;China Mobile
+46007;China;China Mobile
+46008;China;China Mobile
+46004;China;China Mobile
+46011;China;China Telecom
+46003;China;China Telecom
+46012;China;China Telecom
+46006;China;China Unicom
+46010;China;China Unicom
+46001;China;China Unicom
+46009;China;China Unicom
+460299;China;Failed Calls
+460999;China;Fix Line
+732299;Colombia;ATnet
+732130;Colombia;Avantel
+732666;Colombia;Claro
+732101;Colombia;Claro
+73202;Colombia;Edatel
+732187;Colombia;eTb
+732299;Colombia;Eztalk Mobile
+732999;Colombia;Fix Line
+732240;Colombia;Flash Mobile
+732299;Colombia;Gomobile
+732220;Colombia;Libre Tecnologias
+732299;Colombia;Movil Exito
+732123;Colombia;Movistar
+73201;Colombia;Movistar
+732299;Colombia;Plintron
+732230;Colombia;Setroc Mobile
+732199;Colombia;SUMA movil
+732165;Colombia;Tigo
+732103;Colombia;Tigo
+732111;Colombia;Tigo
+732299;Colombia;TuCEL
+73220;Colombia;UNE
+732142;Colombia;UNE
+732299;Colombia;Vilacom Mobile
+732154;Colombia;Virgin Mobile
+732360;Colombia;WOM
+654299;Comoros;Failed Calls
+654999;Comoros;Fix Line
+65401;Comoros;HURI
+65402;Comoros;Telma
+62901;Congo;Airtel
+629299;Congo;Failed Calls
+629999;Congo;Fix Line
+62910;Congo;MTN
+62907;Congo;Warid
+54801;Cook Islands;Vodafone / Bluesky
+548299;Cook Islands;Failed Calls
+548999;Cook Islands;Fix Line
+71203;Costa Rica;Claro
+712299;Costa Rica;Failed Calls
+712999;Costa Rica;Fix Line
+71201;Costa Rica;Kolbi / ICE
+71202;Costa Rica;Kolbi / ICE
+71204;Costa Rica;Movistar
+712299;Costa Rica;MultiCom
+712299;Costa Rica;racsa
+712299;Costa Rica;Tuyo Movil
+21910;Croatia;A1 / VIP
+219299;Croatia;Failed Calls
+219999;Croatia;Fix Line
+21901;Croatia;T-Mobile
+21912;Croatia;TELE FOCUS
+21902;Croatia;Telemach / Tele2
+36801;Cuba;Cubacel
+368299;Cuba;Failed Calls
+368999;Cuba;Fix Line
+368299;Cuba;MoviTel
+28022;Cyprus;Cablenet / Lemontel
+28001;Cyprus;Cytamobile-Vodafone
+28002;Cyprus;Cytamobile-Vodafone
+28010;Cyprus;Epic / MTN
+280299;Cyprus;Failed Calls
+280999;Cyprus;Fix Line
+28020;Cyprus;PrimeTel
+230299;Czech Republic;+4U Mobile
+230299;Czech Republic;3ton
+230299;Czech Republic;CEZ
+23008;Czech Republic;Compatel
+230299;Czech Republic;Dragon
+230299;Czech Republic;EriMobile
+230299;Czech Republic;Failed Calls
+230299;Czech Republic;Fayn
+230999;Czech Republic;Fix Line
+230299;Czech Republic;GoMobil
+230299;Czech Republic;ha-loo mobil
+230299;Czech Republic;Laudatio
+230299;Czech Republic;METRONET
+230299;Czech Republic;MOBIL21
+230299;Czech Republic;Nej Mobil
+230299;Czech Republic;NETBOX Mobil
+23004;Czech Republic;Nordic Telecom
+23002;Czech Republic;O2
+230299;Czech Republic;Odorik
+23005;Czech Republic;PODA
+230299;Czech Republic;SAZKA
+230299;Czech Republic;SZDC
+23098;Czech Republic;SZDC
+23007;Czech Republic;T-Mobile
+23001;Czech Republic;T-Mobile
+230299;Czech Republic;Tesco Mobile
+230299;Czech Republic;TOPefekt
+230299;Czech Republic;TT Quality
+230299;Czech Republic;Uniphone
+23009;Czech Republic;Uniphone
+23003;Czech Republic;Vodafone
+63090;Democratic Republic of Congo;Africell
+63002;Democratic Republic of Congo;Airtel
+630299;Democratic Republic of Congo;Failed Calls
+630999;Democratic Republic of Congo;Fix Line
+63086;Democratic Republic of Congo;Orange
+63005;Democratic Republic of Congo;Supercell
+630299;Democratic Republic of Congo;Tatem
+63001;Democratic Republic of Congo;Vodacom
+63088;Democratic Republic of Congo;Yozma Timeturns
+23806;Denmark;3
+238299;Denmark;42 Telecom
+238299;Denmark;5Tel
+23823;Denmark;Banedanmark
+238299;Denmark;Benemen
+238299;Denmark;Bolignet-Aarhus
+238299;Denmark;CBB Mobil
+238299;Denmark;celfon
+23888;Denmark;Cobira
+238299;Denmark;Companymobile
+23813;Denmark;Compatel
+238299;Denmark;Comtalk
+238299;Denmark;Evercall
+238299;Denmark;Failed Calls
+238299;Denmark;Firmafon
+238299;Denmark;Firstcom
+238999;Denmark;Fix Line
+23817;Denmark;Gotanet
+23842;Denmark;Greenwave
+238299;Denmark;ipnordic
+238299;Denmark;Ipvision
+238299;Denmark;Lancelot
+238299;Denmark;Lebara
+23828;Denmark;LINK Mobility
+23812;Denmark;Lycamobile
+238299;Denmark;Maxtel.dk
+238299;Denmark;MI Carrier Services
+238299;Denmark;Mitto
+238299;Denmark;Mobiweb
+23814;Denmark;Monty Mobile
+23815;Denmark;Net 1
+23804;Denmark;Nexcon.io
+238299;Denmark;NextM2M
+23873;Denmark;Onomondo
+23830;Denmark;Pareteum
+238299;Denmark;SimService
+23803;Denmark;Syniverse
+23810;Denmark;TDC
+23801;Denmark;TDC
+23802;Denmark;Telenor
+23877;Denmark;Telenor
+238299;Denmark;Telenor Connexion
+23820;Denmark;Telia
+23896;Denmark;Telia
+23816;Denmark;Tismi
+238299;Denmark;Tripple Track
+238299;Denmark;Uni-tel
+23825;Denmark;Viahub
+238299;Denmark;Viptel
+23808;Denmark;Voxbone / Bandwidth
+310299;Diego Garcia;Failed Calls
+310999;Diego Garcia;Fix Line
+310299;Diego Garcia;Sure
+63801;Djibouti;Evatis
+638299;Djibouti;Failed Calls
+638999;Djibouti;Fix Line
+36650;Dominica;Digicel
+366299;Dominica;Failed Calls
+366999;Dominica;Fix Line
+366110;Dominica;Flow
+37002;Dominican Republic;Claro
+370299;Dominican Republic;Failed Calls
+370999;Dominican Republic;Fix Line
+37001;Dominican Republic;Orange / Altice
+370299;Dominican Republic;Satel
+37004;Dominican Republic;Viva
+514299;East Timor;Failed Calls
+514999;East Timor;Fix Line
+51403;East Timor;Telemor
+51401;East Timor;Telkomcel
+51402;East Timor;Timor Telecom
+74001;Ecuador;Claro
+74002;Ecuador;CNT movil
+740299;Ecuador;Failed Calls
+740999;Ecuador;Fix Line
+74000;Ecuador;Movistar
+60203;Egypt;Etisalat
+602299;Egypt;Failed Calls
+602999;Egypt;Fix Line
+60201;Egypt;Orange
+60202;Egypt;Vodafone
+60204;Egypt;WE
+70601;El Salvador;Claro
+70602;El Salvador;Digicel
+706299;El Salvador;Failed Calls
+706999;El Salvador;Fix Line
+70604;El Salvador;Movistar
+70605;El Salvador;RED
+70603;El Salvador;Tigo
+627299;Equatorial Guinea;Failed Calls
+627999;Equatorial Guinea;Fix Line
+62703;Equatorial Guinea;Muni
+62701;Equatorial Guinea;Orange
+65701;Eritrea;Eritel
+657299;Eritrea;Failed Calls
+657999;Eritrea;Fix Line
+24802;Estonia;Elisa
+248299;Estonia;Failed Calls
+248999;Estonia;Fix Line
+24803;Estonia;Tele2
+24813;Estonia;Telia
+24801;Estonia;Telia
+24804;Estonia;TravelSim
+63601;Ethiopia;Ethio Mobile
+636299;Ethiopia;Failed Calls
+636999;Ethiopia;Fix Line
+750999;Falkland Islands;Fix Line
+750299;Falkland Islands;Failed Calls
+75001;Falkland Islands;Sure
+288299;Faroe Islands;Failed Calls
+28801;Faroe Islands;Faroese Telecom
+288999;Faroe Islands;Fix Line
+28802;Faroe Islands;Hey / Kall
+28803;Faroe Islands;Tosa
+54202;Fiji;DigiCell
+542299;Fiji;Failed Calls
+542999;Fiji;Fix Line
+54201;Fiji;Vodafone
+24414;Finland;Alcom
+244299;Finland;Benemen
+24426;Finland;Compatel
+244299;Finland;Cuuma
+24412;Finland;DNA
+24413;Finland;DNA
+24404;Finland;DNA
+24403;Finland;DNA
+24421;Finland;Elisa
+24405;Finland;Elisa
+24406;Finland;Elisa
+244299;Finland;Failed Calls
+244999;Finland;Fix Line
+244299;Finland;interactive digital media / IDM
+244299;Finland;IPIFY
+244299;Finland;Lancelot
+244299;Finland;MI Carrier Services
+244299;Finland;MobiWeb
+24424;Finland;Nord Connect
+24438;Finland;NSN
+24407;Finland;NSN
+24439;Finland;NSN
+24408;Finland;NSN
+24441;Finland;NSN
+24440;Finland;NSN
+24409;Finland;NSN
+244299;Finland;RAILI
+24443;Finland;Telavox
+24491;Finland;Telia
+24436;Finland;Telia
+24415;Finland;Telit
+24437;Finland;Tismi
+244299;Finland;TravelSim
+244299;Finland;Twilio
+24435;Finland;Ukko Mobile
+24442;Finland;Viahub
+24445;Finland;VIRVE
+24447;Finland;VIRVE
+24446;Finland;VIRVE
+24433;Finland;VIRVE
+24432;Finland;Voxbone / Bandwidth
+208299;France;Add-On Multimedia
+208299;France;Afone Mobile
+20828;France;Airmob
+208299;France;Alphalink
+208299;France;Alphalink
+208299;France;Annatel
+208299;France;Atlas
+208299;France;Auchan
+208299;France;Auchan
+208299;France;Axialys
+208299;France;Bazile
+208299;France;BJT
+208299;France;BJT
+20820;France;Bouygues Telecom
+20888;France;Bouygues Telecom
+20821;France;Bouygues Telecom
+208299;France;Bretagne Telecom
+208299;France;CAT
+208299;France;CELESTE
+20834;France;Cellhire
+208299;France;Codepi
+208299;France;Coolwave
+20827;France;Coriolis
+208299;France;CPRO
+208299;France;CRH
+208299;France;CRT
+208299;France;CTExcel
+208299;France;Doctolib
+208299;France;Failed Calls
+208999;France;Fix Line
+208299;France;Foliateam
+20836;France;Free Mobile
+20835;France;Free Mobile
+20816;France;Free Mobile
+20815;France;Free Mobile
+20894;France;Halys
+208299;France;Happy Telecom
+208299;France;Hexatel
+20889;France;Hub One
+208299;France;i-via
+20837;France;IP Directions
+208299;France;IP Telecom
+208299;France;Iptis
+208299;France;JOi
+208299;France;Kertel
+208299;France;Keyyo Mobile
+208299;France;La Poste Mobile
+208299;France;La Poste Mobile
+208299;France;LASOTEL
+20838;France;Lebara
+20817;France;Legos
+208299;France;Linkt
+208299;France;LITEYEAR
+20825;France;Lycamobile
+20803;France;MobiquiThings
+20824;France;MobiquiThings
+208299;France;Netcom
+20839;France;Networth Telecom
+208299;France;Nordnet
+20826;France;NRJ
+208299;France;onoff
+208299;France;OpenIP
+20801;France;Orange
+20891;France;Orange
+20832;France;Orange
+20802;France;Orange
+208299;France;Paritel
+208299;France;Prixtel
+208299;France;Prixtel
+208299;France;SCT TELECOM
+208299;France;SCT TELECOM
+208299;France;Sewan Communications
+20813;France;SFR
+20809;France;SFR
+20811;France;SFR
+20808;France;SFR
+20810;France;SFR
+208299;France;SIMbioz
+20830;France;Syma Mobile
+208299;France;TDF
+208299;France;Tismi
+20822;France;Transatel
+208299;France;Trunkline
+20812;France;Truphone
+208299;France;unyc
+208299;France;VA SOLUTIONS
+20831;France;Vectone Mobile
+208299;France;VOIP Telecom
+547299;French Polynesia;Failed Calls
+547999;French Polynesia;Fix Line
+547299;French Polynesia;Ora
+54720;French Polynesia;Vini
+54715;French Polynesia;Vodafone
+62803;Gabon;Airtel
+628299;Gabon;Failed Calls
+628999;Gabon;Fix Line
+62801;Gabon;Libertis
+60702;Gambia;Africel
+60703;Gambia;Comium
+607299;Gambia;Failed Calls
+607999;Gambia;Fix Line
+60701;Gambia;Gamcel
+60704;Gambia;QCell
+28204;Georgia;Beeline
+282299;Georgia;Failed Calls
+282999;Georgia;Fix Line
+28201;Georgia;Geocell
+28207;Georgia;GlobalCell
+28202;Georgia;MagtiCom
+28211;Georgia;Mobilive
+28222;Georgia;MyPhone
+28210;Georgia;Premium Net
+28208;Georgia;Silknet
+28212;Georgia;Telecom 1
+26223;Germany;1&1
+262299;Germany;Argon Networks
+26210;Germany;DB Netz
+26220;Germany;Telefonica / E-Plus
+262999;Germany;Fix Line
+26214;Germany;Lebara
+26243;Germany;Lycamobile
+26221;Germany;Multiconnect
+26212;Germany;sipgate
+26222;Germany;sipgate
+26206;Germany;T-mobile
+26278;Germany;T-mobile
+26201;Germany;T-mobile
+26224;Germany;TelcoVillage
+26203;Germany;Telefonica / E-Plus
+26205;Germany;Telefonica / E-Plus
+26217;Germany;Telefonica / E-Plus
+26216;Germany;Telefonica / O2
+26207;Germany;Telefonica / O2
+26208;Germany;Telefonica / O2
+26211;Germany;Telefonica / O2
+262299;Germany;Tismi
+262299;Germany;Truphone
+26209;Germany;Vodafone
+26204;Germany;Vodafone
+26242;Germany;Vodafone
+26202;Germany;Vodafone
+62003;Ghana;Airtel
+62006;Ghana;Airtel
+620299;Ghana;Comsys
+620299;Ghana;Failed Calls
+620999;Ghana;Fix Line
+62007;Ghana;Glo
+62001;Ghana;MTN
+62005;Ghana;National Security
+62008;Ghana;Surfline
+62002;Ghana;Vodafone
+266299;Gibraltar;Failed Calls
+266999;Gibraltar;Fix Line
+266299;Gibraltar;GibFibreSpeed
+26601;Gibraltar;Gibtel
+202299;Greece;AMD Telecom
+202299;Greece;Apifon
+20215;Greece;BWS
+20202;Greece;Cosmote
+20201;Greece;Cosmote
+202999;Greece;Fix Line
+20216;Greece;Inter Telecom
+202299;Greece;Interconnect
+202299;Greece;M-STAT
+202299;Greece;Nova
+20204;Greece;OSE
+20203;Greece;OTE
+202299;Greece;OTEGLOBE
+202299;Greece;Premium Net
+20205;Greece;Vodafone
+20210;Greece;Wind
+20209;Greece;Wind
+20212;Greece;Yuboto
+290299;Greenland;Failed Calls
+290999;Greenland;Fix Line
+29001;Greenland;Tele Greenland
+35250;Grenada;Digicel
+352299;Grenada;Failed Calls
+352999;Grenada;Fix Line
+352110;Grenada;Flow
+352299;Grenada;Spice Mobile
+34008;Guadeloupe and Martinique and French Guiana;Amigo
+34020;Guadeloupe and Martinique and French Guiana;Digicel
+340299;Guadeloupe and Martinique and French Guiana;Failed Calls
+340999;Guadeloupe and Martinique and French Guiana;Fix Line
+34004;Guadeloupe and Martinique and French Guiana;Free
+34001;Guadeloupe and Martinique and French Guiana;Orange
+34002;Guadeloupe and Martinique and French Guiana;SFR
+310370;Guam;Docomo Pacific
+310470;Guam;Docomo Pacific
+310299;Guam;Failed Calls
+310999;Guam;Fix Line
+310140;Guam;GTA
+310110;Guam;IT&E
+70401;Guatemala;Claro
+704299;Guatemala;Failed Calls
+704999;Guatemala;Fix Line
+70403;Guatemala;Movistar
+70402;Guatemala;Tigo
+61105;Guinea;Cellcom
+611299;Guinea;Failed Calls
+611999;Guinea;Fix Line
+61104;Guinea;MTN
+61101;Guinea;Orange
+632299;Guinea-Bissau;Failed Calls
+632999;Guinea-Bissau;Fix Line
+63201;Guinea-Bissau;Guinetel
+63202;Guinea-Bissau;MTN
+63203;Guinea-Bissau;Orange
+73802;Guyana;Cellink
+73801;Guyana;Digicel
+738299;Guyana;Failed Calls
+738999;Guyana;Fix Line
+37202;Haiti;Digicel
+372299;Haiti;Failed Calls
+372999;Haiti;Fix Line
+37203;Haiti;Natcom
+70801;Honduras;Claro
+70801;Honduras;Claro
+708299;Honduras;Failed Calls
+708999;Honduras;Fix Line
+70830;Honduras;HonduTel
+70830;Honduras;HonduTel
+70802;Honduras;Tigo
+70802;Honduras;Tigo
+45405;Hong Kong;3
+45404;Hong Kong;3
+45403;Hong Kong;3
+45414;Hong Kong;3
+45413;Hong Kong;China Mobile
+45412;Hong Kong;China Mobile
+45432;Hong Kong;HKBN
+45430;Hong Kong;China Mobile
+45407;Hong Kong;China Unicom
+45411;Hong Kong;CHKTL
+45401;Hong Kong;Citic
+45431;Hong Kong;CTExcel
+45436;Hong Kong;Eascotel
+454999;Hong Kong;Fix Line
+454395;Hong Kong;Government
+45427;Hong Kong;Government
+454390;Hong Kong;Government
+45425;Hong Kong;Government
+454394;Hong Kong;Government
+454398;Hong Kong;Government
+454393;Hong Kong;Government
+45428;Hong Kong;Government
+454397;Hong Kong;Government
+45426;Hong Kong;Government
+454392;Hong Kong;Government
+454396;Hong Kong;Government
+454391;Hong Kong;Government
+45424;Hong Kong;Multibyte
+45417;Hong Kong;SmarTone
+45406;Hong Kong;SmarTone
+45415;Hong Kong;SmarTone
+45402;Hong Kong;SUN Mobile / CSL
+45416;Hong Kong;SUN Mobile / CSL
+45410;Hong Kong;SUN Mobile / CSL
+45420;Hong Kong;SUN Mobile / CSL
+45418;Hong Kong;SUN Mobile / CSL
+45400;Hong Kong;SUN Mobile / CSL
+45419;Hong Kong;SUN Mobile / CSL
+45408;Hong Kong;Tru
+45435;Hong Kong;Webbing
+216299;Hungary;Antenna
+21603;Hungary;Digi
+216999;Hungary;Fix line
+216299;Hungary;Invitech
+216299;Hungary;Mobil4
+21602;Hungary;MVM NET
+216299;Hungary;Netfone
+216299;Hungary;TARR
+21630;Hungary;Telekom
+21601;Hungary;Telenor
+216299;Hungary;Vidanet
+21670;Hungary;Vodafone
+21671;Hungary;Vodafone
+274299;Iceland;Failed Calls
+274999;Iceland;Fix Line
+27411;Iceland;NOVA
+27431;Iceland;Siminn
+27408;Iceland;Siminn
+27401;Iceland;Siminn
+27416;Iceland;Tismi
+27404;Iceland;Viking Wireless
+27412;Iceland;Vodafone
+27403;Iceland;Vodafone
+27402;Iceland;Vodafone
+40433;India;Aircel
+40491;India;Aircel
+40442;India;Aircel
+40429;India;Aircel
+40417;India;Aircel
+40441;India;Aircel
+40428;India;Aircel
+40437;India;Aircel
+40435;India;Aircel
+40425;India;Aircel
+40416;India;Airtel
+40495;India;Airtel
+40470;India;Airtel
+40410;India;Airtel
+40494;India;Airtel
+40498;India;Airtel
+40406;India;Airtel
+40493;India;Airtel
+40449;India;Airtel
+40497;India;Airtel
+40403;India;Airtel
+40492;India;Airtel
+40431;India;Airtel
+40496;India;Airtel
+40402;India;Airtel
+40490;India;Airtel
+40455;India;BSNL Mobile
+40473;India;BSNL Mobile
+40434;India;BSNL Mobile
+40462;India;BSNL Mobile
+40477;India;BSNL Mobile
+40454;India;BSNL Mobile
+40472;India;BSNL Mobile
+40481;India;BSNL Mobile
+40459;India;BSNL Mobile
+40476;India;BSNL Mobile
+40453;India;BSNL Mobile
+40471;India;BSNL Mobile
+40480;India;BSNL Mobile
+40458;India;BSNL Mobile
+40475;India;BSNL Mobile
+40451;India;BSNL Mobile
+40466;India;BSNL Mobile
+40457;India;BSNL Mobile
+40474;India;BSNL Mobile
+40438;India;BSNL Mobile
+40464;India;BSNL Mobile
+40469;India;Dolphin
+404299;India;Failed Calls
+404999;India;Fix Line
+40468;India;Garuda
+40404;India;Idea
+40478;India;Idea
+40487;India;Idea
+40419;India;Idea
+404848;India;Idea
+40456;India;Idea
+404853;India;Idea
+40414;India;Idea
+404846;India;Idea
+40444;India;Idea
+404852;India;Idea
+40412;India;Idea
+404845;India;Idea
+40424;India;Idea
+404850;India;Idea
+40407;India;Idea
+40482;India;Idea
+40489;India;Idea
+40422;India;Idea
+404849;India;Idea
+404873;India;Jio
+404864;India;Jio
+404856;India;Jio
+404869;India;Jio
+404860;India;Jio
+404865;India;Jio
+404857;India;Jio
+404870;India;Jio
+404861;India;Jio
+404854;India;Jio
+404874;India;Jio
+404866;India;Jio
+404871;India;Jio
+404862;India;Jio
+404855;India;Jio
+404867;India;Jio
+404858;India;Jio
+404872;India;Jio
+404863;India;Jio
+404868;India;Jio
+404859;India;Jio
+40421;India;Loop Mobile
+40452;India;Reliance Mobile
+40408;India;Reliance Mobile
+40418;India;Reliance Mobile
+40467;India;Reliance Mobile
+40409;India;Reliance Mobile
+40423;India;Reliance Mobile
+40483;India;Reliance Mobile
+40436;India;Reliance Mobile
+40485;India;Reliance Mobile
+40450;India;Reliance Mobile
+40420;India;Vodafone
+40401;India;Vodafone
+40446;India;Vodafone
+40415;India;Vodafone
+40488;India;Vodafone
+40443;India;Vodafone
+40413;India;Vodafone
+40486;India;Vodafone
+40430;India;Vodafone
+40411;India;Vodafone
+40484;India;Vodafone
+40427;India;Vodafone
+40405;India;Vodafone
+40460;India;Vodafone
+51089;Indonesia;3
+510299;Indonesia;Failed Calls
+510999;Indonesia;Fix Line
+51021;Indonesia;Indosat Ooredoo
+51062;Indonesia;Indosat Ooredoo
+51001;Indonesia;Indosat Ooredoo
+51027;Indonesia;Net1
+51028;Indonesia;Smartfren
+51009;Indonesia;Smartfren
+51099;Indonesia;Smartfren
+51010;Indonesia;Telkomsel
+51020;Indonesia;Telkomsel
+51008;Indonesia;XL
+51011;Indonesia;XL
+90167;International Networks;1NCE
+90176;International Networks;A1
+90114;International Networks;AeroMobile
+901299;International Networks;Afinna One
+90181;International Networks;Airnity
+90182;International Networks;AnyNet
+90124;International Networks;Bandwidth
+90155;International Networks;Beezz
+90158;International Networks;BICS
+90170;International Networks;Bubbletone
+90118;International Networks;Cingular Wireless Network
+90116;International Networks;Cisco Jasper
+90148;International Networks;Com4 Sweden
+90173;International Networks;Cubic
+90142;International Networks;DCN Hub
+90140;International Networks;Deutsche Telekom
+901299;International Networks;DIDWW
+90150;International Networks;EchoStar Mobile
+901299;International Networks;Ellipsat
+90143;International Networks;EMnify
+901299;International Networks;EMSAT
+901299;International Networks;Failed Calls
+901999;International Networks;Fix Line
+901299;International Networks;Global Access Services
+901299;International Networks;Globalstar
+90113;International Networks;GSM.AQ
+90122;International Networks;i-lincc
+90111;International Networks;Inmarsat
+90120;International Networks;Intermatica
+90103;International Networks;Iridium
+90169;International Networks;Legos
+90166;International Networks;Limitless
+90152;International Networks;Manx Telecom
+90119;International Networks;Maritime Roaming Service
+901299;International Networks;MCNtelecom
+90112;International Networks;MCP
+90159;International Networks;MessageBird
+90127;International Networks;Monaco Telecom
+90184;International Networks;Movistar
+90138;International Networks;MTT
+90139;International Networks;MTX Connect
+90117;International Networks;Navitas Telecom
+90179;International Networks;Nokia
+90185;International Networks;O2
+90115;International Networks;OnAir
+90141;International Networks;One Network
+90147;International Networks;Ooredoo
+90131;International Networks;Orange
+901299;International Networks;Oration Technologies
+901299;International Networks;Phonegroup
+90165;International Networks;Plintron
+90175;International Networks;Pod
+901299;International Networks;republic wireless
+90157;International Networks;SAP
+901299;International Networks;Sipme
+90133;International Networks;SMART
+90178;International Networks;Sparkle
+90164;International Networks;Syniverse
+90172;International Networks;Tele2
+901299;International Networks;Telecom26
+901299;International Networks;Telekom Malaysia
+90129;International Networks;Telenor Connexion
+90105;International Networks;Thuraya RMSS
+90137;International Networks;Transatel
+90162;International Networks;Twilio
+90134;International Networks;tyntec
+90151;International Networks;VisionNG
+90121;International Networks;Wins
+901299;International Networks;Zain
+432299;Iran;Anarestan
+432299;Iran;ApTel
+432299;Iran;Arian Tel
+432299;Iran;Failed Calls
+432999;Iran;Fix Line
+432299;Iran;LotusTel
+43211;Iran;MCI
+43219;Iran;MTCE
+43235;Iran;MTN IranCell
+43220;Iran;RighTel
+43201;Iran;SamanTel
+43208;Iran;Shatel Mobile
+43232;Iran;Taliya
+43214;Iran;Telekish
+41805;Iraq;Asia Cell
+418299;Iraq;Failed Calls
+418999;Iraq;Fix Line
+41840;Iraq;Korek
+41845;Iraq;Mobitel
+41820;Iraq;Zain
+41830;Iraq;Zain
+27217;Ireland;3
+27205;Ireland;3
+27202;Ireland;3
+272299;Ireland;BT
+272299;Ireland;Cubic Telecom
+272299;Ireland;Failed Calls
+272999;Ireland;Fix Line
+27213;Ireland;Lycamobile
+27207;Ireland;Meteor
+27208;Ireland;Meteor
+27203;Ireland;Meteor
+272299;Ireland;Net Feasa
+272299;Ireland;OGCIO
+27211;Ireland;Tesco Mobile
+27215;Ireland;Virgin Media
+27201;Ireland;Vodafone
+42519;Israel;019 Mobile
+425299;Israel;Annatel Mobile
+42523;Israel;Beezz
+425299;Israel;Bynet
+425299;Israel;Cellact
+42502;Israel;Cellcom
+425299;Israel;Failed Calls
+425999;Israel;Fix Line
+42508;Israel;Golan Telecom
+42515;Israel;Home Cellular
+42577;Israel;Hot Mobile
+42507;Israel;Hot Mobile
+42513;Israel;Ituran
+42522;Israel;Maskyoo
+42501;Israel;Orange
+42503;Israel;Pelephone
+42512;Israel;Pelephone
+42516;Israel;Rami Levy Communications
+425299;Israel;T2T
+42517;Israel;Von waves
+42509;Israel;We4G
+42514;Israel;YouPhone
+222299;Italy;1Mobile
+222299;Italy;A-Tono
+22240;Italy;Agile Telecom
+22234;Italy;BT mobile
+222299;Italy;Esendex
+222299;Italy;Compatel
+22253;Italy;CoopVoce
+222299;Italy;Daily Telecom Mobile
+22236;Italy;Digi
+222299;Italy;DireQ
+22242;Italy;Enel
+222299;Italy;Failed Calls
+22208;Italy;Fastweb
+222999;Italy;Fix Line
+22299;Italy;WindTre / Hi3G
+22250;Italy;Iliad
+222299;Italy;Kaleyra
+22239;Italy;SMS.it / LINK Mobility
+22235;Italy;Lycamobile
+22207;Italy;Noverca Italia
+22254;Italy;Plintron
+22233;Italy;Poste Mobile
+222999;Italy;Premium Numbers
+22258;Italy;rdcom
+22230;Italy;RFI
+22256;Italy;spusu
+22248;Italy;Telecom Italia Mobile
+22243;Italy;Telecom Italia Mobile
+22201;Italy;TIM
+222299;Italy;Sparkle
+222299;Italy;Tiscali
+22244;Italy;Mundio
+22251;Italy;ho.
+22249;Italy;Vianova Mobile
+22206;Italy;Vodafone
+22210;Italy;Vodafone
+222299;Italy;Vola
+222299;Italy;Webcom
+22288;Italy;WindTre / WIND
+22237;Italy;WindTre / Hi3G
+612299;Ivory Coast;Failed Calls
+612999;Ivory Coast;Fix Line
+61202;Ivory Coast;Moov
+61205;Ivory Coast;MTN
+61203;Ivory Coast;Orange
+33850;Jamaica;Digicel
+338299;Jamaica;Failed Calls
+338999;Jamaica;Fix Line
+338180;Jamaica;Flow
+338110;Jamaica;Flow
+440299;Japan;Failed Calls
+440999;Japan;Fix Line
+44051;Japan;KDDI
+44074;Japan;KDDI
+44052;Japan;KDDI
+44075;Japan;KDDI
+44053;Japan;KDDI
+44071;Japan;KDDI
+44076;Japan;KDDI
+44054;Japan;KDDI
+44072;Japan;KDDI
+44050;Japan;KDDI
+44070;Japan;KDDI
+44073;Japan;KDDI
+44010;Japan;NTT DoCoMo
+44078;Japan;Okinawa Cellular
+44011;Japan;Rakuten Mobile
+44020;Japan;SoftBank
+44021;Japan;SoftBank
+44000;Japan;SoftBank
+44005;Japan;SoftBank
+44001;Japan;SoftBank
+416299;Jordan;Failed Calls
+416999;Jordan;Fix Line
+41677;Jordan;Orange
+41603;Jordan;Umniah
+41601;Jordan;Zain
+40107;Kazakhstan;Altel
+401299;Kazakhstan;Arna
+40101;Kazakhstan;Beeline
+401299;Kazakhstan;Failed Call(s)
+401999;Kazakhstan;Fix Line
+40108;Kazakhstan;Kazakhstan Online
+40102;Kazakhstan;Kcell
+40177;Kazakhstan;Tele2
+63903;Kenya;Airtel
+63905;Kenya;Airtel
+639299;Kenya;eferio
+639299;Kenya;Failed Calls
+63906;Kenya;Finserve Africa
+639999;Kenya;Fix Line
+63909;Kenya;Homeland Media
+63912;Kenya;Infura
+63911;Kenya;Jambo Telcoms
+63910;Kenya;Jamii Telecommunications
+63904;Kenya;Mobile Pay
+63902;Kenya;Safaricom
+63901;Kenya;Safaricom
+63907;Kenya;Telkom
+545299;Kiribati;Failed Calls
+545999;Kiribati;Fix Line
+54509;Kiribati;FrigateNet
+54501;Kiribati;FrigateNet
+545299;Kiribati;Ocean Link
+22107;Kosovo;D3 mobile
+221299;Kosovo;Failed Calls
+221999;Kosovo;Fix Line
+22102;Kosovo;IPKO
+221299;Kosovo;MTS
+22101;Kosovo;Vala
+419299;Kuwait;Failed Calls
+419999;Kuwait;Fix Line
+41903;Kuwait;Ooredoo
+419299;Kuwait;Virgin Mobile
+41904;Kuwait;Viva
+41902;Kuwait;Zain
+43701;Kyrgyzstan;Beeline
+437299;Kyrgyzstan;Failed Calls
+437999;Kyrgyzstan;Fix Line
+43702;Kyrgyzstan;KT Mobile
+43705;Kyrgyzstan;MegaCom
+43709;Kyrgyzstan;O!
+43710;Kyrgyzstan;Saima
+43703;Kyrgyzstan;Sem Mobile
+45708;Laos;Beeline
+45702;Laos;ETL Mobile
+457299;Laos;Failed Calls
+457999;Laos;Fix Line
+45701;Laos;LTC
+45703;Laos;Unitel
+24705;Latvia;Bite
+247299;Latvia;Failed Calls
+247999;Latvia;Fix Line
+24710;Latvia;LMT
+24701;Latvia;LMT
+247299;Latvia;Premium Numbers
+24702;Latvia;Tele2
+24704;Latvia;Tet
+24703;Latvia;TRIATEL
+24708;Latvia;VENTA Mobile
+24709;Latvia;XOmobile
+41501;Lebanon;Alfa
+415299;Lebanon;Failed Calls
+415999;Lebanon;Fix Line
+41503;Lebanon;Touch
+65102;Lesotho;Econet
+651299;Lesotho;Failed Calls
+651999;Lesotho;Fix Line
+65101;Lesotho;Vodacom
+618299;Liberia;Failed Calls
+618999;Liberia;Fix Line
+61801;Liberia;MTN / Lonestar
+61804;Liberia;Novafone
+61807;Liberia;Orange
+60601;Libya;Al-Madar
+606299;Libya;Failed Calls
+606999;Libya;Fix Line
+60600;Libya;Libyana
+60603;Libya;LibyaPhone Mobile
+29502;Liechtenstein;7acht
+29506;Liechtenstein;CUBIC
+295299;Liechtenstein;Datamobile
+295299;Liechtenstein;Dimoco
+29509;Liechtenstein;EMnify
+295299;Liechtenstein;Failed Calls
+295999;Liechtenstein;Fix Line
+246999;Liechtenstein;Fix Line
+29501;Liechtenstein;FL GSM
+29505;Liechtenstein;FL1
+295299;Liechtenstein;SORACOM
+295299;Liechtenstein;Telna
+24602;Lithuania;Bite
+246299;Lithuania;Failed Calls
+24605;Lithuania;LTG
+24606;Lithuania;Mediafon
+246299;Lithuania;SkyCall
+24603;Lithuania;Tele2
+246299;Lithuania;Teletel
+24601;Lithuania;Telia
+27010;Luxembourg;Blue Communications
+270299;Luxembourg;Bouygues Telecom
+27081;Luxembourg;e-LUX Mobile
+270299;Luxembourg;Eltrona
+270299;Luxembourg;Failed Calls
+270999;Luxembourg;Fix Line
+27005;Luxembourg;Luxembourg Online
+270299;Luxembourg;MTX Connect
+27099;Luxembourg;Orange
+27001;Luxembourg;Post
+27077;Luxembourg;Tango
+45503;Macao;3
+45505;Macao;3
+45502;Macao;China Telecom
+45507;Macao;China Telecom
+45504;Macao;CTM
+45501;Macao;CTM
+455299;Macao;Failed Calls
+455999;Macao;Fix Line
+45506;Macao;SmarTone
+45500;Macao;SmarTone
+64601;Madagascar;Airtel
+646299;Madagascar;Bip
+646299;Madagascar;Failed Calls
+646999;Madagascar;Fix Line
+64602;Madagascar;Orange
+64604;Madagascar;Telma
+65010;Malawi;Airtel
+650299;Malawi;Failed Calls
+650999;Malawi;Fix Line
+65001;Malawi;TNM
+502156;Malaysia;Altel Communications
+50214;Malaysia;Telekom Malaysia
+50211;Malaysia;Telekom Malaysia
+50219;Malaysia;Celcom
+50213;Malaysia;Celcom
+50210;Malaysia;DiGi
+50216;Malaysia;DiGi
+502299;Malaysia;Failed Calls
+502999;Malaysia;Fix Line
+502299;Malaysia;MKN
+50217;Malaysia;Maxis
+50212;Malaysia;Maxis
+502299;Malaysia;Maxis Broadband
+502299;Malaysia;OCESB
+502299;Malaysia;REDtone Mobile
+502299;Malaysia;REDtone
+502299;Malaysia;TT dotCom
+502150;Malaysia;Tune Talk
+50218;Malaysia;U Mobile
+502153;Malaysia;Webe Digital
+502195;Malaysia;XOX Com
+502299;Malaysia;Y-Max
+502152;Malaysia;Yes
+47201;Maldives;DhiMobile
+472299;Maldives;Failed Calls
+472999;Maldives;Fix Line
+47202;Maldives;Ooredoo
+610299;Mali;Failed Calls
+610999;Mali;Fix Line
+61001;Mali;Malitel
+61002;Mali;Orange
+61003;Mali;Telecel
+27801;Malta;Vodafone
+278299;Malta;Failed Calls
+278999;Malta;Fix Line
+27830;Malta;GO Mobile
+27821;Malta;GO Mobile
+27877;Malta;Melita
+551299;Marshall Islands;Failed Calls
+551999;Marshall Islands;Fix Line
+551299;Marshall Islands;MINTA
+60902;Mauritania;Chinguitel
+609299;Mauritania;Failed Calls
+609999;Mauritania;Fix Line
+60901;Mauritania;Mattel
+60910;Mauritania;Mauritel
+61702;Mauritius;Chili
+61703;Mauritius;Chili
+61710;Mauritius;Emtel
+617299;Mauritius;Failed Calls
+617999;Mauritius;Fix Line
+61701;Mauritius;my.t mobile
+647299;Mayotte;Failed Calls
+647999;Mayotte;Fix Line
+64701;Mayotte;Maore Mobile
+64710;Mayotte;SFR
+334140;Mexico;ALTAN Redes
+334299;Mexico;Altcel
+33450;Mexico;AT&T / IUSACell
+334299;Mexico;Failed Call(s)
+334999;Mexico;Fix Line
+334299;Mexico;FreedomPop
+334299;Mexico;Ibo Cell
+334299;Mexico;Maxcom
+334299;Mexico;MegaTel
+33403;Mexico;Movistar
+33430;Mexico;Movistar
+334299;Mexico;NEUS Mobile
+33490;Mexico;Nextel
+33410;Mexico;Nextel
+33401;Mexico;Nextel
+334299;Mexico;QBOcel
+33460;Mexico;SAI PCS
+334299;Mexico;Servitron
+33420;Mexico;Telcel
+33402;Mexico;Telcel
+334299;Mexico;Telecomunicaciones 360
+33480;Mexico;Unefon
+33470;Mexico;Unefon
+550299;Micronesia;Failed Calls
+550999;Micronesia;Fix Line
+55001;Micronesia;FSMTCeLL
+259299;Moldova;Failed Calls
+25902;Moldova;Moldcell
+25901;Moldova;Orange
+25903;Moldova;Unite
+25905;Moldova;Unite
+25999;Moldova;Unite
+212299;Monaco;Failed Calls
+212999;Monaco;Fix Line
+21210;Monaco;Monaco Telecom
+21201;Monaco;Monaco Telecom
+428299;Mongolia;Failed Calls
+428999;Mongolia;Fix Line
+42898;Mongolia;G-Mobile
+42899;Mongolia;Mobicom
+42800;Mongolia;Skytel
+42888;Mongolia;Unitel
+297299;Montenegro;Failed Calls
+297999;Montenegro;Fix Line
+29703;Montenegro;Mtel
+29702;Montenegro;Telekom / T-mobile
+29701;Montenegro;Telenor
+354299;Montserrat;Digicel
+354299;Montserrat;Failed Calls
+354999;Montserrat;Fix Line
+354860;Montserrat;Flow
+604299;Morocco;Failed Calls
+604999;Morocco;Fix Line
+60401;Morocco;IAM
+60402;Morocco;inwi
+60405;Morocco;inwi
+60400;Morocco;Orange
+643299;Mozambique;Failed Calls
+643999;Mozambique;Fix Line
+64303;Mozambique;Movitel
+64301;Mozambique;TMCEL
+64304;Mozambique;Vodacom
+414999;Myanmar;Failed Calls
+414999;Myanmar;Fix Line
+41403;Myanmar;MecTel
+41401;Myanmar;MPT
+41400;Myanmar;MPT
+41409;Myanmar;Mytel
+41405;Myanmar;Ooredoo
+41406;Myanmar;Telenor
+649299;Namibia;Demshi
+649299;Namibia;Failed Calls
+649999;Namibia;Fix Line
+64901;Namibia;MTC
+64903;Namibia;TN Mobile
+53602;Nauru;Digicel
+536299;Nauru;Failed Calls
+536999;Nauru;Fix Line
+429299;Nepal;CG Telecom
+429299;Nepal;Failed Calls
+429999;Nepal;Fix Line
+42903;Nepal;Hello Nepal
+42902;Nepal;Ncell
+42901;Nepal;Nepal Telecom
+42904;Nepal;Smart
+42900;Nepal;UTL
+204299;Netherlands;88 mobile
+204299;Netherlands;AGMS
+20430;Netherlands;ASPIDER Solutions
+204299;Netherlands;Belcentrale
+204299;Netherlands;BodyTrace
+204299;Netherlands;Combird Mobile
+204299;Netherlands;Dean Mobile
+204299;Netherlands;Eazit
+20405;Netherlands;ElephantTalk
+204299;Netherlands;EziMobile
+204299;Netherlands;Failed Calls
+204999;Netherlands;Fix Line
+204999;Netherlands;Fix Line
+204299;Netherlands;interactive digital media / IDM
+20400;Netherlands;Intovoice
+204299;Netherlands;KeenMobile
+20423;Netherlands;KORE
+20469;Netherlands;KPN
+20412;Netherlands;KPN
+20408;Netherlands;KPN
+20410;Netherlands;KPN
+20427;Netherlands;L-mobi
+20498;Netherlands;Lancelot
+20428;Netherlands;Lancelot
+20409;Netherlands;Lycamobile
+20463;Netherlands;MessageBird
+204299;Netherlands;mGage
+204299;Netherlands;Motto
+20407;Netherlands;Move / Teleena
+204299;Netherlands;Okta8
+204299;Netherlands;Premium Numbers
+204299;Netherlands;Premium Routing
+20424;Netherlands;Private Mobility
+20421;Netherlands;ProRail
+204299;Netherlands;Redworks
+20426;Netherlands;SpeakUp
+20420;Netherlands;T-Mobile
+20402;Netherlands;T-Mobile
+20416;Netherlands;T-Mobile
+20429;Netherlands;Tismi
+20433;Netherlands;Truphone
+204299;Netherlands;Vectone Mobile
+20404;Netherlands;Vodafone
+20403;Netherlands;Voiceworks Mobile
+20415;Netherlands;Ziggo
+20418;Netherlands;Ziggo Services
+36291;Netherlands Antilles;Chippie
+36269;Netherlands Antilles;Digicel
+362299;Netherlands Antilles;Failed Calls
+362999;Netherlands Antilles;Fix Line
+362299;Netherlands Antilles;Premium Numbers
+36251;Netherlands Antilles;TelCell
+546299;New Caledonia;Failed Calls
+546999;New Caledonia;Fix Line
+54601;New Caledonia;Mobilis
+53024;New Zealand;2degrees
+530299;New Zealand;Compass Mobile
+530299;New Zealand;Devoli
+530299;New Zealand;Failed Calls
+530999;New Zealand;Fix Line
+530299;New Zealand;LinkTel
+53006;New Zealand;Skinny Mobile
+53002;New Zealand;Spark Mobile
+53005;New Zealand;Spark Mobile
+530299;New Zealand;Symbio
+530299;New Zealand;Vocus
+53001;New Zealand;Vodafone
+530299;New Zealand;Voxbone / Bandwidth
+530299;New Zealand;Voyager Internet
+530299;New Zealand;WXC
+71073;Nicaragua;Claro
+71021;Nicaragua;Claro
+710299;Nicaragua;CooTel
+710299;Nicaragua;Failed Calls
+710999;Nicaragua;Fix Line
+71030;Nicaragua;Movistar
+61402;Niger;Airtel
+614299;Niger;Failed Calls
+614999;Niger;Fix Line
+61403;Niger;Moov
+61401;Niger;Niger Telecoms
+61404;Niger;Orange
+62160;Nigeria;9mobile
+62120;Nigeria;Airtel
+621299;Nigeria;Alpha Technologies
+621299;Nigeria;Failed Calls
+621999;Nigeria;Fix Line
+62150;Nigeria;Glo Mobile
+62130;Nigeria;MTN
+62140;Nigeria;ntel
+62127;Nigeria;Smile
+621299;Nigeria;Zodafones
+555299;Niue;Failed Calls
+555999;Niue;Fix Line
+55501;Niue;Telecom Niue
+467299;North Korea;Failed Calls
+467999;North Korea;Fix Line
+467299;North Korea;Kangsung Net
+467192;North Korea;Koryolink
+29403;North Macedonia;A1
+29402;North Macedonia;A1
+294299;North Macedonia;Failed Calls
+259999;North Macedonia;Fix Line
+294999;North Macedonia;Fix Line
+294299;North Macedonia;LATRON
+29404;North Macedonia;Lycamobile
+29411;North Macedonia;Mobik
+294299;North Macedonia;Telekabel
+29401;North Macedonia;Telekom
+534299;Northern Mariana Islands;Failed Calls
+534999;Northern Mariana Islands;Fix Line
+24222;Norway;Altibox Mobil
+24221;Norway;BANE NOR
+24220;Norway;BANE NOR
+242299;Norway;bigblu
+242299;Norway;Chilimobil
+24209;Norway;Com4
+24215;Norway;eRate
+242299;Norway;Failed Calls
+242999;Norway;Fix Line
+242299;Norway;GlobalConnect
+242299;Norway;
+24214;Norway;ICE
+242299;Norway;intility
+24216;Norway;Iristel
+242299;Norway;JetNett
+24223;Norway;Lycamobile
+24205;Norway;Network Norway
+242299;Norway;NextGenTel
+24210;Norway;Nkom
+242299;Norway;Nodnett
+24206;Norway;ICE
+242299;Norway;Puzzel
+242299;Norway;Sierra Wireless
+242299;Norway;Svea
+242299;Norway;Telavox
+24212;Norway;Telenor
+24201;Norway;Telenor
+24202;Norway;Telia / NetCom
+24208;Norway;Telia / NetCom
+242299;Norway;unifon
+422299;Oman;Failed Calls
+422999;Oman;Fix Line
+42202;Oman;Omantel Mobile
+42203;Oman;Ooredoo / Nawras
+410299;Pakistan;Failed Calls
+410999;Pakistan;Fix Line
+41007;Pakistan;Jazz
+41001;Pakistan;Jazz
+41005;Pakistan;SCOM
+41006;Pakistan;Telenor
+41003;Pakistan;Ufone
+410299;Pakistan;Warid
+41004;Pakistan;Zong
+552299;Palau;Failed Calls
+552999;Palau;Fix Line
+55299;Palau;Palau Mobile
+55201;Palau;PalauCel
+55202;Palau;PT Waves
+425299;Palestinian Territory;Failed Calls
+425999;Palestinian Territory;Fix Line
+42505;Palestinian Territory;Jawwal
+42506;Palestinian Territory;Ooredoo
+71401;Panama;#NAZWA?
+71403;Panama;Claro
+71404;Panama;Digicel
+714299;Panama;Failed Calls
+714999;Panama;Fix Line
+71402;Panama;Movistar
+71420;Panama;Movistar
+53701;Papua New Guinea;BeMobile Vodafone
+53702;Papua New Guinea;Citifon
+53703;Papua New Guinea;Digicel
+537299;Papua New Guinea;DIGIVOIP
+537299;Papua New Guinea;Failed Calls
+537999;Papua New Guinea;Fix Line
+74402;Paraguay;Claro
+744299;Paraguay;Failed Calls
+744999;Paraguay;Fix Line
+74403;Paraguay;Personal
+74404;Paraguay;Tigo
+74401;Paraguay;VOX
+71670;Peru;Claro
+71620;Peru;Claro
+71610;Peru;Claro
+716299;Peru;Dolphin
+71617;Peru;Entel
+716299;Peru;Failed Calls
+716999;Peru;Fix Line
+71606;Peru;Movistar
+71607;Peru;Entel
+71630;Peru;Tuyo
+71615;Peru;Viettel
+51566;Philippines;DITO
+515299;Philippines;Failed Calls
+515999;Philippines;Fix Line
+51501;Philippines;Globe
+51502;Philippines;Globe
+51503;Philippines;Smart
+51505;Philippines;Sun Cellular
+260299;Poland;3S
+26015;Poland;Aero2
+26004;Poland;Aero2
+26017;Poland;Aero2
+26016;Poland;Aero2
+26048;Poland;Agile Telecom
+26018;Poland;AMD Telecom
+260299;Poland;Benemen
+260299;Poland;BSG
+260299;Poland;Caritas Laczy
+260299;Poland;Cludo
+26032;Poland;Compatel
+26012;Poland;Cyfrowy Polsat
+260299;Poland;e-Telko
+26041;Poland;EZ Mobile
+260299;Poland;Failed Calls
+260999;Poland;Fix Line
+260299;Poland;I.M. Consulting
+260299;Poland;Inea
+260299;Poland;IZZI
+260299;Poland;JMDI J. Maleszko
+260299;Poland;Klucz Mobile
+260299;Poland;lajt mobile
+260299;Poland;LoVo
+26009;Poland;Lycamobile
+26049;Poland;Messagebird
+260299;Poland;Metro Mobile
+260299;Poland;Mobile Vikings
+260299;Poland;Mobiledata
+26042;Poland;MobiWeb
+260299;Poland;Moja GSM
+26013;Poland;Move
+260299;Poland;multiMOBILE
+260299;Poland;Nasza Wizja
+260299;Poland;NAU Mobile
+260299;Poland;nc+ Mobile
+26019;Poland;NetBalt
+26007;Poland;Netia
+260299;Poland;Next Mobile
+260299;Poland;NIMBOW
+26027;Poland;Ntel Solutions
+26005;Poland;Orange
+26003;Poland;Orange
+26035;Poland;PKP
+26098;Poland;Play
+26006;Poland;Play
+26011;Poland;Plus
+26001;Poland;Plus
+26097;Poland;Politechnika Lodzka Uczelniane
+26090;Poland;Polska Spolka Gazownictwa
+260299;Poland;Polvoice
+260299;Poland;Pomagacz
+260299;Poland;Premium Mobile
+260299;Poland;Premium Numbers
+260299;Poland;SAT FILM
+26014;Poland;Move
+260299;Poland;SGT
+26047;Poland;SMSHIGHWAY
+260299;Poland;Softelnet
+26002;Poland;T-Mobile
+26010;Poland;T-Mobile
+26034;Poland;T-Mobile
+26014;Poland;Telco Leaders
+260299;Poland;Tele GO
+260299;Poland;TeleCube
+260299;Poland;Telenabler
+260299;Poland;TELGAM
+26020;Poland;Tismi
+260299;Poland;TOYAmobilna
+26022;Poland;Twilio
+260299;Poland;UPC
+260299;Poland;Vectra
+26045;Poland;Virgin Mobile
+26045;Poland;Virgin Mobile
+260299;Poland;Vonage
+26039;Poland;Voxbone / Bandwidth
+260299;Poland;w naszej Rodzinie
+268299;Portugal;Failed Calls
+268999;Portugal;Fix Line
+26804;Portugal;Lycamobile
+26806;Portugal;MEO
+26880;Portugal;MEO
+26808;Portugal;MEO
+26803;Portugal;NOS
+26893;Portugal;NOS
+268299;Portugal;NOWO
+268299;Portugal;Oni
+410299;Portugal;Premium Numbers
+26891;Portugal;Vodafone
+26801;Portugal;Vodafone
+33030;Puerto Rico;AT&T Mobility
+33011;Puerto Rico;Claro
+330110;Puerto Rico;Claro
+330299;Puerto Rico;Failed Calls
+330999;Puerto Rico;Fix Line
+330490;Puerto Rico;T-Mobile
+427299;Qatar;Failed Calls
+427999;Qatar;Fix Line
+42701;Qatar;Ooredoo
+42706;Qatar;Ooredoo
+42702;Qatar;Vodafone
+647299;Reunion;Failed Calls
+647999;Reunion;Fix Line
+64703;Reunion;Only
+64702;Reunion;Only
+64700;Reunion;Orange
+64704;Reunion;ZEOP Mobile
+22605;Romania;Digi Mobil
+226299;Romania;Failed Calls
+226999;Romania;Fix Line
+226299;Romania;Iristel
+22616;Romania;Lycamobile
+22610;Romania;Orange
+22602;Romania;Telekom
+22603;Romania;Telekom
+22601;Romania;Vodafone
+250299;Russia;Antares
+250299;Russia;Arktur
+250299;Russia;Astran
+250299;Russia;ASVT
+250299;Russia;Aurora Telecom
+25099;Russia;Beeline
+250299;Russia;Beliton
+250299;Russia;BIT-CENTR
+250299;Russia;Center 2M
+250299;Russia;Cifra 1
+250299;Russia;CountryCom
+250299;Russia;ECO Networks
+250299;Russia;Elemte
+250299;Russia;ER-Telecom
+250299;Russia;Failed Calls
+250999;Russia;Fix Line
+250299;Russia;Gazprom Telecom
+25048;Russia;Global Telecom
+25055;Russia;Glonass
+250299;Russia;GLONASS MOBILE
+250299;Russia;Integral
+250299;Russia;Internod
+250299;Russia;Intersvyaz-2
+25034;Russia;Krymtelecom
+250299;Russia;KvatroPlus
+250299;Russia;Lardex
+25054;Russia;Letai Mobile
+250299;Russia;Lycamobile
+25057;Russia;Matrix Mobile
+250299;Russia;Media-Market
+25002;Russia;Megafon
+250299;Russia;Metro-Pei
+250299;Russia;MGTS
+250299;Russia;Miatel
+250299;Russia;MOSTELECOM
+25035;Russia;Motiv
+250299;Russia;MSN Telekom
+25001;Russia;MTS
+25042;Russia;MTT
+250299;Russia;NCI
+250299;Russia;NETBYNET
+250299;Russia;New Mobile Communications
+250299;Russia;OBIT
+250299;Russia;Orange Business Services
+250299;Russia;PIN
+250299;Russia;Plintron
+250299;Russia;Quantech
+250299;Russia;RECONN
+250299;Russia;Reteyl Innovatsii
+250299;Russia;Sberbank-Telecom
+25033;Russia;SEVTELECOM
+250299;Russia;Sim Sim
+250299;Russia;Sintonik
+250299;Russia;Sky Networks
+25009;Russia;Skylink
+250299;Russia;SkyNet
+250299;Russia;Sonet
+250299;Russia;Sprint
+250299;Russia;Start
+250299;Russia;SunSIM
+250299;Russia;Surgutneftegaz
+250299;Russia;Svyazresurs-Mobile
+250299;Russia;Tander
+25012;Russia;Tele2
+25020;Russia;Tele2
+250299;Russia;Tinkoff Mobile
+250299;Russia;TMT
+250299;Russia;TransMobilCom
+250299;Russia;TRASTEL
+250299;Russia;TRN-telecom
+250299;Russia;TTK
+250299;Russia;TTK-Svyaz
+250299;Russia;TVE
+250299;Russia;UnitTelecom
+250299;Russia;Unycel
+250299;Russia;Vainah Telecom
+250299;Russia;ViKom
+250299;Russia;Virgin Connect
+250299;Russia;Voentelecom
+25077;Russia;Glonass
+25060;Russia;Volna Mobile
+250299;Russia;VTB Mobile
+25032;Russia;Win Mobile
+25011;Russia;Yota
+63513;Rwanda;Airtel
+635299;Rwanda;Failed Calls
+635999;Rwanda;Fix Line
+63510;Rwanda;MTN
+658299;Saint Helena and Ascension and Tristan da Cunha;Failed Calls
+658999;Saint Helena and Ascension and Tristan da Cunha;Fix Line
+35670;Saint Kitts and Nevis;Chippie
+35670;Saint Kitts and Nevis;Chippie
+35650;Saint Kitts and Nevis;Digicel
+35650;Saint Kitts and Nevis;Digicel
+356299;Saint Kitts and Nevis;Failed Calls
+356999;Saint Kitts and Nevis;Fix Line
+356110;Saint Kitts and Nevis;Flow
+35611;Saint Kitts and Nevis;Flow
+356299;Saint Kitts and Nevis;The Cable
+35805;Saint Lucia;Digicel
+35850;Saint Lucia;Digicel
+358299;Saint Lucia;Failed Calls
+358999;Saint Lucia;Fix Line
+358110;Saint Lucia;Flow
+35811;Saint Lucia;Flow
+30803;Saint Pierre and Miquelon;Ameris
+30801;Saint Pierre and Miquelon;Ameris
+308299;Saint Pierre and Miquelon;Failed Calls
+308999;Saint Pierre and Miquelon;Fix Line
+30802;Saint Pierre and Miquelon;Globaltel
+36050;Saint Vincent and the Grenadines;Digicel
+360299;Saint Vincent and the Grenadines;Failed Calls
+360999;Saint Vincent and the Grenadines;Fix Line
+360110;Saint Vincent and the Grenadines;Flow
+54927;Samoa;BlueSky
+54901;Samoa;Digicel
+549299;Samoa;Failed Calls
+549999;Samoa;Fix Line
+292299;San Marino;Failed Calls
+292999;San Marino;Fix Line
+29201;San Marino;Prima
+292299;San Marino;TeleneT
+62601;Sao Tome and Principe;CSTmovel
+626299;Sao Tome and Principe;Failed Calls
+626999;Sao Tome and Principe;Fix Line
+62602;Sao Tome and Principe;Unitel
+901299;Satellite Networks;Failed Calls
+901999;Satellite Networks;Fix Line
+420299;Saudi Arabia;Failed Calls
+420999;Saudi Arabia;Fix Line
+42006;Saudi Arabia;Lebara Mobile
+42003;Saudi Arabia;Mobily
+420299;Saudi Arabia;Red Bull MOBILE
+420299;Saudi Arabia;Salam
+42001;Saudi Arabia;STC / Al Jawal
+42005;Saudi Arabia;Virgin Mobile
+42004;Saudi Arabia;Zain
+608299;Senegal;2s Mobile
+60803;Senegal;Expresso
+608299;Senegal;Failed Calls
+608999;Senegal;Fix Line
+60802;Senegal;Free
+60804;Senegal;HAYO
+60801;Senegal;Orange
+608299;Senegal;Promobile
+220299;Serbia;Failed Calls
+220999;Serbia;Fix Line
+22011;Serbia;Globaltel
+22003;Serbia;MTS
+22001;Serbia;Telenor
+22005;Serbia;VIP
+22020;Serbia;VIP
+63310;Seychelles;Airtel
+63301;Seychelles;Cable & Wireless
+633299;Seychelles;Failed Calls
+633999;Seychelles;Fix Line
+63305;Seychelles;Intelvision
+61903;Sierra Leone;Africell
+619299;Sierra Leone;Failed Calls
+619999;Sierra Leone;Fix Line
+619299;Sierra Leone;IPTel
+619299;Sierra Leone;Onlime
+61901;Sierra Leone;Orange
+61907;Sierra Leone;Qcell
+619299;Sierra Leone;SierraTel
+52509;Singapore;Circles.Life
+525299;Singapore;Failed Calls
+525999;Singapore;Fix Line
+52512;Singapore;GRID
+52511;Singapore;M1
+52503;Singapore;M1
+525299;Singapore;MyRepublic
+525299;Singapore;Nexwave
+525299;Singapore;redONE
+52507;Singapore;SingTel
+52502;Singapore;SingTel
+52501;Singapore;SingTel
+525299;Singapore;Smart Pinoy
+52506;Singapore;Starhub
+52508;Singapore;Starhub
+52505;Singapore;Starhub
+52510;Singapore;TPG Telecom
+525299;Singapore;VivoBee
+525299;Singapore;Zero1
+231299;Slovakia;Failed Calls
+231999;Slovakia;Fix Line
+23106;Slovakia;O2
+23101;Slovakia;Orange
+23105;Slovakia;Orange
+23107;Slovakia;Orange
+23103;Slovakia;Swan / 4ka
+23102;Slovakia;Telekom
+23104;Slovakia;Telekom
+23150;Slovakia;Telekom
+23108;Slovakia;Uniphone
+231299;Slovakia;Vonage
+23199;Slovakia;ZSR
+29340;Slovenia;A1 / Si.mobil
+29320;Slovenia;Compatel
+29386;Slovenia;Elektro Gorenjska
+293299;Slovenia;Failed Calls
+293999;Slovenia;Fix Line
+293299;Slovenia;HOT mobil
+293299;Slovenia;Me2
+29341;Slovenia;Mobitel
+293299;Slovenia;Novatel
+29310;Slovenia;Slovenske zeleznice
+293299;Slovenia;SoftNET
+29364;Slovenia;T-2
+29370;Slovenia;Telemach / Tusmobil
+54002;Solomon Islands;bemobile
+54001;Solomon Islands;Breeze
+540299;Solomon Islands;Failed Calls
+540999;Solomon Islands;Fix Line
+540299;Solomon Islands;Satsol
+540299;Solomon Islands;Smile
+637299;Somalia;AirSom
+637299;Somalia;Failed Calls
+637999;Somalia;Fix Line
+63730;Somalia;Golis
+63719;Somalia;Hormuud
+63710;Somalia;Nationlink
+637299;Somalia;NETCO
+63770;Somalia;Onkod
+63704;Somalia;Somafone
+637299;Somalia;SomNetworks
+63771;Somalia;Somtel
+637299;Somalia;STG
+63782;Somalia;Telcom Mobile
+63701;Somalia;Telesom
+65507;South Africa;Cell C
+655299;South Africa;Failed Calls
+655999;South Africa;Fix Line
+655299;South Africa;Lycamobile
+65510;South Africa;MTN
+65512;South Africa;MTN
+65574;South Africa;Rain
+65519;South Africa;Rain
+65573;South Africa;Rain
+65538;South Africa;Rain
+65505;South Africa;Telkom
+65502;South Africa;Telkom
+655299;South Africa;Virgin Mobile
+65501;South Africa;Vodacom
+450299;South Korea;Failed Calls
+450999;South Korea;Fix Line
+45007;South Korea;KT Powertel
+45006;South Korea;LG U+
+45008;South Korea;olleh / KT
+45002;South Korea;olleh / KT
+45004;South Korea;olleh / KT
+45005;South Korea;SK Telecom
+45012;South Korea;SK Telecom
+45011;South Korea;SK Telecom
+659299;South Sudan;Digitel
+659299;South Sudan;Failed Calls
+659999;South Sudan;Fix Line
+65902;South Sudan;MTN
+65906;South Sudan;Zain
+214299;Spain;ACN
+214299;Spain;Adamo Telecom
+21436;Spain;Alai
+21402;Spain;Alta Tecnologia en Comunicacions
+214299;Spain;Aurea
+21414;Spain;Avatel Movil
+214299;Spain;Billing Financial
+214299;Spain;Bluephone
+214299;Spain;CloudComms
+214299;Spain;Dialoga
+21422;Spain;Digi.Mobil
+214299;Spain;Dragonet
+21408;Spain;Euskaltel Movil
+214299;Spain;Evolutio
+214299;Spain;Failed Calls
+214999;Spain;Fix Line
+214299;Spain;Global
+214299;Spain;GNET
+21434;Spain;ION MOBILE
+214299;Spain;Jetnet
+214299;Spain;Lemonvil
+21425;Spain;Lycamobile
+21417;Spain;mobil R
+21438;Spain;Movistar
+21407;Spain;Movistar
+21405;Spain;Movistar
+214299;Spain;Olephone
+214299;Spain;On Movil
+214299;Spain;Oniti Telecom
+214299;Spain;OperadorsCat
+21421;Spain;Orange
+21409;Spain;Orange
+21403;Spain;Orange
+214299;Spain;Pepephone
+214299;Spain;Premium Numbers
+214299;Spain;PTV Telecom movil
+214299;Spain;Quattre
+214299;Spain;Sarenet
+214299;Spain;SEWAN
+21419;Spain;Simyo
+21435;Spain;SUMA movil
+214299;Spain;Suop
+214299;Spain;Syma
+21416;Spain;mobil R
+214299;Spain;Telsome
+214299;Spain;The Telecom Boutique
+21427;Spain;Truphone
+21412;Spain;Venus Movil
+21401;Spain;Vodafone
+21437;Spain;Vodafone
+21406;Spain;Vodafone
+21423;Spain;Yoigo
+21433;Spain;Yoigo
+21429;Spain;Yoigo
+21404;Spain;Yoigo
+214299;Spain;You Mobile
+21410;Spain;Zinnia
+41305;Sri Lanka;Airtel
+41302;Sri Lanka;Dialog
+413299;Sri Lanka;Failed Calls
+413999;Sri Lanka;Fix Line
+41308;Sri Lanka;Hutch
+41301;Sri Lanka;Mobitel
+634299;Sudan;Failed Calls
+634999;Sudan;Fix Line
+63403;Sudan;MTN
+63402;Sudan;MTN
+63407;Sudan;Sudani One
+63401;Sudan;Zain
+63406;Sudan;Zain
+74603;Suriname;Digicel
+746299;Suriname;Failed Calls
+746999;Suriname;Fix Line
+74602;Suriname;Telesur
+65302;Swaziland;Eswatini Mobile
+65301;Swaziland;EswatiniTelecom
+653299;Swaziland;Failed Calls
+653999;Swaziland;Fix Line
+65310;Swaziland;Swazi MTN
+24016;Sweden;
+24035;Sweden;42 Telecom
+24013;Sweden;A3
+240299;Sweden;Advoco
+240299;Sweden;
+240299;Sweden;Allo Telecom
+240299;Sweden;Bahnhof
+240299;Sweden;Benemen
+240299;Sweden;Biztel
+240299;Sweden;BM Sverige
+240299;Sweden;Bredband 2
+240299;Sweden;Bredbandsson
+240299;Sweden;BSG
+240299;Sweden;Chilimobil
+24011;Sweden;Com Hem
+24009;Sweden;Com4
+24032;Sweden;Compatel
+240299;Sweden;Connectel
+240299;Sweden;Core Telecom
+240299;Sweden;easy pbx
+240299;Sweden;EasyTelecom
+24022;Sweden;EUtel
+240299;Sweden;Failed Calls
+240299;Sweden;Fastcom
+240299;Sweden;Febo Telecom
+240299;Sweden;Fello
+240299;Sweden;Fibio
+24063;Sweden;Fink Telecom
+240299;Sweden;Firstcom
+240999;Sweden;Fix Line
+240299;Sweden;Fonia
+24018;Sweden;Messit / Minicall
+240299;Sweden;Global Telefoni
+240299;Sweden;GlobalConnect
+24027;Sweden;Globetouch
+24017;Sweden;Gotanet
+24002;Sweden;3
+240299;Sweden;Horisen
+240299;Sweden;iCentrex
+24023;Sweden;Infobip
+240299;Sweden;InfraCom
+24036;Sweden;interactive digital media / IDM
+240299;Sweden;Ipify
+240299;Sweden;Junyverse
+240299;Sweden;Karma Mobil
+240299;Sweden;Lancelot
+24028;Sweden;LINK Mobility
+240299;Sweden;Loxysoft
+24012;Sweden;Lycamobile
+240299;Sweden;Maingate
+240299;Sweden;Megaphone
+240299;Sweden;MessageBird
+24029;Sweden;MI Carrier Services
+240299;Sweden;miniTel
+240299;Sweden;Mitto
+24033;Sweden;Mobile Arts
+24043;Sweden;MobiWeb
+240299;Sweden;Molnstruktur
+24025;Sweden;Monty Mobile
+240299;Sweden;My Beat
+240299;Sweden;Net at Once
+24040;Sweden;Netmore
+240299;Sweden;Netsize
+240299;Sweden;onoff
+240299;Sweden;Bixia AB
+240299;Sweden;Premium Numbers
+24039;Sweden;Primlight
+24031;Sweden;Rebtel
+24020;Sweden;Sierra Wireless
+24015;Sweden;
+24037;Sweden;Sinch
+240299;Sweden;soatso
+240299;Sweden;Soluno
+24045;Sweden;Spirius
+240299;Sweden;SSTNet
+240299;Sweden;Svea Billing Services
+240299;Sweden;Svensk Konsumentmobil
+240299;Sweden;TelaVox
+24014;Sweden;Tele2
+24005;Sweden;Tele2
+24007;Sweden;Tele2
+240299;Sweden;Telecom3 Sverige AB
+240299;Sweden;Teledigit Scandinavia AB
+240299;Sweden;Telekometen
+24044;Sweden;Telenabler
+24042;Sweden;Telenor Connexion
+24004;Sweden;Telenor
+24008;Sweden;Telenor
+24001;Sweden;Telia
+240299;Sweden;Tell it to Mi
+240299;Sweden;Telness
+24003;Sweden;Net 1
+24048;Sweden;Tismi
+240299;Sweden;Tolv Mobil
+24021;Sweden;Trafikverket
+24026;Sweden;Twilio
+240299;Sweden;Unicorn Telecom
+24019;Sweden;Vectone Mobile
+240299;Sweden;Verbal
+24046;Sweden;Viahub
+24047;Sweden;Viatel
+240299;Sweden;Vobbiz
+240299;Sweden;Voice Integrate
+240299;Sweden;Voicetech
+24038;Sweden;Voxbone / Bandwidth
+240299;Sweden;Weelia
+240299;Sweden;Wifi.se
+240299;Sweden;Wifog Sverige
+240299;Sweden;XPLORA
+22858;Switzerland;Beeone
+22809;Switzerland;Comfone
+22805;Switzerland;Comfone
+228999;Switzerland;Fix Line
+22866;Switzerland;Inovia
+22854;Switzerland;Lycamobile
+22869;Switzerland;MTEL
+22865;Switzerland;Nexphone
+22851;Switzerland;relario
+22803;Switzerland;Salt Mobile
+22806;Switzerland;SBB
+22802;Switzerland;Sunrise
+22808;Switzerland;Sunrise
+22853;Switzerland;Sunrise
+22860;Switzerland;Sunrise
+22807;Switzerland;Sunrise
+22812;Switzerland;Sunrise
+22801;Switzerland;Swisscom
+22862;Switzerland;Telecom26
+22870;Switzerland;Tismi
+22859;Switzerland;Vectone Mobile
+417299;Syria;Failed Calls
+417999;Syria;Fix Line
+41702;Syria;MTN
+41701;Syria;Syriatel
+46612;Taiwan;APT
+46605;Taiwan;APT
+46611;Taiwan;Chunghwa Telecom
+46692;Taiwan;Chunghwa Telecom
+466299;Taiwan;Failed Calls
+46603;Taiwan;Far EasTone
+46688;Taiwan;Far EasTone
+46601;Taiwan;Far EasTone
+466999;Taiwan;Fix Line
+46689;Taiwan;T Star
+46697;Taiwan;Taiwan Mobile
+43604;Tajikistan;Babilon-Mobile
+43605;Tajikistan;Beeline
+436299;Tajikistan;Failed Calls
+436999;Tajikistan;Fix Line
+43603;Tajikistan;Megafon
+436299;Tajikistan;Premium Numbers
+43601;Tajikistan;Tcell
+43602;Tajikistan;Tcell
+64005;Tanzania;Airtel
+640299;Tanzania;Failed Calls
+640999;Tanzania;Fix Line
+64009;Tanzania;Halotel / Viettel
+64099;Tanzania;Mkulima African Telecommunication
+64014;Tanzania;MO Mobile
+64011;Tanzania;Smile Communications
+64007;Tanzania;Tanzania Telecommunication Corporation
+64002;Tanzania;Tigo / MIC
+64004;Tanzania;Vodacom
+64013;Tanzania;WiAfrica
+64003;Tanzania;Zanzibar Telecom / Zantel
+52001;Thailand;AIS
+52003;Thailand;AIS
+52018;Thailand;dtac
+52005;Thailand;dtac TriNet
+520299;Thailand;Failed Calls
+520999;Thailand;Fix Line
+52000;Thailand;my
+52015;Thailand;TOTmobile
+52047;Thailand;TOTmobile
+52004;Thailand;TrueMove H
+61503;Togo;Atlantique Telecom / Moov
+615299;Togo;Failed Calls
+615999;Togo;Fix Line
+61501;Togo;Togo Cellulaire / TogoCel
+53943;Tonga;Digicel
+53988;Tonga;Digicel
+539299;Tonga;Failed Calls
+539999;Tonga;Fix Line
+53901;Tonga;U-Call
+539299;Tonga;WanTok
+37412;Trinidad and Tobago;bmobile
+374130;Trinidad and Tobago;Digicel
+374299;Trinidad and Tobago;Failed Calls
+374999;Trinidad and Tobago;Fix Line
+605299;Tunisia;Failed Calls
+605999;Tunisia;Fix Line
+60506;Tunisia;Lycamobile
+60503;Tunisia;Ooredoo
+60501;Tunisia;Orange
+60502;Tunisia;TT Mobile
+286299;Turkiye;Asistan Telekom
+28603;Turkiye;Avea
+28604;Turkiye;Avea
+286299;Turkiye;BasakCell
+286299;Turkiye;Compatel
+286299;Turkiye;Fenix Telekom
+286999;Turkiye;Fix Line
+286299;Turkiye;Foniva
+286299;Turkiye;IsNet
+286299;Turkiye;Maxiphone
+286299;Turkiye;Medium Telekom
+286299;Turkiye;Mobilisim
+286299;Turkiye;Netgsm
+286299;Turkiye;Nida
+286299;Turkiye;Oris
+286299;Turkiye;Pelicell
+286299;Turkiye;Plus Telekom
+286299;Turkiye;Roitel
+286299;Turkiye;SesNet
+286299;Turkiye;TCDD
+286299;Turkiye;TTM
+28601;Turkiye;Turkcell
+28602;Turkiye;Vodafone
+43801;Turkmenistan;MTS
+438299;Turkmenistan;Failed Calls
+438999;Turkmenistan;Fix Line
+43802;Turkmenistan;TMCELL
+376360;Turks and Caicos Islands;Digicel
+37650;Turks and Caicos Islands;Digicel
+376299;Turks and Caicos Islands;Failed Calls
+376999;Turks and Caicos Islands;Fix Line
+376350;Turks and Caicos Islands;Flow
+553299;Tuvalu;Failed Calls
+553999;Tuvalu;Fix Line
+55301;Tuvalu;Tuvalu Telecom
+64122;Uganda;Airtel
+64101;Uganda;Airtel
+641299;Uganda;Failed Calls
+641999;Uganda;Fix Line
+64104;Uganda;Lycamobile
+64111;Uganda;Mango
+64110;Uganda;MTN
+64133;Uganda;Smile
+25507;Ukraine;3Mob
+255299;Ukraine;Failed Calls
+255999;Ukraine;Fix Line
+25504;Ukraine;IT
+25502;Ukraine;Kyivstar
+25503;Ukraine;Kyivstar
+25506;Ukraine;lifecell
+25521;Ukraine;PEOPLEnet
+25599;Ukraine;Phoenix
+25501;Ukraine;Vodafone
+42403;United Arab Emirates;DU
+42402;United Arab Emirates;Etisalat
+424299;United Arab Emirates;Failed Calls
+424999;United Arab Emirates;Fix Line
+23478;United Kingdom;Airwave
+23429;United Kingdom;aql
+23476;United Kingdom;BT Group
+23400;United Kingdom;BT Group
+23408;United Kingdom;BT OnePhone
+23418;United Kingdom;Cloud9
+23430;United Kingdom;T-Mobile
+23432;United Kingdom;T-Mobile
+23431;United Kingdom;T-Mobile
+234999;United Kingdom;Fix Line
+23417;United Kingdom;FlexTel
+23404;United Kingdom;FMS Solutions
+23439;United Kingdom;Gamma Mobile
+23424;United Kingdom;Greenfone
+23472;United Kingdom;Hanhaa Mobile
+23471;United Kingdom;Home Office
+23420;United Kingdom;3
+23494;United Kingdom;3
+23423;United Kingdom;Icron Network
+23403;United Kingdom;Jersey Airtel
+23435;United Kingdom;JSC Ingenicum
+23450;United Kingdom;JT Mobile
+23414;United Kingdom;LINK Mobility
+23426;United Kingdom;Lycamobile
+23458;United Kingdom;Manx Telecom Mobile
+23428;United Kingdom;Marathon Telecom
+23475;United Kingdom;Mass Response Service GmbH
+23456;United Kingdom;NCSC
+23495;United Kingdom;Network Rail
+23412;United Kingdom;Network Rail
+23413;United Kingdom;Network Rail
+23451;United Kingdom;now broadband
+23434;United Kingdom;Orange
+23433;United Kingdom;Orange
+23474;United Kingdom;Pareteum
+23457;United Kingdom;Sky
+23440;United Kingdom;spusu
+23455;United Kingdom;Sure Guernsey
+23436;United Kingdom;Sure Isle of Man
+23499;United Kingdom;Sure Jersey
+23437;United Kingdom;Synectiv
+23416;United Kingdom;Talk Talk
+23427;United Kingdom;Tata Communications Ltd
+23411;United Kingdom;O2
+23410;United Kingdom;O2
+23402;United Kingdom;O2
+23422;United Kingdom;Telesign Mobile
+23419;United Kingdom;TeleWare
+23409;United Kingdom;Tismi
+23425;United Kingdom;Truphone
+23401;United Kingdom;Vectone Mobile
+23438;United Kingdom;Virgin Mobile
+23489;United Kingdom;Vodafone
+23407;United Kingdom;Vodafone
+23415;United Kingdom;Vodafone
+23491;United Kingdom;Vodafone
+23477;United Kingdom;Vodafone
+23492;United Kingdom;Vodafone
+310130;United States of America;Appalachian Wireless
+310750;United States of America;Appalachian Wireless
+312130;United States of America;Appalachian Wireless
+312750;United States of America;Appalachian Wireless
+312760;United States of America;ASTAC Cellular
+312710;United States of America;ASTAC Cellular
+310710;United States of America;ASTAC Cellular
+310760;United States of America;ASTAC Cellular
+31090;United States of America;AT&T Mobility
+313150;United States of America;AT&T Mobility
+31180;United States of America;AT&T Mobility
+312410;United States of America;AT&T Mobility
+31270;United States of America;AT&T Mobility
+310210;United States of America;AT&T Mobility
+313410;United States of America;AT&T Mobility
+311210;United States of America;AT&T Mobility
+31330;United States of America;AT&T Mobility
+312180;United States of America;AT&T Mobility
+310680;United States of America;AT&T Mobility
+311680;United States of America;AT&T Mobility
+310150;United States of America;AT&T Mobility
+313170;United States of America;AT&T Mobility
+31190;United States of America;AT&T Mobility
+312670;United States of America;AT&T Mobility
+31280;United States of America;AT&T Mobility
+310280;United States of America;AT&T Mobility
+313670;United States of America;AT&T Mobility
+311280;United States of America;AT&T Mobility
+31116;United States of America;AT&T Mobility
+31370;United States of America;AT&T Mobility
+312210;United States of America;AT&T Mobility
+310950;United States of America;AT&T Mobility
+311950;United States of America;AT&T Mobility
+310170;United States of America;AT&T Mobility
+313180;United States of America;AT&T Mobility
+311150;United States of America;AT&T Mobility
+312680;United States of America;AT&T Mobility
+31290;United States of America;AT&T Mobility
+310380;United States of America;AT&T Mobility
+313680;United States of America;AT&T Mobility
+31016;United States of America;AT&T Mobility
+311380;United States of America;AT&T Mobility
+31070;United States of America;AT&T Mobility
+31380;United States of America;AT&T Mobility
+31130;United States of America;AT&T Mobility
+312280;United States of America;AT&T Mobility
+31030;United States of America;AT&T Mobility
+31216;United States of America;AT&T Mobility
+310180;United States of America;AT&T Mobility
+313210;United States of America;AT&T Mobility
+311170;United States of America;AT&T Mobility
+312950;United States of America;AT&T Mobility
+312150;United States of America;AT&T Mobility
+310410;United States of America;AT&T Mobility
+313950;United States of America;AT&T Mobility
+311410;United States of America;AT&T Mobility
+31080;United States of America;AT&T Mobility
+31390;United States of America;AT&T Mobility
+31170;United States of America;AT&T Mobility
+312380;United States of America;AT&T Mobility
+31230;United States of America;AT&T Mobility
+313280;United States of America;AT&T Mobility
+313380;United States of America;AT&T Mobility
+311180;United States of America;AT&T Mobility
+31316;United States of America;AT&T Mobility
+312170;United States of America;AT&T Mobility
+310670;United States of America;AT&T Mobility
+311670;United States of America;AT&T Mobility
+310600;United States of America;Cellcom
+310630;United States of America;Choice Wireless
+310700;United States of America;cv cellular
+310880;United States of America;DTC Wireless
+31035;United States of America;ETEX
+310990;United States of America;Evolve
+310299;United States of America;Failed Calls
+310999;United States of America;Fix Line
+311370;United States of America;GCI Wireless
+310430;United States of America;GCI Wireless
+311430;United States of America;GCI Wireless
+310690;United States of America;Limitless
+311340;United States of America;Limitless
+311690;United States of America;Limitless
+312340;United States of America;Limitless
+310340;United States of America;Limitless
+312690;United States of America;Limitless
+312299;United States of America;Northstar Technology
+313299;United States of America;Northstar Technology
+314299;United States of America;Northstar Technology
+310299;United States of America;Northstar Technology
+315299;United States of America;Northstar Technology
+311299;United States of America;Northstar Technology
+316299;United States of America;Northstar Technology
+310540;United States of America;OWTC
+311570;United States of America;Pioneer Cellular
+310570;United States of America;Pioneer Cellular
+313280;United States of America;Pioneer Cellular
+313360;United States of America;Pioneer Cellular
+310280;United States of America;Pioneer Cellular
+311280;United States of America;Pioneer Cellular
+313570;United States of America;Pioneer Cellular
+311360;United States of America;Pioneer Cellular
+310360;United States of America;Pioneer Cellular
+312190;United States of America;T-Mobile
+316880;United States of America;T-Mobile
+310660;United States of America;T-Mobile
+310200;United States of America;T-Mobile
+311800;United States of America;T-Mobile
+316250;United States of America;T-Mobile
+311230;United States of America;T-Mobile
+312882;United States of America;T-Mobile
+310882;United States of America;T-Mobile
+312260;United States of America;T-Mobile
+311940;United States of America;T-Mobile
+316660;United States of America;T-Mobile
+310270;United States of America;T-Mobile
+310190;United States of America;T-Mobile
+311311;United States of America;T-Mobile
+316190;United States of America;T-Mobile
+311120;United States of America;T-Mobile
+312800;United States of America;T-Mobile
+312200;United States of America;T-Mobile
+316882;United States of America;T-Mobile
+310800;United States of America;T-Mobile
+310230;United States of America;T-Mobile
+311830;United States of America;T-Mobile
+316260;United States of America;T-Mobile
+311240;United States of America;T-Mobile
+312940;United States of America;T-Mobile
+310940;United States of America;T-Mobile
+312270;United States of America;T-Mobile
+31210;United States of America;T-Mobile
+316800;United States of America;T-Mobile
+310310;United States of America;T-Mobile
+310160;United States of America;T-Mobile
+311490;United States of America;T-Mobile
+316200;United States of America;T-Mobile
+311160;United States of America;T-Mobile
+312830;United States of America;T-Mobile
+316940;United States of America;T-Mobile
+310830;United States of America;T-Mobile
+312230;United States of America;T-Mobile
+310240;United States of America;T-Mobile
+311870;United States of America;T-Mobile
+316270;United States of America;T-Mobile
+311250;United States of America;T-Mobile
+31610;United States of America;T-Mobile
+312490;United States of America;T-Mobile
+312120;United States of America;T-Mobile
+316830;United States of America;T-Mobile
+310490;United States of America;T-Mobile
+310120;United States of America;T-Mobile
+311530;United States of America;T-Mobile
+316230;United States of America;T-Mobile
+311190;United States of America;T-Mobile
+312870;United States of America;T-Mobile
+310870;United States of America;T-Mobile
+312240;United States of America;T-Mobile
+310250;United States of America;T-Mobile
+311880;United States of America;T-Mobile
+316490;United States of America;T-Mobile
+311260;United States of America;T-Mobile
+316120;United States of America;T-Mobile
+312530;United States of America;T-Mobile
+312160;United States of America;T-Mobile
+316870;United States of America;T-Mobile
+310530;United States of America;T-Mobile
+31010;United States of America;T-Mobile
+311660;United States of America;T-Mobile
+316240;United States of America;T-Mobile
+311200;United States of America;T-Mobile
+312880;United States of America;T-Mobile
+310880;United States of America;T-Mobile
+312250;United States of America;T-Mobile
+311882;United States of America;T-Mobile
+316530;United States of America;T-Mobile
+310260;United States of America;T-Mobile
+311270;United States of America;T-Mobile
+316160;United States of America;T-Mobile
+31110;United States of America;T-Mobile
+312660;United States of America;T-Mobile
+31020;United States of America;Union Wireless
+310895;United States of America;Verizon Wireless
+31212;United States of America;Verizon Wireless
+310287;United States of America;Verizon Wireless
+311481;United States of America;Verizon Wireless
+312487;United States of America;Verizon Wireless
+310598;United States of America;Verizon Wireless
+311892;United States of America;Verizon Wireless
+312898;United States of America;Verizon Wireless
+311284;United States of America;Verizon Wireless
+312350;United States of America;Verizon Wireless
+311275;United States of America;Verizon Wireless
+312281;United States of America;Verizon Wireless
+310278;United States of America;Verizon Wireless
+310489;United States of America;Verizon Wireless
+311595;United States of America;Verizon Wireless
+312820;United States of America;Verizon Wireless
+310910;United States of America;Verizon Wireless
+312272;United States of America;Verizon Wireless
+310110;United States of America;Verizon Wireless
+310480;United States of America;Verizon Wireless
+311486;United States of America;Verizon Wireless
+312592;United States of America;Verizon Wireless
+310891;United States of America;Verizon Wireless
+311897;United States of America;Verizon Wireless
+310283;United States of America;Verizon Wireless
+311289;United States of America;Verizon Wireless
+312483;United States of America;Verizon Wireless
+312286;United States of America;Verizon Wireless
+310594;United States of America;Verizon Wireless
+311770;United States of America;Verizon Wireless
+312894;United States of America;Verizon Wireless
+311280;United States of America;Verizon Wireless
+311271;United States of America;Verizon Wireless
+312277;United States of America;Verizon Wireless
+310274;United States of America;Verizon Wireless
+310485;United States of America;Verizon Wireless
+311591;United States of America;Verizon Wireless
+312597;United States of America;Verizon Wireless
+310896;United States of America;Verizon Wireless
+31213;United States of America;Verizon Wireless
+310288;United States of America;Verizon Wireless
+311482;United States of America;Verizon Wireless
+312488;United States of America;Verizon Wireless
+310599;United States of America;Verizon Wireless
+311893;United States of America;Verizon Wireless
+312899;United States of America;Verizon Wireless
+311285;United States of America;Verizon Wireless
+312390;United States of America;Verizon Wireless
+311276;United States of America;Verizon Wireless
+312282;United States of America;Verizon Wireless
+310279;United States of America;Verizon Wireless
+310590;United States of America;Verizon Wireless
+311596;United States of America;Verizon Wireless
+312890;United States of America;Verizon Wireless
+31112;United States of America;Verizon Wireless
+312273;United States of America;Verizon Wireless
+310481;United States of America;Verizon Wireless
+311487;United States of America;Verizon Wireless
+312593;United States of America;Verizon Wireless
+310892;United States of America;Verizon Wireless
+311898;United States of America;Verizon Wireless
+310284;United States of America;Verizon Wireless
+311350;United States of America;Verizon Wireless
+312484;United States of America;Verizon Wireless
+312287;United States of America;Verizon Wireless
+310595;United States of America;Verizon Wireless
+311820;United States of America;Verizon Wireless
+312895;United States of America;Verizon Wireless
+311281;United States of America;Verizon Wireless
+311272;United States of America;Verizon Wireless
+312278;United States of America;Verizon Wireless
+310275;United States of America;Verizon Wireless
+310486;United States of America;Verizon Wireless
+311592;United States of America;Verizon Wireless
+312598;United States of America;Verizon Wireless
+310897;United States of America;Verizon Wireless
+312110;United States of America;Verizon Wireless
+310289;United States of America;Verizon Wireless
+311483;United States of America;Verizon Wireless
+312489;United States of America;Verizon Wireless
+310770;United States of America;Verizon Wireless
+311894;United States of America;Verizon Wireless
+312910;United States of America;Verizon Wireless
+311286;United States of America;Verizon Wireless
+312480;United States of America;Verizon Wireless
+311277;United States of America;Verizon Wireless
+312283;United States of America;Verizon Wireless
+310280;United States of America;Verizon Wireless
+310591;United States of America;Verizon Wireless
+311597;United States of America;Verizon Wireless
+312891;United States of America;Verizon Wireless
+31113;United States of America;Verizon Wireless
+312274;United States of America;Verizon Wireless
+310271;United States of America;Verizon Wireless
+310482;United States of America;Verizon Wireless
+311488;United States of America;Verizon Wireless
+312594;United States of America;Verizon Wireless
+310893;United States of America;Verizon Wireless
+311899;United States of America;Verizon Wireless
+310285;United States of America;Verizon Wireless
+311390;United States of America;Verizon Wireless
+312485;United States of America;Verizon Wireless
+310596;United States of America;Verizon Wireless
+311890;United States of America;Verizon Wireless
+312896;United States of America;Verizon Wireless
+311282;United States of America;Verizon Wireless
+312288;United States of America;Verizon Wireless
+311273;United States of America;Verizon Wireless
+312279;United States of America;Verizon Wireless
+310276;United States of America;Verizon Wireless
+310487;United States of America;Verizon Wireless
+311593;United States of America;Verizon Wireless
+312599;United States of America;Verizon Wireless
+310898;United States of America;Verizon Wireless
+31012;United States of America;Verizon Wireless
+310350;United States of America;Verizon Wireless
+311484;United States of America;Verizon Wireless
+312590;United States of America;Verizon Wireless
+310820;United States of America;Verizon Wireless
+311895;United States of America;Verizon Wireless
+311287;United States of America;Verizon Wireless
+312481;United States of America;Verizon Wireless
+312284;United States of America;Verizon Wireless
+310281;United States of America;Verizon Wireless
+310592;United States of America;Verizon Wireless
+311598;United States of America;Verizon Wireless
+312892;United States of America;Verizon Wireless
+311278;United States of America;Verizon Wireless
+311110;United States of America;Verizon Wireless
+312275;United States of America;Verizon Wireless
+310272;United States of America;Verizon Wireless
+310483;United States of America;Verizon Wireless
+311489;United States of America;Verizon Wireless
+312595;United States of America;Verizon Wireless
+310894;United States of America;Verizon Wireless
+311910;United States of America;Verizon Wireless
+310286;United States of America;Verizon Wireless
+311480;United States of America;Verizon Wireless
+312486;United States of America;Verizon Wireless
+310597;United States of America;Verizon Wireless
+311891;United States of America;Verizon Wireless
+312897;United States of America;Verizon Wireless
+311283;United States of America;Verizon Wireless
+312289;United States of America;Verizon Wireless
+311274;United States of America;Verizon Wireless
+312280;United States of America;Verizon Wireless
+310277;United States of America;Verizon Wireless
+310488;United States of America;Verizon Wireless
+311594;United States of America;Verizon Wireless
+312770;United States of America;Verizon Wireless
+310899;United States of America;Verizon Wireless
+312271;United States of America;Verizon Wireless
+31013;United States of America;Verizon Wireless
+310390;United States of America;Verizon Wireless
+311485;United States of America;Verizon Wireless
+312591;United States of America;Verizon Wireless
+310890;United States of America;Verizon Wireless
+311896;United States of America;Verizon Wireless
+310282;United States of America;Verizon Wireless
+311288;United States of America;Verizon Wireless
+312482;United States of America;Verizon Wireless
+312285;United States of America;Verizon Wireless
+310593;United States of America;Verizon Wireless
+311599;United States of America;Verizon Wireless
+312893;United States of America;Verizon Wireless
+311279;United States of America;Verizon Wireless
+312276;United States of America;Verizon Wireless
+310273;United States of America;Verizon Wireless
+310484;United States of America;Verizon Wireless
+311590;United States of America;Verizon Wireless
+312596;United States of America;Verizon Wireless
+310740;United States of America;Viaero Wireless
+310450;United States of America;Viaero Wireless
+310860;United States of America;West Central Wireless
+74801;Uruguay;Antel Movil
+74810;Uruguay;Claro
+748299;Uruguay;Failed Calls
+748999;Uruguay;Fix Line
+74807;Uruguay;Movistar
+43404;Uzbekistan;Beeline
+434299;Uzbekistan;Failed Calls
+434999;Uzbekistan;Fix Line
+43406;Uzbekistan;Perfectum Mobile
+43405;Uzbekistan;Ucell
+43407;Uzbekistan;UMS
+43403;Uzbekistan;UzMobile
+54105;Vanuatu;Digicel
+541299;Vanuatu;Failed Calls
+541999;Vanuatu;Fix Line
+54101;Vanuatu;Smile
+225299;Vatican;Failed Calls
+225999;Vatican;Fix Line
+73402;Venezuela;Digitel
+734299;Venezuela;Failed Calls
+734999;Venezuela;Fix Line
+73406;Venezuela;Movilnet
+73404;Venezuela;Movistar
+452299;Vietnam;Failed Calls
+452999;Vietnam;Fix Line
+45207;Vietnam;Gmobile
+45208;Vietnam;I-Telecom
+45201;Vietnam;MobiFone
+45209;Vietnam;Reddi
+45205;Vietnam;Vietnamobile
+45206;Vietnam;Viettel
+45204;Vietnam;Viettel
+45202;Vietnam;VinaPhone
+376299;Virgin Islands;Failed Calls
+376999;Virgin Islands;Fix Line
+543299;Wallis and Futuna;Failed Calls
+543999;Wallis and Futuna;Fix Line
+54301;Wallis and Futuna;Manuia
+421299;Yemen;Failed Calls
+421999;Yemen;Fix Line
+42101;Yemen;SabaFon
+42102;Yemen;Spacetel
+42104;Yemen;Y
+42103;Yemen;Yemen Mobile
+64501;Zambia;Airtel
+645299;Zambia;Failed Calls
+645999;Zambia;Fix Line
+64502;Zambia;MTN
+64503;Zambia;Zamtel
+64804;Zimbabwe;Econet
+648299;Zimbabwe;Failed Calls
+648999;Zimbabwe;Fix Line
+64801;Zimbabwe;NetOne
+64803;Zimbabwe;Telecel
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/alcatel_hilink.sh b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/alcatel_hilink.sh
new file mode 100644
index 00000000..84eee9c3
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/alcatel_hilink.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# (c) 2010-2021 Cezary Jackiewicz
+#
+# (c) 2021 modified by Rafał Wabik - IceG - From eko.one.pl forum
+#
+
+IP=$1
+[ -z "$IP" ] && exit 0
+[ -e /usr/bin/wget ] || exit 0
+
+getvaluen() {
+ echo $(sed 's!.*"'$2'":\([^,]*\).*!\1!g' /tmp/$1)
+}
+
+getvalue() {
+ echo $(sed 's!.*"'$2'":"\([^"]*\).*!\1!g' /tmp/$1)
+}
+
+rand=`awk 'BEGIN{srand();print int(rand()*(99000-1000))+1000 }'`
+
+files="getWanInfo getImgInfo getSysteminfo"
+for f in $files; do
+ wget -t 3 -O /tmp/$f "http://$IP/goform/$f?rand=$rand" >/dev/null 2>&1
+done
+
+MODEN=$(getvaluen getWanInfo "network_type")
+case $MODEN in
+ 1) MODE="GPRS";;
+ 2) MODE="EDGE";;
+ 3) MODE="HSDPA";;
+ 4) MODE="HSUPA";;
+ 5) MODE="UMTS";;
+ 9) MODE="GSM";;
+ 11) MODE="LTE";;
+ 12) MODE="HSPA+";;
+ 13) MODE="DC HSPA+";;
+ *) MODE="-";;
+esac
+echo "^SYSINFOEX:x,x,x,x,,x,\"$MODE\",$MODEN,\"$MODE\""
+
+COPS=$(getvalue getWanInfo "network_name")
+echo "+COPS: 0,0,\"$OPER\",x"
+
+SIGNAL=$(getvaluen getImgInfo "signal")
+case $SIGNAL in
+ 1) CSQ="6";;
+ 2) CSQ="12";;
+ 3) CSQ="18";;
+ 4) CSQ="24";;
+ 5) CSQ="31";;
+ *) CSQ="0";;
+esac
+echo "+CSQ: $CSQ,99"
+
+MODEL=$(getvalue getSysteminfo "dev_name")
+echo MODEL="Alcatel $MODEL"
+
+if [ "x$2" != "xdebug" ]; then
+ for f in $files; do
+ rm /tmp/$f
+ done
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/huawei_hilink.sh b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/huawei_hilink.sh
new file mode 100644
index 00000000..9797ecc2
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/huawei_hilink.sh
@@ -0,0 +1,248 @@
+#!/bin/sh
+#
+# (c) 2010-2021 Cezary Jackiewicz
+#
+# (c) 2024 modified by Rafał Wabik - IceG - From eko.one.pl forum
+#
+
+IP=$1
+[ -z "$IP" ] && exit 0
+[ -e /usr/bin/wget ] || exit 0
+getvaluen() {
+ echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1 | sed 's/[^0-9]//g')
+}
+
+getvaluens() {
+ echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1 | sed 's/[^0-9-]//g')
+}
+
+getvalue() {
+ echo $(awk -F[\<\>] '/<'$2'>/ {print $3}' /tmp/$1)
+}
+
+cookie=$(mktemp)
+/usr/bin/wget -t 25 -O /tmp/webserver-token "http://$IP/api/webserver/token" >/dev/null 2>&1
+token=$(getvaluen webserver-token token)
+if [ -z "$token" ]; then
+ /usr/bin/wget -t 25 -O /tmp/webserver-token "http://$IP/api/webserver/SesTokInfo" >/dev/null 2>&1
+ sesinfo=$(getvalue webserver-token SesInfo)
+fi
+if [ -z "$sesinfo" ]; then
+ /usr/bin/wget -q -O /dev/null --keep-session-cookies --save-cookies $cookie "http://$IP/html/home.html"
+fi
+
+files="device/signal monitoring/status net/current-plmn net/signal-para device/information device/basic_information"
+for f in $files; do
+ nf=$(echo $f | sed 's!/!-!g')
+ if [ -n "$token" ]; then
+ /usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --header "__RequestVerificationToken: $token" >/dev/null 2>&1
+ elif [ -n "$sesinfo" ]; then
+ /usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --header "Cookie: $sesinfo" >/dev/null 2>&1
+ else
+ /usr/bin/wget -t 3 -O /tmp/$nf "http://$IP/api/$f" --load-cookies=$cookie >/dev/null 2>&1
+ fi
+done
+
+# Protocol
+# Driver=qmi_wwan & Driver=cdc_mbim & Driver=cdc_ether & Driver=huawei_cdc_ncm
+PV=$(cat /sys/kernel/debug/usb/devices)
+PVCUT=$(echo $PV | awk -F 'Vendor=12d1 ProdID=' '{print $2}' | cut -c-1108)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+elif echo "$PVCUT" | grep -q "Driver=huawei_cdc_ncm"
+then
+ PROTO="ncm"
+fi
+
+RSSI=$(getvalue device-signal rssi)
+if [ "$RSSI" == "<=-113dBm" ]; then
+ RSSI=
+else
+ RSSI=$(echo "$RSSI" | sed 's/[^0-9]//g')
+fi
+if [ -n "$RSSI" ]; then
+ CSQ=$(((-1*RSSI + 113)/2))
+ CSQ_PER=$(($CSQ * 100/31))
+else
+ CSQ_PER=$(getvaluen monitoring-status SignalStrength)
+ if [ -z "$CSQ_PER" ]; then
+ CSQ_PER=$(getvaluen monitoring-status SignalIcon)
+ if [ -n "$CSQ_PER" ]; then
+ CSQ_PER=$((($CSQ_PER * 20) - 19))
+ fi
+ fi
+ if [ -n "$CSQ_PER" ]; then
+ CSQ=$((($CSQ_PER*31)/100))
+ fi
+fi
+
+MODEN=$(getvaluen monitoring-status CurrentNetworkType)
+case $MODEN in
+ 0) MODE="NOSERVICE";;
+ 1) MODE="GSM";;
+ 2) MODE="GPRS";;
+ 3) MODE="EDGE";;
+ 4) MODE="WCDMA";;
+ 5) MODE="HSDPA";;
+ 6) MODE="HSUPA";;
+ 7) MODE="HSPA";;
+ 8) MODE="TDSCDMA";;
+ 9) MODE="HSPA+";;
+ 10) MODE="EVDO rev. 0";;
+ 11) MODE="EVDO rev. A";;
+ 12) MODE="EVDO rev. B";;
+ 13) MODE="1xRTT";;
+ 14) MODE="UMB";;
+ 15) MODE="1xEVDV";;
+ 16) MODE="3xRTT";;
+ 17) MODE="HSPA+64QAM";;
+ 18) MODE="HSPA+MIMO";;
+ 19) MODE="LTE";;
+ 21) MODE="IS95A";;
+ 22) MODE="IS95B";;
+ 23) MODE="CDMA1x";;
+ 24) MODE="EVDO rev. 0";;
+ 25) MODE="EVDO rev. A";;
+ 26) MODE="EVDO rev. B";;
+ 27) MODE="Hybrydowa CDMA1x";;
+ 28) MODE="Hybrydowa EVDO rev. 0";;
+ 29) MODE="Hybrydowa EVDO rev. A";;
+ 30) MODE="Hybrydowa EVDO rev. B";;
+ 31) MODE="EHRPD rev. 0";;
+ 32) MODE="EHRPD rev. A";;
+ 33) MODE="EHRPD rev. B";;
+ 34) MODE="Hybrydowa EHRPD rev. 0";;
+ 35) MODE="Hybrydowa EHRPD rev. A";;
+ 36) MODE="Hybrydowa EHRPD rev. B";;
+ 41) MODE="WCDMA (UMTS)";;
+ 42) MODE="HSDPA";;
+ 43) MODE="HSUPA";;
+ 44) MODE="HSPA";;
+ 45) MODE="HSPA+";;
+ 46) MODE="DC-HSPA+";;
+ 61) MODE="TD SCDMA";;
+ 62) MODE="TD HSDPA";;
+ 63) MODE="TD HSUPA";;
+ 64) MODE="TD HSPA";;
+ 65) MODE="TD HSPA+";;
+ 81) MODE="802.16E";;
+ 101) MODE="LTE";;
+ *) MODE="-";;
+esac
+
+if [ "x$MODE" = "xLTE" ] || [ "x$MODE" = "xNOSERVICE"]; then
+ RSRP=$(getvaluens device-signal rsrp)
+ SINR=$(getvaluens device-signal sinr)
+ RSRQ=$(getvaluens device-signal rsrq)
+fi
+
+MODEL=$(getvalue device-information DeviceName)
+if [ -n "$MODEL" ]; then
+ class=$(getvalue device-information Classify)
+ MODEL="Huawei $MODEL ($class)"
+else
+ MODEL=$(getvalue device-basic_information devicename)
+ class=$(getvalue device-basic_information classify)
+ [ -n "$MODEL" ] && MODEL="Huawei $MODEL ($class)"
+fi
+
+FW=$(getvalue device-information SoftwareVersion)
+if [ -n "$FW" ]; then
+ rev=$(getvalue device-information HardwareVersion)
+ FW="$rev / $FW"
+fi
+
+if [ -z "$FW" ]
+then
+ FW='-'
+fi
+
+if [ -z "$TEMP" ]
+then
+ TEMP='-'
+fi
+
+COPSA=$(getvaluen net-current-plmn Numeric)
+COPSB=$(echo "${COPSA}" | cut -c1-3)
+COPSC=$(echo -n $COPSA | tail -c 2)
+COPS_MCC="$COPSB"
+COPS_MNC="$COPSC"
+
+COPS=$(getvalue net-current-plmn ShortName)
+
+if [[ $COPSA =~ ^[0-9]+$ ]]; then
+ if [ -z "$COPS" ]
+ then
+ COPS=$(awk -F[\;] '/^'$COPSA';/ {print $3}' $RES/mccmnc.dat | xargs)
+ fi
+ LOC=$(awk -F[\;] '/^'$COPSA';/ {print $2}' $RES/mccmnc.dat)
+fi
+
+# operator location from temporary config
+LOCATIONFILE=/tmp/location
+if [ -e "$LOCATIONFILE" ]; then
+ touch $LOCATIONFILE
+ LOC=$(cat $LOCATIONFILE)
+ if [ -n "$LOC" ]; then
+ LOC=$(cat $LOCATIONFILE)
+ if [[ $LOC == "-" ]]; then
+ rm $LOCATIONFILE
+ LOC=$(awk -F[\;] '/^'$COPSA';/ {print $2}' $RES/mccmnc.dat)
+ if [ -n "$LOC" ]; then
+ echo "$LOC" > /tmp/location
+ fi
+ else
+ LOC=$(awk -F[\;] '/^'$COPSA';/ {print $2}' $RES/mccmnc.dat)
+ if [ -n "$LOC" ]; then
+ echo "$LOC" > /tmp/location
+ fi
+ fi
+ fi
+else
+ if [[ "$COPS_MCC$COPS_MNC" =~ ^[0-9]+$ ]]; then
+ if [ -n "$LOC" ]; then
+ LOC=$(awk -F[\;] '/^'$COPS_MCC$COPS_MNC';/ {print $2}' $RES/mccmnc.dat)
+ echo "$LOC" > /tmp/location
+ else
+ echo "-" > /tmp/location
+ fi
+ fi
+fi
+
+LAC_HEX=$(getvalue net-signal-para Lac)
+if [ -z "$LAC_HEX" ]; then
+ /usr/bin/wget -t 3 -O /tmp/add-param "http://$IP/config/deviceinformation/add_param.xml" > /dev/null 2>&1
+ LAC_HEX=$(getvalue add-param lac)
+ rm /tmp/add-param
+fi
+if [ -z "$LAC_HEX" ]
+then
+ LAC_HEX='-'
+fi
+
+CID_HEX=$(getvalue net-signal-para CellID)
+if [ -z "$CID_HEX" ]; then
+ CID_HEX=$(getvalue device-signal cell_id)
+ [ -n "$CID_HEX" ] && CID_HEX=$(printf %0X $CID_HEX)
+fi
+
+if [ -z "$CID_HEX" ]
+then
+ CID_HEX='-'
+fi
+
+if [ -z "$CID_DEC" ]
+then
+ [ -n "$CID_HEX" ] && CID_DEC=$(echo $((0x$CID_HEX)))
+fi
+
+rm $cookie
+break
+
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/zte.sh b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/zte.sh
new file mode 100644
index 00000000..fc9a29c0
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/hilink/zte.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# (c) 2010-2021 Cezary Jackiewicz
+#
+# (c) 2021 modified by Rafał Wabik - IceG - From eko.one.pl forum
+#
+
+IP=$1
+[ -z "$IP" ] && exit 0
+
+T=$(mktemp)
+wget -q -O $T "http://$IP/goform/goform_get_cmd_process?multi_data=1&cmd=manufacturer_name,model_name,network_provider,network_type,lte_rsrp,lte_rsrq,lte_rssi,lte_snr,cell_id,lac_code,hmcc,hmnc,rmcc,rmnc,rssi,rscp,ecio"
+
+. /usr/share/libubox/jshn.sh
+json_load "$(cat $T)"
+
+json_get_vars manufacturer_name model_name network_provider network_type lte_rsrp lte_rsrq lte_rssi lte_snr cell_id lac_code hmcc hmnc rmcc rmnc rssi rscp ecio
+
+if [ -n "$lte_rssi" ]; then
+ RSSI=$lte_rssi
+fi
+if [ -n "$rssi" ]; then
+ CSQ=$(((rssi+113)/2))
+ CSQ_PER=$(($CSQ * 100/31))
+else
+ CSQ=0
+ CSQ_PER=0
+fi
+echo "+CSQ: $CSQ,99"
+
+MODEL=$manufacturer_name $model_name
+
+MODE=$network_type
+
+echo "^SYSINFOEX:x,x,x,x,,x,\"$network_type\",x,\"$network_type\""
+
+if [ -n "$hmcc" ]; then
+ COPS_MCC==$(printf "%03d" $hmcc)
+else
+ [ -n "$rmcc" ] && COPS_MCC==$(printf "%03d" $rmcc)
+fi
+
+if [ -n "$hmnc" ]; then
+ COPS_MNC=$(printf "%02d" $hmnc)
+else
+ [ -n "$rmnc" ] && COPS_MNC=$(printf "%02d" $rmnc)
+fi
+echo "+COPS: 0,2,\"$mcc$mnc\",x"
+
+if [ "x$network_type" = "xLTE" ]; then
+ echo "^LTERSRP: $lte_rsrp,$lte_rsrq"
+ RSRP=$lte_rsrp
+ RSRQ=$lte_rsrq
+else
+ echo "^CSNR: $rscp,$ecio"
+fi
+
+echo "+CREG: 2,1,\"$lac_code\",\"$cell_id\""
+CID_HEX=$cell_id
+LAC_HEX=$lac_code
+
+rm $T
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/pci/105be0b0 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/pci/105be0b0
new file mode 100644
index 00000000..4d50b573
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/pci/105be0b0
@@ -0,0 +1,204 @@
+# Dell DW5930e
+# Foxconn T99W175
+
+O=$(sms_tool -d $DEVICE at "at^temp")
+
+T=$(echo "$O" | awk '/^TSENS: / {gsub("C","",$2); print $2}')
+T1=$(echo "$O" | awk '/^PA: / {gsub("C","",$2); print $2}')
+if [ -n "$T" ] && [ -n "$T1" ]; then
+ [ "$T1" -gt "$T" ] && T="$T1"
+fi
+T1=$(echo "$O" | awk '/^Skin Sensor: / {gsub("C","",$2); print $2}')
+if [ -n "$T" ] && [ -n "$T1" ]; then
+ [ "$T1" -gt "$T" ] && T="$T1"
+fi
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at^debug?")
+
+case "$MODE_NUM" in
+ "7")
+ MODE="LTE |"
+ echo "$O" | grep -q "scell:" && MODE="LTE-A |"
+ ;;
+ "11")
+ MODE="5G SA |"
+ ;;
+ "13")
+ MODE="5G NSA |"
+ ;;
+esac
+
+T=$(echo "$O" | awk -F: '/^lte_tac:/ {print $2}')
+if [ -n "$T" ]; then
+ TAC_HEX=$(printf "%X" $T)
+ TAC_DEC=$(printf "%d" "0x$T")
+fi
+
+O1=$(echo "$O" | grep -A 3 pcell)
+T=$(echo "$O1" | awk -F: '/^pcell:/ {print $3}' | cut -f1 -d" ")
+if [ -n "$T" ]; then
+ MODE="$MODE $(band4g $T)"
+ T1=$(echo "$O1" | awk -F: '/^pcell:/ {print $4}' | xargs)
+ PBAND="$(band4g $T) @${T1/MHz/} MHz"
+
+ T=$(echo "$O1" | awk -F: '/pci:/ {print $3}' | xargs)
+ [ -n "$T" ] && PCI=$T
+ T=$(echo "$O1" | awk -F: '/^channel:/ {print $2}' | cut -f1 -d" " | xargs)
+ [ -n "$T" ] && EARFCN=$T
+ T=$(echo "$O1" | awk -F[:,] '/^lte_rsrp:/ {print $2}')
+ [ -n "$T" ] && RSRP="${T/dBm/}"
+ T=$(echo "$O1" | awk -F[:,] '/rsrq:/ {print $4}' | xargs)
+ [ -n "$T" ] && RSRQ="${T/dB/}"
+ T=$(echo "$O1" | awk -F[:,] '/^lte_rssi:/ {print $2}')
+ [ -n "$T" ] && RSSI="${T/dBm/}"
+ T=$(echo "$O1" | awk -F[:,] '/lte_snr:/ {print $4}' | xargs)
+ [ -n "$T" ] && [ "$T" != "NA" ] && SINR="${T/dB/}"
+fi
+
+O1=$(echo "$O" | grep -A 3 scell)
+IDX=0;
+while true; do
+ O2=$(echo "$O1" | head -n4)
+ if [ -z "$O2" ]; then
+ break
+ fi
+ IDX=$((IDX + 1))
+
+ T=$(echo "$O2" | awk -F: '/^scell:/ {print $3}' | cut -f1 -d" ")
+ MODE="$MODE / $(band4g $T)"
+ T1=$(echo "$O2" | awk -F: '/^scell:/ {print $4}' | xargs)
+ if [ -n "$T1" ]; then
+ case $IDX in
+ 1) S1BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 2) S2BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 3) S3BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 4) S4BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F: '/pci:/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$T";;
+ 2) S2PCI="$T";;
+ 3) S3PCI="$T";;
+ 4) S4PCI="$T";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F: '/^channel:/ {print $2}' | cut -f1 -d" " | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T";;
+ 2) S2EARFCN="$T";;
+ 3) S3EARFCN="$T";;
+ 4) S4EARFCN="$T";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F[:,] '/^lte_rsrp:/ {print $2}')
+# [ -n "$T" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "${T/dBm/} dBm"
+ T=$(echo "$O2" | awk -F[:,] '/rsrq:/ {print $4}' | xargs)
+# [ -n "$T" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "${T/dB/} dB"
+ T=$(echo "$O2" | awk -F[:,] '/^lte_rssi:/ {print $2}')
+# [ -n "$T" ] && addon $((POS + 5)) "(S${IDX}) RSSI" "${T/dBm/} dBm"
+ T=$(echo "$O2" | awk -F[:,] '/lte_snr:/ {print $4}' | xargs)
+# [ -n "$T" ] && [ "$T" != "NA" ] && addon $((POS + 8)) "(S${IDX}) SNR" "${T/dB/} dB"
+
+ O1=$(echo "$O1" | sed '1,4d')
+done
+
+T=$(echo "$O" | awk -F: '/^nr_band:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ MODE="$MODE / $(band5g ${T/n/})"
+ IDX=$((IDX + 1))
+
+ T1=$(echo "$O" | awk -F: '/^nr_band_width:/ {print $2}' | xargs)
+ if [ -n "$T1" ]; then
+ case $IDX in
+ 1) S1BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 2) S2BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 3) S3BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 4) S4BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O" | awk -F: '/^nr_pci:/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$T";;
+ 2) S2PCI="$T";;
+ 3) S3PCI="$T";;
+ 4) S4PCI="$T";;
+ *) ;;
+ esac
+ fi
+ T=$(echo "$O" | awk -F: '/^nr_channel:/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T";;
+ 2) S2EARFCN="$T";;
+ 3) S3EARFCN="$T";;
+ 4) S4EARFCN="$T";;
+ *) ;;
+ esac
+ fi
+ T=$(echo "$O" | awk -F: '/^nr_rsrp:/ {print $2}' | cut -f1 -d" ")
+# [ -n "$T" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "${T/dBm/} dBm"
+ T=$(echo "$O" | awk -F: '/^nr_rsrq:/ {print $2}' | xargs)
+# [ -n "$T" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "${T/dB/} dB"
+ T=$(echo "$O" | awk -F: '/^nr_snr:/ {print $2}' | xargs)
+# [ -n "$T" ] && [ "$T" != "NA" ] && addon $((POS + 8)) "(S${IDX}) SNR" "${T/dB/} dB"
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+
+# Modem
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "//)
+MODEL="$MODELBCUT "$MODELACUT
+
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+CGMR "//)
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\ICCID:/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+
+if echo "$DEVICE" | grep -q "wwan0at0"
+then
+ PROTO="mbim"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f00857 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f00857
new file mode 100644
index 00000000..4cc230f9
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f00857
@@ -0,0 +1,128 @@
+# Telit LN940 (QMI) / Telit LN940 (MBIM) / HP lt4220 (MBIM) / HP lt4220 (QMI)
+
+O=$(sms_tool -D -d $DEVICE at "AT^CA_INFO?;^RFSTS?;+TEMP")
+
+TR=$(echo "$O" |grep -A2 RFSTS: | awk 'NR ==2{print $0}')
+
+if [ "$MODE" = "LTE" ]; then
+ RSRP=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$3}')
+ RSSI=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$4}')
+ RSRQ=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$5}')
+ SINR=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$16*2-20}')
+else
+ SINR=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$4}')
+ RSSI=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$6}')
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\PCC info: /{print $2}' | sed 's/Band is //g')
+[ -z "$T" ] && T=$(echo "$O" | awk -F[,] '/^\PCC info: /{print $2}')
+if [ -n "$T" ]; then
+ PC=$(echo $T | tr -d 'LTE_B')
+ MODE="LTE | $(band4g $PC)"
+
+ T=$(echo "$O" | awk -F[,:] '/^\SCC1 info: /{print $2}' | sed 's/Band is //g')
+ if [ -n "$T" ]; then
+ SC1=$(echo $T | tr -d 'LTE_B')
+ MODE="${MODE/LTE/LTE_A} / "$(band4g ${SC1} "")
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\SCC2 info: /{print $2}' | sed 's/Band is //g')
+ if [ -n "$T" ]; then
+ SC2=$(echo $T | tr -d 'LTE_B')
+ MODE="${MODE} / "$(band4g ${SC2} "")
+ fi
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,' | sed 's,LTE_A,LTE-A ,')
+
+# Primary band
+T1=$(echo "$O" | awk '/PCC/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T1" ]; then
+ T2=$(echo "$O" | awk '/PCC/{print $8}' | sed -e 's/Band_width//g')
+ PBAND="$(band4g ${T1/B/} "") @$T2 MHz"
+ EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+ PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# CA band (S1)
+T3=$(echo "$O" | awk '/SCC1/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T3" ]; then
+ T4=$(echo "$O" | awk '/SCC1/{print $8}' | sed -e 's/Band_width//g')
+ S1BAND="$(band4g ${T3/B/} "") @$T4 MHz"
+# S1EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+# S1PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# CA band (S2)
+T5=$(echo "$O" | awk '/SCC2/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T5" ]; then
+ T6=$(echo "$O" | awk '/SCC2/{print $8}' | sed -e 's/Band_width//g')
+ S2BAND="$(band4g ${T5/B/} "") @$T6 MHz"
+# S2EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+# S2PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# Temperature
+T=$(echo "$O" | awk -F [:] '/tsens_tz_sensor0:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ TEMP=$(echo "$T °C")
+fi
+
+# Cell ID & LAC & TAC
+LAC_HEX=$(printf "%X" $LAC_DEC)
+if [ -n "$LAC_DEC" ]; then
+ TAC_HEX=$LAC_HEX
+fi
+CID_HEX=$(printf "%X" $CID_DEC)
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=03f0 ProdID=0857' '{print $2}' | cut -c-1220)
+
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
+
+# Model
+PVMODEL=$(echo $PV | awk -F 'Vendor=03f0 ProdID=0857' '{print $2}' | cut -c-150)
+if [ -z "$MODEL" ]
+then
+ MODELBCUT=$(echo $PVMODEL | awk -F 'Manufacturer=|S: Product=' '{print $2}'| xargs)
+ MODELACUT=$(echo $PVMODEL | awk -F 'Product=|S: SerialNumber' '{print $2}'| xargs)
+ MODELC="$MODELBCUT "$MODELACUT
+ MODEL=$(echo "$MODELC" | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}')
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | awk -F " " '/GSN /{print $2}')
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | awk -F " " '/CIMI /{print $2}')
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID" | xargs)
+NR_D=$(echo "$O" | awk -F [:] '/ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# FW
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+FW=$(echo $DEV2 | awk -F 'Revision: | IMEI: ' '{print $2}' | cut -c-50)
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f00a57 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f00a57
new file mode 100644
index 00000000..5bed514a
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f00a57
@@ -0,0 +1,128 @@
+# Telit LN940 (QMI) / Telit LN940 (MBIM) / HP lt4220 (MBIM) / HP lt4220 (QMI)
+
+O=$(sms_tool -D -d $DEVICE at "AT^CA_INFO?;^RFSTS?;+TEMP")
+
+TR=$(echo "$O" |grep -A2 RFSTS: | awk 'NR ==2{print $0}')
+
+if [ "$MODE" = "LTE" ]; then
+ RSRP=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$3}')
+ RSSI=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$4}')
+ RSRQ=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$5}')
+ SINR=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$16*2-20}')
+else
+ SINR=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$4}')
+ RSSI=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$6}')
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\PCC info: /{print $2}' | sed 's/Band is //g')
+[ -z "$T" ] && T=$(echo "$O" | awk -F[,] '/^\PCC info: /{print $2}')
+if [ -n "$T" ]; then
+ PC=$(echo $T | tr -d 'LTE_B')
+ MODE="LTE | $(band4g $PC)"
+
+ T=$(echo "$O" | awk -F[,:] '/^\SCC1 info: /{print $2}' | sed 's/Band is //g')
+ if [ -n "$T" ]; then
+ SC1=$(echo $T | tr -d 'LTE_B')
+ MODE="${MODE/LTE/LTE_A} / "$(band4g ${SC1} "")
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\SCC2 info: /{print $2}' | sed 's/Band is //g')
+ if [ -n "$T" ]; then
+ SC2=$(echo $T | tr -d 'LTE_B')
+ MODE="${MODE} / "$(band4g ${SC2} "")
+ fi
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,' | sed 's,LTE_A,LTE-A ,')
+
+# Primary band
+T1=$(echo "$O" | awk '/PCC/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T1" ]; then
+ T2=$(echo "$O" | awk '/PCC/{print $8}' | sed -e 's/Band_width//g')
+ PBAND="$(band4g ${T1/B/} "") @$T2 MHz"
+ EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+ PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# CA band (S1)
+T3=$(echo "$O" | awk '/SCC1/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T3" ]; then
+ T4=$(echo "$O" | awk '/SCC1/{print $8}' | sed -e 's/Band_width//g')
+ S1BAND="$(band4g ${T3/B/} "") @$T4 MHz"
+# S1EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+# S1PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# CA band (S2)
+T5=$(echo "$O" | awk '/SCC2/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T5" ]; then
+ T6=$(echo "$O" | awk '/SCC2/{print $8}' | sed -e 's/Band_width//g')
+ S2BAND="$(band4g ${T5/B/} "") @$T6 MHz"
+# S2EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+# S2PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# Temperature
+T=$(echo "$O" | awk -F [:] '/tsens_tz_sensor0:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ TEMP=$(echo "$T °C")
+fi
+
+# Cell ID & LAC & TAC
+LAC_HEX=$(printf "%X" $LAC_DEC)
+if [ -n "$LAC_DEC" ]; then
+ TAC_HEX=$LAC_HEX
+fi
+CID_HEX=$(printf "%X" $CID_DEC)
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=03f0 ProdID=0a57' '{print $2}' | cut -c-1220)
+
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
+
+# Model
+PVMODEL=$(echo $PV | awk -F 'Vendor=03f0 ProdID=0a57' '{print $2}' | cut -c-150)
+if [ -z "$MODEL" ]
+then
+ MODELBCUT=$(echo $PVMODEL | awk -F 'Manufacturer=|S: Product=' '{print $2}'| xargs)
+ MODELACUT=$(echo $PVMODEL | awk -F 'Product=|S: SerialNumber' '{print $2}'| xargs)
+ MODELC="$MODELBCUT "$MODELACUT
+ MODEL=$(echo "$MODELC" | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}')
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | awk -F " " '/GSN /{print $2}')
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | awk -F " " '/CIMI /{print $2}')
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID" | xargs)
+NR_D=$(echo "$O" | awk -F [:] '/ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# FW
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+FW=$(echo $DEV2 | awk -F 'Revision: | IMEI: ' '{print $2}' | cut -c-50)
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f0581d b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f0581d
new file mode 100644
index 00000000..e85928e8
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/03f0581d
@@ -0,0 +1,113 @@
+# Huawei E3272/E3372/E3276
+
+O=$(sms_tool -d $DEVICE at "at^chiptemp?;^hcsq?")
+
+T=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ MODE="$T"
+
+ case "$MODE" in
+ WCDMA*)
+ PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}' | xargs)
+ PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}' | xargs)
+ RSCP=$(awk 'BEGIN {print -121 + '$PARAM2'}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSCP":"'$RSCP' dBm"}'
+ ECIO=$(awk 'BEGIN {print -32.5 + '$PARAM3'/2}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"ECIO":"'$ECIO' dB"}'
+ ;;
+ LTE*)
+ PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}' | xargs)
+ PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}' | xargs)
+ PARAM4=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $6}' | xargs)
+ RSRP=$(awk 'BEGIN {print -141 + '$PARAM2'}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRP":"'$RSRP' dBm"}'
+ SINR=$(awk 'BEGIN {print -20.2 + '$PARAM3'/5}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"SINR":"'$SINR' dB"}'
+ RSRQ=$(awk 'BEGIN {print -20 + '$PARAM4'/2}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRQ":"'$RSRQ' dB"}'
+ ;;
+ esac
+fi
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+MODELB=$(echo $DEV2 | awk -F 'Manufacturer:|Revision:' '{print $2}'| xargs)
+MODELC=$(echo $MODELB | sed 's/Model://' | xargs)
+MODEL=$(echo $MODELC | awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}')
+FW=$(echo $DEV2 | awk -F 'Revision:|IMEI' '{print $2}'| xargs)
+
+# Protocol
+# Driver=qmi_wwan & Driver=cdc_mbim & Driver=cdc_ether & Driver=huawei_cdc_ncm
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=12d1 ProdID=1506' '{print $2}' | cut -c-1104)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+elif echo "$PVCUT" | grep -q "cdc_ncm"
+then
+ PROTO="ncm"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | sed 's/AT+GSN//g' | xargs)
+if [ -n "NR_I" ]
+then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed 's/AT+CIMI//g' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT^ICCID?")
+NR_D=$(echo "$O" | awk -F [:] '/^\^ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# DL / UL / Band
+OTB=$(sms_tool -d $DEVICE at "AT^HFREQINFO?")
+TBX=$(echo "$OTB" | awk -F [:] '/^\^HFREQINFO:/{print $2}' | xargs)
+TB=$(echo "$TBX" | cut -d ',' -f3-3 )
+
+TDL=$(echo "$TBX" | cut -d ',' -f6-6 )
+DL=$(($TDL/1000))
+
+TUL=$(echo "$TBX" | cut -d ',' -f9-9 )
+UL=$(($TUL/1000))
+
+ULBW="UL: @$UL MHz"
+DLBW="DL: @$DL MHz"
+
+PBAND="$(band4g $TB "") $DLBW $ULBW"
+EARFCN=$(echo "$TBX" | cut -d ',' -f4-4 )
+PCI="-"
+
+# LAC & TAC
+T_HEX=$LAC_HEX
+T_DEC=$LAC_DEC
+
+# Temperature
+T=$(echo "$O" | awk -F[,:] '/^\^CHIPTEMP/ {gsub(/[ \r]/,"");t=0;for(i=2;i<=NF;i++)if($i!=65535){if($i>100){$i=$i/10};if($i>t){t=$i}};printf "%.1f", t}')
+if [ "x$T" != "x0.0" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ TEMP="$T °C"
+ #ADDON="$ADDON"'{"Temperatura":"'$T' °C"}'
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/05c66000 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/05c66000
new file mode 100644
index 00000000..ae7e2313
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/05c66000
@@ -0,0 +1,29 @@
+# Qualcomm CDMA Technologies MSM
+
+# Modem
+MODEL="Qualcomm CDMA Technologies MSM"
+
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR")
+FW=$(echo $FWA | cut -c 9- | sed s/"OK"// | xargs)
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | cut -c 8- | sed s/"OK"// | xargs)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | cut -c 9- | sed s/"OK"// | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\ICCID:/{print $2}' | sed s/"OK"// | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/05c69215 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/05c69215
new file mode 100644
index 00000000..3c65f1ed
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/05c69215
@@ -0,0 +1,117 @@
+# Quectel EC20-E
+# Quectel EC25
+
+OCT=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$OCT" | awk -F[,:] '/^\+QTEMP/ {t=$2*1;if($3*1>t)t=$3*1;if($4*1>t)t=$4*1;printf "%d", t}')
+if [ -n "$T" ]; then
+ TEMP="$T °C"
+fi
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QNWINFO/ {print $2"/"$4}' | xargs)
+if [ -n "$T" ]; then
+ if [ "x$MODE_NUM" = "x7" ]; then
+ B=$(echo $T | sed 's/.*LTE BAND \(.*\)/\1/')
+ MODE="LTE | $(band4g ${B})"
+ MAINCUT="$(band4g ${B})"
+ fi
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+if [ "x$T" = "xLTE" ] || [ "x$T" = "x4G" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0) T1="1.4";;
+ 1) T1="3";;
+ 2) T1="5";;
+ 3) T1="10";;
+ 4) T1="15";;
+ 5) T1="20";;
+ *) T1="?";;
+ esac
+ ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0) T1="1.4";;
+ 1) T1="3";;
+ 2) T1="5";;
+ 3) T1="10";;
+ 4) T1="15";;
+ 5) T1="20";;
+ *) T1="?";;
+ esac
+ DLBW="DL: @$T1 MHz"
+ PBAND="$MAINCUT $DLBW $ULBW"
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}')
+ PCI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $10}')
+ EARFCN=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $17}')
+ RSSI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}')
+ RSRP=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}')
+ RSRQ=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", $1*0.2-20}')
+ SINR=$T
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $4}' | xargs)
+if [ -n "$T" ]; then
+ COPS="$T"
+fi
+
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | cut -c 8-)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | cut -c 9-)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+QCCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+QCCID/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEVV=$(echo $OF | tr -s "\n" | xargs)
+FW=$(echo $DEVV | awk -F 'Revision:' '{print $2}'| xargs)
+MODEL=$(echo $DEVV | awk -F 'ati|Revision:' '{print $1}'| xargs)
+if [ -z "$MODEL" ]
+then
+ MODEL=$(echo $DEVV | awk -F 'ati|Revision:' '{print $2}'| xargs)
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices)
+PVCUT=$(echo $PV | awk -F 'Vendor=05c6 ProdID=9215' '{print $2}' | cut -c-1220)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0e8d7126 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0e8d7126
new file mode 100644
index 00000000..85964dfa
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0e8d7126
@@ -0,0 +1,310 @@
+# Fibocom modems with ProdID=0e8d +GTUSBMODE: 40
+# Fibocom FM350-GL
+
+convert_bw() {
+ case "${1}" in
+ "6") echo "1.4 MHz";;
+ "15") echo "3 MHz";;
+ "25") echo "5 MHz";;
+ "50") echo "10 MHz";;
+ "75") echo "15 MHz";;
+ "100") echo "20 MHz";;
+ "125") echo "25 MHz";;
+ "150") echo "30 MHz";;
+ "200") echo "40 MHz";;
+ "250") echo "50 MHz";;
+ "300") echo "60 MHz";;
+ "400") echo "80 MHz";;
+ "450") echo "90 MHz";;
+ "500") echo "100 MHz";;
+ "1000") echo "200 MHz";;
+ "2000") echo "400 MHz";;
+ *) echo "";;
+ esac
+}
+
+O=$(sms_tool -d $DEVICE at "AT+GTCCINFO?;+GTCAINFO?")
+
+case "$MODE_NUM" in
+ 7*)
+ if echo "$O" | grep -q -E '^SCC'; then
+ MODE="LTE-A |"
+ fi
+ ;;
+ 11*)
+ MODE="5G SA |"
+ ;;
+ 13*) MODE="5G NSA |"
+ ;;
+esac
+
+T_MODE=""
+
+T1=$(echo "$O" | grep -A3 '+GTCCINFO:' | grep "1,[49],${COPS_MCC}")
+if [ -n "$T1" ]; then
+ T_RAT=$(echo "$T1" | awk -F, '{print $2}')
+ T=$(echo "$T1" | awk -F, '{print $5}')
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $7}')
+ if [ -n "$T" ]; then
+ EARFCN=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $8}')
+ if [ -n "$T" ]; then
+ PCI=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $9}')
+ if [ -n "$T" ]; then
+ case $T_RAT in
+ 4)
+ T=$((T - 100))
+ T_MODE="$(band4g $T)"
+ PBAND="$(band4g $T)"
+ ;;
+ 9)
+ T=$(echo "$T" | sed 's/^50//')
+ T_MODE="$(band5g $T)"
+ PBAND="$(band5g $T)"
+ ;;
+ esac
+ fi
+ T=$(echo "$T1" | awk -F, '{print $11}')
+ if [ -n "$T" -a "$T" -ne "255" ]; then
+ case $T_RAT in
+ 4) SINR=$(echo "$T" | awk '{printf "%0.1f", $1/2 }');;
+ 9) SINR=$(echo "$T" | awk '{printf "%0.1f", ($1-45)/2-1 }');;
+ esac
+ fi
+ T=$(echo "$T1" | awk -F, '{print $13}')
+ if [ -n "$T" -a "$T" -ne "255" ]; then
+ case $T_RAT in
+ 4) RSRP=$((T - 141));;
+ 9) RSRP=$((T - 157));;
+ esac
+ fi
+ T=$(echo "$T1" | awk -F, '{print $14}')
+ if [ -n "$T" -a "$T" -ne "255" ]; then
+ case $T_RAT in
+ 4) RSRQ=$(echo "$T" | awk '{printf "%0.1f", ($1-34)/2-3 }');;
+ 9) RSRQ=$(echo "$T" | awk '{printf "%0.1f", ($1-87)/2 }');;
+ esac
+ fi
+ if [ -n "$CSQ" ]; then
+ RSSI=$((2 * $CSQ -113))
+ fi
+fi
+
+IFS="
+"
+IDX=1
+LINES=$(echo "$O" | grep -E '^PCC:')
+[ -n "$LINES" ] && T_MODE=""
+
+T_4G_MODE=""
+T_4G_PBAND=""
+T_4G_PCI=""
+T_4G_EARFCN=""
+
+T_5G_MODE=""
+T_5G_PBAND=""
+T_5G_PCI=""
+T_5G_EARFCN=""
+
+for LINE in $LINES; do
+ T_BAND=$(echo "$LINE" | awk -F[:,] '/^PCC:/{print $2}')
+ T_PCI=$(echo "$LINE" | awk -F[:,] '/^PCC:/{print $3}')
+ T_EARFCN=$(echo "$LINE" | awk -F[:,] '/^PCC:/{print $4}')
+ T_DBW=$(echo "$LINE" | awk -F[:,] '/^PCC:/{print $5}')
+
+ if [ -n "$T_BAND" ]; then
+ DBW=""
+ if [ -n "$T_DBW" -a "$T_DBW" -ne "0" ]; then
+ DBW=" @$(convert_bw $T_DBW)"
+ fi
+
+ if [ "$T_BAND" -lt "200" ]; then
+ T_BAND=$((T_BAND - 100))
+ T_4G_MODE="$(band4g ${T_BAND}) + "
+ T_4G_PBAND="$(band4g ${T_BAND})${DBW}"
+ T_4G_PCI="$T_PCI"
+ T_4G_EARFCN="$T_EARFCN"
+ elif [ "$T_BAND" -gt "500" ]; then
+ T_BAND=$(echo "$T_BAND" | sed 's/^50//')
+ T_5G_MODE="$(band5g ${T_BAND}) + "
+ T_5G_PBAND="$(band5g ${T_BAND})${DBW}"
+ T_5G_PCI="$T_PCI"
+ T_5G_EARFCN="$T_EARFCN"
+ fi
+ fi
+
+ IDX=$((IDX + 1))
+done
+
+if [ -n "$T_4G_PBAND" ]; then
+ PBAND="$T_4G_PBAND"
+ PCI="$T_4G_PCI"
+ EARFCN="$T_4G_EARFCN"
+elif [ -n "$T_5G_PBAND" ]; then
+ PBAND="$T_5G_PBAND"
+ PCI="$T_5G_PCI"
+ EARFCN="$T_5G_EARFCN"
+fi
+
+
+IFS="
+"
+IDX=1
+LINES=$(echo "$O" | grep -E '^SCC\s?[0-9]:2,')
+for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC\s?'$IDX':2,/{print $4}')
+ if [ -n "$T" ]; then
+ T_DBW=$(echo "$LINE" | awk -F[:,] '/^SCC\s?'$IDX':2,/{print $7}')
+ DBW=""
+ if [ -n "$T_DBW" -a "$T_DBW" -ne "0" ]; then
+ DBW=" @$(convert_bw $T_DBW)"
+ fi
+ T2=""
+ if [ "$T" -lt "200" ]; then
+ T=$((T - 100))
+ T2="$(band4g $T)${DBW}"
+ T_4G_MODE="${T_4G_MODE}$(band4g $T) / "
+ elif [ "$T" -gt "500" ]; then
+ T=$(echo "$T" | sed 's/^50//')
+ T2="$(band5g $T)${DBW}"
+ T_5G_MODE="${T_5G_MODE}$(band5g $T) / "
+ fi
+ if [ -n "$T2" ]; then
+ case $IDX in
+ "1") S1BAND="$T2";;
+ "2") S2BAND="$T2";;
+ "3") S3BAND="$T2";;
+ "4") S4BAND="$T2";;
+ *);;
+ esac
+ fi
+ fi
+
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC\s?'$IDX':2,/{print $5}')
+ if [ -n "$T" ]; then
+ case $IDX in
+ "1") S1PCI="$T";;
+ "2") S2PCI="$T";;
+ "3") S3PCI="$T";;
+ "4") S4PCI="$T";;
+ *);;
+ esac
+ fi
+
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC\s?'$IDX':2,/{print $6}')
+ if [ -n "$T" ]; then
+ case $IDX in
+ "1") S1EARFCN="$T";;
+ "2") S2EARFCN="$T";;
+ "3") S3EARFCN="$T";;
+ "4") S4EARFCN="$T";;
+ *);;
+ esac
+ fi
+
+ IDX=$((IDX + 1))
+done
+
+T_4G_MODE=$(echo "$T_4G_MODE" | sed 's/ [\/\+] $//')
+T_5G_MODE=$(echo "$T_5G_MODE" | sed 's/ [\/\+] $//')
+
+if [ -n "$T_4G_PBAND" -a -n "$T_5G_PBAND" ]; then
+ if [ -n "$T_5G_PBAND" ]; then
+ case $IDX in
+ "1") S1BAND="$T_5G_PBAND";;
+ "2") S2BAND="$T_5G_PBAND";;
+ "3") S3BAND="$T_5G_PBAND";;
+ "4") S4BAND="$T_5G_PBAND";;
+ *);;
+ esac
+ fi
+
+ if [ -n "$T_5G_PCI" ]; then
+ case $IDX in
+ "1") S1PCI="$T_5G_PCI";;
+ "2") S2PCI="$T_5G_PCI";;
+ "3") S3PCI="$T_5G_PCI";;
+ "4") S4PCI="$T_5G_PCI";;
+ *);;
+ esac
+ fi
+
+ if [ -n "$T_5G_EARFCN" ]; then
+ case $IDX in
+ "1") S1EARFCN="$T_5G_EARFCN";;
+ "2") S2EARFCN="$T_5G_EARFCN";;
+ "3") S3EARFCN="$T_5G_EARFCN";;
+ "4") S4EARFCN="$T_5G_EARFCN";;
+ *);;
+ esac
+ fi
+fi
+
+if [ -z "$T_MODE" ]; then
+ if [ -n "$T_4G_MODE" ]; then
+ MODE="$MODE $T_4G_MODE"
+ fi
+
+ if [ -n "$T_5G_MODE" ]; then
+ [ -n "$T_4G_MODE" ] && MODE="$MODE /"
+ MODE="$MODE $T_5G_MODE"
+ fi
+fi
+
+# Modem
+OA=$(sms_tool -d $DEVICE at "AT+CGMM?")
+MODELA=$(echo "$OA" | awk -F [:,] '/\+CGMM/{print $2}' | xargs)
+OB=$(sms_tool -d $DEVICE at "AT+CGMI?")
+MODELB=$(echo "$OB" | awk -F [:,] '/\+CGMI/{print $2}' | xargs)
+MODELBCUT=$(echo $MODELB | sed s/"Wireless Inc."//)
+MODEL="$MODELBCUT $MODELA"
+
+OF=$(sms_tool -d $DEVICE at "AT+GMR?")
+FW=$(echo "$OF" | awk -F[,:] '/\+GMR:/ {print $2}' | xargs)
+
+# International Mobile Equipment Identity (IMEI)
+OAA=$(sms_tool -d $DEVICE at "AT+CGSN?")
+NR_IMEI=$(echo "$OAA" | awk -F[,:] '/\+CGSN:/ {print $2}' | xargs)
+
+# International Mobile Subscriber Identity (IMSI)
+OBB=$(sms_tool -d $DEVICE at "AT+CIMI?")
+NR_IMSI=$(echo "$OBB" | awk -F [,:] '/\+CIMI:/ {print $2}' | xargs)
+
+# Integrated Circuit Card Identifier (ICCID)
+OCC=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_ICCID=$(echo "$OCC" | awk -F [,:] '/\+ICCID:/ {print $2}' | xargs)
+
+# Temp
+OT=$(sms_tool -d $DEVICE at "AT+GTSENRDTEMP=1")
+TM=$(echo "$OT" | awk -F, '/\+GTSENRDTEMP:/{printf "%.1f", $2/1000}' | xargs)
+if [ -n "$TM" ]; then
+ TEMP="$TM °C"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+
+TTY=$(basename $DEVICE)
+devpath=$(readlink -f /sys/class/tty/$TTY/device)
+BASE=$(readlink -f ${devpath%/*/*})
+
+NETIF=$(for a in /sys/class/net/*; do readlink -f $a; done | grep "$BASE")
+NETDRV=$(basename $(readlink -f $NETIF/../../driver))
+
+case $NETDRV in
+ "qmi_wwan")
+ PROTO="qmi";;
+ "cdc_mbim")
+ PROTO="mbim";;
+ "cdc_ether")
+ PROTO="ecm";;
+ "rndis_host")
+ PROTO="ncm";;
+esac
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0e8d7127 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0e8d7127
new file mode 100644
index 00000000..d4627c07
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0e8d7127
@@ -0,0 +1,310 @@
+# Fibocom modems with ProdID=0e8d +GTUSBMODE: 41
+# Fibocom FM350-GL
+
+convert_bw() {
+ case "${1}" in
+ "6") echo "1.4 MHz";;
+ "15") echo "3 MHz";;
+ "25") echo "5 MHz";;
+ "50") echo "10 MHz";;
+ "75") echo "15 MHz";;
+ "100") echo "20 MHz";;
+ "125") echo "25 MHz";;
+ "150") echo "30 MHz";;
+ "200") echo "40 MHz";;
+ "250") echo "50 MHz";;
+ "300") echo "60 MHz";;
+ "400") echo "80 MHz";;
+ "450") echo "90 MHz";;
+ "500") echo "100 MHz";;
+ "1000") echo "200 MHz";;
+ "2000") echo "400 MHz";;
+ *) echo "";;
+ esac
+}
+
+O=$(sms_tool -d $DEVICE at "AT+GTCCINFO?;+GTCAINFO?")
+
+case "$MODE_NUM" in
+ 7*)
+ if echo "$O" | grep -q -E '^SCC'; then
+ MODE="LTE-A |"
+ fi
+ ;;
+ 11*)
+ MODE="5G SA |"
+ ;;
+ 13*) MODE="5G NSA |"
+ ;;
+esac
+
+T_MODE=""
+
+T1=$(echo "$O" | grep -A3 '+GTCCINFO:' | grep "1,[49],${COPS_MCC}")
+if [ -n "$T1" ]; then
+ T_RAT=$(echo "$T1" | awk -F, '{print $2}')
+ T=$(echo "$T1" | awk -F, '{print $5}')
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $7}')
+ if [ -n "$T" ]; then
+ EARFCN=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $8}')
+ if [ -n "$T" ]; then
+ PCI=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $9}')
+ if [ -n "$T" ]; then
+ case $T_RAT in
+ 4)
+ T=$((T - 100))
+ T_MODE="$(band4g $T)"
+ PBAND="$(band4g $T)"
+ ;;
+ 9)
+ T=$(echo "$T" | sed 's/^50//')
+ T_MODE="$(band5g $T)"
+ PBAND="$(band5g $T)"
+ ;;
+ esac
+ fi
+ T=$(echo "$T1" | awk -F, '{print $11}')
+ if [ -n "$T" -a "$T" -ne "255" ]; then
+ case $T_RAT in
+ 4) SINR=$(echo "$T" | awk '{printf "%0.1f", $1/2 }');;
+ 9) SINR=$(echo "$T" | awk '{printf "%0.1f", ($1-45)/2-1 }');;
+ esac
+ fi
+ T=$(echo "$T1" | awk -F, '{print $13}')
+ if [ -n "$T" -a "$T" -ne "255" ]; then
+ case $T_RAT in
+ 4) RSRP=$((T - 141));;
+ 9) RSRP=$((T - 157));;
+ esac
+ fi
+ T=$(echo "$T1" | awk -F, '{print $14}')
+ if [ -n "$T" -a "$T" -ne "255" ]; then
+ case $T_RAT in
+ 4) RSRQ=$(echo "$T" | awk '{printf "%0.1f", ($1-34)/2-3 }');;
+ 9) RSRQ=$(echo "$T" | awk '{printf "%0.1f", ($1-87)/2 }');;
+ esac
+ fi
+ if [ -n "$CSQ" ]; then
+ RSSI=$((2 * $CSQ -113))
+ fi
+fi
+
+IFS="
+"
+IDX=1
+LINES=$(echo "$O" | grep -E '^PCC:')
+[ -n "$LINES" ] && T_MODE=""
+
+T_4G_MODE=""
+T_4G_PBAND=""
+T_4G_PCI=""
+T_4G_EARFCN=""
+
+T_5G_MODE=""
+T_5G_PBAND=""
+T_5G_PCI=""
+T_5G_EARFCN=""
+
+for LINE in $LINES; do
+ T_BAND=$(echo "$LINE" | awk -F[:,] '/^PCC:/{print $2}')
+ T_PCI=$(echo "$LINE" | awk -F[:,] '/^PCC:/{print $3}')
+ T_EARFCN=$(echo "$LINE" | awk -F[:,] '/^PCC:/{print $4}')
+ T_DBW=$(echo "$LINE" | awk -F[:,] '/^PCC:/{print $5}')
+
+ if [ -n "$T_BAND" ]; then
+ DBW=""
+ if [ -n "$T_DBW" -a "$T_DBW" -ne "0" ]; then
+ DBW=" @$(convert_bw $T_DBW)"
+ fi
+
+ if [ "$T_BAND" -lt "200" ]; then
+ T_BAND=$((T_BAND - 100))
+ T_4G_MODE="$(band4g ${T_BAND}) + "
+ T_4G_PBAND="$(band4g ${T_BAND})${DBW}"
+ T_4G_PCI="$T_PCI"
+ T_4G_EARFCN="$T_EARFCN"
+ elif [ "$T_BAND" -gt "500" ]; then
+ T_BAND=$(echo "$T_BAND" | sed 's/^50//')
+ T_5G_MODE="$(band5g ${T_BAND}) + "
+ T_5G_PBAND="$(band5g ${T_BAND})${DBW}"
+ T_5G_PCI="$T_PCI"
+ T_5G_EARFCN="$T_EARFCN"
+ fi
+ fi
+
+ IDX=$((IDX + 1))
+done
+
+if [ -n "$T_4G_PBAND" ]; then
+ PBAND="$T_4G_PBAND"
+ PCI="$T_4G_PCI"
+ EARFCN="$T_4G_EARFCN"
+elif [ -n "$T_5G_PBAND" ]; then
+ PBAND="$T_5G_PBAND"
+ PCI="$T_5G_PCI"
+ EARFCN="$T_5G_EARFCN"
+fi
+
+
+IFS="
+"
+IDX=1
+LINES=$(echo "$O" | grep -E '^SCC\s?[0-9]:2,')
+for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC\s?'$IDX':2,/{print $4}')
+ if [ -n "$T" ]; then
+ T_DBW=$(echo "$LINE" | awk -F[:,] '/^SCC\s?'$IDX':2,/{print $7}')
+ DBW=""
+ if [ -n "$T_DBW" -a "$T_DBW" -ne "0" ]; then
+ DBW=" @$(convert_bw $T_DBW)"
+ fi
+ T2=""
+ if [ "$T" -lt "200" ]; then
+ T=$((T - 100))
+ T2="$(band4g $T)${DBW}"
+ T_4G_MODE="${T_4G_MODE}$(band4g $T) / "
+ elif [ "$T" -gt "500" ]; then
+ T=$(echo "$T" | sed 's/^50//')
+ T2="$(band5g $T)${DBW}"
+ T_5G_MODE="${T_5G_MODE}$(band5g $T) / "
+ fi
+ if [ -n "$T2" ]; then
+ case $IDX in
+ "1") S1BAND="$T2";;
+ "2") S2BAND="$T2";;
+ "3") S3BAND="$T2";;
+ "4") S4BAND="$T2";;
+ *);;
+ esac
+ fi
+ fi
+
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC\s?'$IDX':2,/{print $5}')
+ if [ -n "$T" ]; then
+ case $IDX in
+ "1") S1PCI="$T";;
+ "2") S2PCI="$T";;
+ "3") S3PCI="$T";;
+ "4") S4PCI="$T";;
+ *);;
+ esac
+ fi
+
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC\s?'$IDX':2,/{print $6}')
+ if [ -n "$T" ]; then
+ case $IDX in
+ "1") S1EARFCN="$T";;
+ "2") S2EARFCN="$T";;
+ "3") S3EARFCN="$T";;
+ "4") S4EARFCN="$T";;
+ *);;
+ esac
+ fi
+
+ IDX=$((IDX + 1))
+done
+
+T_4G_MODE=$(echo "$T_4G_MODE" | sed 's/ [\/\+] $//')
+T_5G_MODE=$(echo "$T_5G_MODE" | sed 's/ [\/\+] $//')
+
+if [ -n "$T_4G_PBAND" -a -n "$T_5G_PBAND" ]; then
+ if [ -n "$T_5G_PBAND" ]; then
+ case $IDX in
+ "1") S1BAND="$T_5G_PBAND";;
+ "2") S2BAND="$T_5G_PBAND";;
+ "3") S3BAND="$T_5G_PBAND";;
+ "4") S4BAND="$T_5G_PBAND";;
+ *);;
+ esac
+ fi
+
+ if [ -n "$T_5G_PCI" ]; then
+ case $IDX in
+ "1") S1PCI="$T_5G_PCI";;
+ "2") S2PCI="$T_5G_PCI";;
+ "3") S3PCI="$T_5G_PCI";;
+ "4") S4PCI="$T_5G_PCI";;
+ *);;
+ esac
+ fi
+
+ if [ -n "$T_5G_EARFCN" ]; then
+ case $IDX in
+ "1") S1EARFCN="$T_5G_EARFCN";;
+ "2") S2EARFCN="$T_5G_EARFCN";;
+ "3") S3EARFCN="$T_5G_EARFCN";;
+ "4") S4EARFCN="$T_5G_EARFCN";;
+ *);;
+ esac
+ fi
+fi
+
+if [ -z "$T_MODE" ]; then
+ if [ -n "$T_4G_MODE" ]; then
+ MODE="$MODE $T_4G_MODE"
+ fi
+
+ if [ -n "$T_5G_MODE" ]; then
+ [ -n "$T_4G_MODE" ] && MODE="$MODE /"
+ MODE="$MODE $T_5G_MODE"
+ fi
+fi
+
+# Modem
+OA=$(sms_tool -d $DEVICE at "AT+CGMM?")
+MODELA=$(echo "$OA" | awk -F [:,] '/\+CGMM/{print $2}' | xargs)
+OB=$(sms_tool -d $DEVICE at "AT+CGMI?")
+MODELB=$(echo "$OB" | awk -F [:,] '/\+CGMI/{print $2}' | xargs)
+MODELBCUT=$(echo $MODELB | sed s/"Wireless Inc."//)
+MODEL="$MODELBCUT $MODELA"
+
+OF=$(sms_tool -d $DEVICE at "AT+GMR?")
+FW=$(echo "$OF" | awk -F[,:] '/\+GMR:/ {print $2}' | xargs)
+
+# International Mobile Equipment Identity (IMEI)
+OAA=$(sms_tool -d $DEVICE at "AT+CGSN?")
+NR_IMEI=$(echo "$OAA" | awk -F[,:] '/\+CGSN:/ {print $2}' | xargs)
+
+# International Mobile Subscriber Identity (IMSI)
+OBB=$(sms_tool -d $DEVICE at "AT+CIMI?")
+NR_IMSI=$(echo "$OBB" | awk -F [,:] '/\+CIMI:/ {print $2}' | xargs)
+
+# Integrated Circuit Card Identifier (ICCID)
+OCC=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_ICCID=$(echo "$OCC" | awk -F [,:] '/\+ICCID:/ {print $2}' | xargs)
+
+# Temp
+OT=$(sms_tool -d $DEVICE at "AT+GTSENRDTEMP=1")
+TM=$(echo "$OT" | awk -F, '/\+GTSENRDTEMP:/{printf "%.1f", $2/1000}' | xargs)
+if [ -n "$TM" ]; then
+ TEMP="$TM °C"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+
+TTY=$(basename $DEVICE)
+devpath=$(readlink -f /sys/class/tty/$TTY/device)
+BASE=$(readlink -f ${devpath%/*/*})
+
+NETIF=$(for a in /sys/class/net/*; do readlink -f $a; done | grep "$BASE")
+NETDRV=$(basename $(readlink -f $NETIF/../../driver))
+
+case $NETDRV in
+ "qmi_wwan")
+ PROTO="qmi";;
+ "cdc_mbim")
+ PROTO="mbim";;
+ "cdc_ether")
+ PROTO="ecm";;
+ "rndis_host")
+ PROTO="ncm";;
+esac
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0f3d68aa b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0f3d68aa
new file mode 100644
index 00000000..908ced85
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/0f3d68aa
@@ -0,0 +1,84 @@
+# Sierra Wireless 320u
+
+O=$(sms_tool -d $DEVICE at "at!gstatus?")
+
+T=$(echo "$O" | awk '/^LTE band:/ {print $3}' | xargs)
+if [ -n "$T" ]; then
+ case "$T" in
+ *"B1") MODE=$(band 1 "LTE ");;
+ *"B3") MODE=$(band 3 "LTE ");;
+ *"B5") MODE=$(band 5 "LTE ");;
+ *"B7") MODE=$(band 7 "LTE ");;
+ *"B8") MODE=$(band 8 "LTE ");;
+ *) MODE="LTE ${T}";;
+ esac
+fi
+
+T=$(echo "$O" | awk '/^RSSI/ {print $3}' | xargs)
+if [ -n "$T" ]; then
+ RSSI="${T// //}"
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSSI":"'${T// //}' dBm"}'
+fi
+
+T=$(echo "$O" | awk '/^RSRP/ {print $3}' | xargs)
+if [ -n "$T" ]; then
+ RSRP="${T// //}"
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRP":"'${T// //}' dBm"}'
+fi
+T=$(echo "$O" | awk '/^RSRQ/ {print $3}' | xargs)
+if [ -n "$T" ]; then
+ RSRQ="$T"
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRQ":"'$T' dB"}'
+fi
+T=$(echo "$O" | awk '/^SINR/ {print $3}' | xargs)
+if [ -n "$T" ]; then
+ SINR="$T"
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"SINR":"'$T' dB"}'
+fi
+
+T=$(echo "$O" | awk -F: '/Temperature:/ {print $3}' | xargs)
+if [ -n "$T" ]; then
+ TEMP="$T °C"
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"Temperatura":"'$T' °C"}'
+fi
+
+TAC_HEX=$(echo "$O" |awk -F: '/TAC:/ {print $3}' | awk '{ print $1 }' | xargs)
+TAC_DEC=$(echo "$O" | sed 's/[()]//g' |awk -F: '/TAC:/ {print $3}' | awk '{ print $2 }' | xargs)
+
+
+BW=$(echo "$O" |awk -F: '/LTE bw:/ {print $3}' | xargs)
+RXCH=$(echo "$O" |awk -F: '/LTE Rx chan:/ {print $2}' | cut -f1 | xargs)
+TXCH=$(echo "$O" |awk -F: '/LTE Tx chan:/ {print $3}' | cut -f1 | xargs)
+
+PBAND="RxCh:$RXCH / TxCh:$TXCH / Bw:$BW"
+#EARFCN=$(echo "$O" |awk -F: '/^LTE Rx chan:/ {print $2}' | cut -f1 | xargs)
+PCI="-"
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+MODELB=$(echo $DEV2 | awk -F 'Manufacturer:|Revision:' '{print $2}'| xargs)
+MODEL=$(echo $MODELB | sed 's/Model://' | xargs)
+
+FW=$(echo $DEV2 | awk -F 'Revision:|IMEI' '{print $2}'| xargs)
+NR_IMEI=$(echo "$OF" | awk '/^IMEI:/ {print $2}' | xargs)
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed 's/AT+CIMI//g' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_ICCID=$(echo "$O" | awk '/^ICCID/ {print $2}')
+
+PROTO=sierra
+
+
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/119968a2 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/119968a2
new file mode 100644
index 00000000..24e1632e
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/119968a2
@@ -0,0 +1,39 @@
+# Sierra Wireless MC7710
+
+O=$(sms_tool -d $DEVICE at "at!gstatus?")
+
+T=$(echo "$O" | awk -F: '/Temperature:/ {print $3}' | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "$REGOK" = "1" ]; then
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk '/.*TAC:/ {print $5}')
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ TAC="${T_DEC} ($T)"
+ fi
+
+ T=$(echo "$O" | awk '/^RSSI/ {print $3}')
+ [ -n "$T" ] && RSSI="$T"
+ T=$(echo "$O" | awk '/^RSRP/ {print $3}')
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk '/^RSRQ/ {print $3}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk '/^SINR/ {print $3}')
+ [ -n "$T" ] && SINR="$T"
+
+ T=$(echo "$O" | awk '/^LTE band:/ {print $3}')
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE band:/ {print $6}')
+ PBAND="$(band4g ${T/B/}) @${T1} MHz"
+ MODE="LTE $(band4g ${T/B/})"
+ fi
+ T=$(echo "$O" | awk '/^LTE Rx chan:/ {print $4}')
+# [ -n "$T" ] && addon 34 "EARFCN DL" "$T"
+ T=$(echo "$O" | awk '/^LTE Rx chan:/ {print $8}')
+# [ -n "$T" ] && addon 34 "EARFCN UL" "$T"
+fi
+
+fi
+
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/11999041 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/11999041
new file mode 100644
index 00000000..0cafb041
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/11999041
@@ -0,0 +1,103 @@
+# Sierra Wireless EM7355 (maybe? I do not own one to test with)
+# Sierra Wireless MC7355
+
+O=$(sms_tool -d $DEVICE at "at!gstatus?")
+
+T=$(echo "$O" | awk -F: '/Temperature:/ {print $3}' | grep -oE "\d+\.?\d{0,2}")
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk '/.*TAC:/ {print $5}')
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+ fi
+
+ T=$(echo "$O" | awk '/^PCC.*RSSI/ {print $4}' | xargs)
+ [ -n "$T" ] && RSSI="${T// //}"
+ T=$(echo "$O" | awk '/^PCC.*RSRP/ {print $7}' | xargs)
+ [ -n "$T" ] && RSRP="${T// //}"
+ T=$(echo "$O" | awk '/^RSRQ/ {print $3}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk '/^SINR/ {print $3}')
+ [ -n "$T" ] && SINR="$T"
+
+ T=$(echo "$O" | awk '/^LTE band:/ {print $3}')
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE band:/ {print $6}')
+ PBAND="$(band4g ${T/B/}) @${T1} MHz"
+ MODE="$MODE $(band4g ${T/B/})"
+ fi
+ T=$(echo "$O" | awk '/^LTE Rx chan:/ {print $4}')
+# [ -n "$T" ] && addon 34 "EARFCN DL" "$T"
+ T=$(echo "$O" | awk '/^LTE Rx chan:/ {print $8}')
+# [ -n "$T" ] && addon 34 "EARFCN UL" "$T"
+
+ T=$(echo "$O" | awk -F: '/^LTE CA state:.*ACTIVE/ {print $3}')
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE Scell bw:/ {print $3}')
+ if [ -n "$T1" ]; then
+ S1BAND="$(band ${T/B/}) @${T1#bw:} MHz"
+ else
+ S1BAND="$(band ${T/B/})"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $(band4g ${T/B/})"
+
+ T=$(echo "$O" | awk '/.*LTE Scell chan:/ {print $7}')
+ [ -n "$T" ] && S1EARFCN="${T#chan:}"
+
+ T=$(echo "$O" | awk '/^SCC.*RSSI/ {print $4}' | xargs)
+ [ -n "$T" ] && RSSI="${T// //}"
+ T=$(echo "$O" | awk '/^SCC.*RSRP/ {print $7}' | xargs)
+ [ -n "$T" ] && RSRP="${T// //}"
+ fi
+fi
+
+MODE=$(echo $MODE | sed "s/LTE_A/LTE-A |/g" | sed 's,/,+,')
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+CGMR "//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "// | cut -f1 -d",")
+MODEL="$MODELBCUT "$MODELACUT
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F[,:] '/^ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices)
+PVCUT=$(echo $PV | awk -F 'Vendor=1199 ProdID=9041' '{print $2}' | cut -c-1100)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/11999071 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/11999071
new file mode 100644
index 00000000..f1e1601c
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/11999071
@@ -0,0 +1,104 @@
+# DW5809e Dell Wireless 5809e Gobi 4G LTE Mobile Broadband Card (EM7305)
+# DW5811e Snapdragon X7 LTE (EM7455B)
+# Sierra Wireless EM7455
+
+O=$(sms_tool -d $DEVICE at "at!gstatus?")
+
+T=$(echo "$O" | awk -F: '/Temperature:/ {print $3}' | grep -oE "\d+\.?\d{0,2}")
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk '/.*TAC:/ {print $5}')
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+ fi
+
+ T=$(echo "$O" | awk '/^PCC.*RSSI/ {print $4}' | xargs)
+ [ -n "$T" ] && RSSI="${T// //}"
+ T=$(echo "$O" | awk '/^PCC.*RSRP/ {print $7}' | xargs)
+ [ -n "$T" ] && RSRP="${T// //}"
+ T=$(echo "$O" | awk '/^RSRQ/ {print $3}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk '/^SINR/ {print $3}')
+ [ -n "$T" ] && SINR="$T"
+
+ T=$(echo "$O" | awk '/^LTE band:/ {print $3}')
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE band:/ {print $6}')
+ PBAND="$(band4g ${T/B/}) @${T1} MHz"
+ MODE="$MODE $(band4g ${T/B/})"
+ fi
+ T=$(echo "$O" | awk '/^LTE Rx chan:/ {print $4}')
+# [ -n "$T" ] && addon 34 "EARFCN DL" "$T"
+ T=$(echo "$O" | awk '/^LTE Rx chan:/ {print $8}')
+# [ -n "$T" ] && addon 34 "EARFCN UL" "$T"
+
+ T=$(echo "$O" | awk -F: '/^LTE CA state:.*ACTIVE/ {print $3}')
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE Scell bw:/ {print $3}')
+ if [ -n "$T1" ]; then
+ S1BAND="$(band4g ${T/B/}) @${T1#bw:} MHz"
+ else
+ S1BAND="$(band4g ${T/B/})"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $(band4g ${T/B/})"
+
+ T=$(echo "$O" | awk '/.*LTE Scell chan:/ {print $7}')
+ [ -n "$T" ] && S1EARFCN="${T#chan:}"
+
+ T=$(echo "$O" | awk '/^SCC.*RSSI/ {print $4}' | xargs)
+ [ -n "$T" ] && RSSI="${T// //} dBm"
+ T=$(echo "$O" | awk '/^SCC.*RSRP/ {print $7}' | xargs)
+ [ -n "$T" ] && RSRP="${T// //} dBm"
+ fi
+fi
+
+MODE=$(echo $MODE | sed "s/LTE_A/LTE-A |/g" | sed 's,/,+,')
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+CGMR "//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "// | cut -f1 -d",")
+MODEL="$MODELBCUT "$MODELACUT
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F[,:] '/^ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices)
+PVCUT=$(echo $PV | awk -F 'Vendor=1199 ProdID=9071' '{print $2}' | cut -c-1100)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/119990d3 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/119990d3
new file mode 100644
index 00000000..b98ee6a8
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/119990d3
@@ -0,0 +1,147 @@
+# Sierra Wireless EM9190
+
+O=$(sms_tool -d $DEVICE at "at!gstatus?")
+
+T=$(echo "$O" | awk -F: '/Temperature:/ {print $3}')
+[ -n "$T" ] && TEMP="$T °C"
+
+
+T=$(echo "$O" | awk '/^System mode:/ {print $3}')
+case $T in
+ "LTE")
+ MODE="LTE"
+ ;;
+ "ENDC")
+ MODE="5G NSA"
+ ;;
+esac
+
+T=$(echo "$O" | awk '/.*TAC:/ {print $6}')
+if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+fi
+
+T=$(echo "$O" | awk '/^PCC.*RSSI/ {print $4}' | xargs)
+[ -n "$T" ] && && RSSI="${T// //}"
+T=$(echo "$O" | awk '/^PCC.*RSRP/ {print $8}' | xargs)
+[ -n "$T" ] && RSRP="${T// //}"
+T=$(echo "$O" | awk '/^RSRQ/ {print $3}')
+[ -n "$T" ] && RSRQ="$T"
+T=$(echo "$O" | awk '/^SINR/ {print $3}')
+[ -n "$T" ] && SINR="$T"
+
+T=$(echo "$O" | awk '/^LTE band:/ {print $3}')
+if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE band:/ {print $6}')
+ PBAND="$(band4g ${T/B/}) @${T1} MHz"
+ MODE="$MODE $(band4g ${T/B/})"
+fi
+T=$(echo "$O" | awk '/^LTE Rx chan:/ {print $4}')
+# [ -n "$T" ] && addon 34 "EARFCN DL" "$T"
+T=$(echo "$O" | awk '/^LTE Rx chan:/ {print $8}')
+# [ -n "$T" ] && addon 34 "EARFCN UL" "$T"
+
+T=$(echo "$O" | awk -F: '/^LTE SCC1 state:.*ACTIVE/ {print $3}')
+if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE SCC1 bw/ {print $5}')
+ if [ -n "$T1" ]; then
+ S1BAND=$(band4g ${T/B/}) @${T1} MHz"
+ else
+ S1BAND="$(band4g ${T/B/})"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $(band4g ${T/B/})"
+
+ T=$(echo "$O" | awk '/.*LTE SCC1 Rx chan:/ {print $11}')
+# [ -n "$T" ] && addon 54 "(S1) EARFCN DL" "${T}"
+ T=$(echo "$O" | awk '/.*LTE SCC1 Tx chan:/ {print $10}')
+# [ -n "$T" ] && addon 54 "(S1) EARFCN UL" "${T}"
+
+ T=$(echo "$O" | awk '/^SCC1.*RSSI/ {print $4}' | xargs)
+# [ -n "$T" ] && addon 55 "(S1) RSSI" "${T// //} dBm"
+ T=$(echo "$O" | awk '/^SCC1.*RSRP/ {print $8}' | xargs)
+# [ -n "$T" ] && addon 56 "(S1) RSRP" "${T// //} dBm"
+fi
+
+T=$(echo "$O" | awk -F: '/^LTE SCC2 state:.*ACTIVE/ {print $3}')
+if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE SCC2 bw/ {print $5}')
+ if [ -n "$T1" ]; then
+ S2BAND="$(band4g ${T/B/}) @${T1} MHz"
+ else
+ S2BAND="$(band4g ${T/B/})"
+ fi
+ MODE="$MODE / $(band4g ${T/B/})"
+
+ T=$(echo "$O" | awk '/.*LTE SCC2 Rx chan:/ {print $11}')
+# [ -n "$T" ] && addon 64 "(S2) EARFCN DL" "${T}"
+ T=$(echo "$O" | awk '/.*LTE SCC2 Tx chan:/ {print $10}')
+# [ -n "$T" ] && addon 64 "(S2) EARFCN UL" "${T}"
+
+ T=$(echo "$O" | awk '/^SCC2.*RSSI/ {print $4}' | xargs)
+# [ -n "$T" ] && addon 65 "(S2) RSSI" "${T// //} dBm"
+ T=$(echo "$O" | awk '/^SCC2.*RSRP/ {print $8}' | xargs)
+# [ -n "$T" ] && addon 66 "(S2) RSRP" "${T// //} dBm"
+fi
+
+T=$(echo "$O" | awk -F: '/^LTE SCC3 state:.*ACTIVE/ {print $3}')
+if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE SCC3 bw/ {print $5}')
+ if [ -n "$T1" ]; then
+ S3BAND"$(band4g ${T/B/}) @${T1} MHz"
+ else
+ S3BAND"$(band4g ${T/B/})"
+ fi
+ MODE="$MODE / $(band4g ${T/B/})"
+
+ T=$(echo "$O" | awk '/.*LTE SCC3 Rx chan:/ {print $11}')
+# [ -n "$T" ] && addon 74 "(S3) EARFCN DL" "${T}"
+ T=$(echo "$O" | awk '/.*LTE SCC3 Tx chan:/ {print $10}')
+# [ -n "$T" ] && addon 74 "(S3) EARFCN UL" "${T}"
+
+ T=$(echo "$O" | awk '/^SCC3.*RSSI/ {print $4}' | xargs)
+# [ -n "$T" ] && addon 75 "(S3) RSSI" "${T// //} dBm"
+ T=$(echo "$O" | awk '/^SCC3.*RSRP/ {print $8}' | xargs)
+# [ -n "$T" ] && addon 76 "(S3) RSRP" "${T// //} dBm"
+fi
+
+T=$(echo "$O" | awk '/^SCC. NR5G band:/ {print $4}')
+if [ -n "$T" ] && [ "$T" != "---" ]; then
+ MODE="$MODE / $(band5g ${T/n/})"
+ T1=$(echo "$O" | awk '/^SCC.*SCC. NR5G bw:/ {print $8}')
+ if [ -n "$T1" ]; then
+# addon 80 "5G band" "$(band5g ${T/n/}) @${T1} MHz"
+ else
+# addon 80 "5G band" "$(band5g ${T/n/})"
+ fi
+ T=$(echo "$O" | awk '/^SCC. NR5G Rx chan:/ {print $5}')
+# [ -n "$T" ] && addon 84 "EARFCN DL" "$T"
+ T=$(echo "$O" | awk '/^SCC.*SCC. NR5G Tx chan:/ {print $10}')
+# [ -n "$T" ] && addon 84 "EARFCN UL" "$T"
+ T=$(echo "$O" | awk '/^NR5G RSRP/ {print $4}')
+# [ -n "$T" ] && addon 86 "RSRP" "$T dBm"
+ T=$(echo "$O" | awk '/^NR5G.*RSRQ/ {print $8}')
+# [ -n "$T" ] && addon 87 "RSRQ" "$T dB"
+ T=$(echo "$O" | awk '/^NR5G SINR/ {print $4}')
+# [ -n "$T" ] && addon 88 "RSRP" "$T dBm"
+fi
+
+MODE=$(echo $MODE | sed "s/LTE_A/LTE-A |/g" | sed 's,/,+,')
+
+# Modem
+
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices)
+PVCUT=$(echo $PV | awk -F 'Vendor=1199 ProdID=90d3' '{print $2}' | cut -c-1100)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d11506 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d11506
new file mode 100644
index 00000000..21c75dcf
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d11506
@@ -0,0 +1,122 @@
+# Huawei E3272/E3372/E3276
+
+O=$(sms_tool -d $DEVICE at "at^chiptemp?;^hcsq?;^iccid?")
+
+T=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ MODE="$T"
+
+ case "$MODE" in
+ WCDMA*)
+ PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}' | xargs)
+ PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}' | xargs)
+ RSCP=$(awk 'BEGIN {print -121 + '$PARAM2'}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSCP":"'$RSCP' dBm"}'
+ ECIO=$(awk 'BEGIN {print -32.5 + '$PARAM3'/2}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"ECIO":"'$ECIO' dB"}'
+ ;;
+ LTE*)
+ PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}' | xargs)
+ PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}' | xargs)
+ PARAM4=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $6}' | xargs)
+ RSRP=$(awk 'BEGIN {print -141 + '$PARAM2'}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRP":"'$RSRP' dBm"}'
+ SINR=$(awk 'BEGIN {print -20.2 + '$PARAM3'/5}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"SINR":"'$SINR' dB"}'
+ RSRQ=$(awk 'BEGIN {print -20 + '$PARAM4'/2}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRQ":"'$RSRQ' dB"}'
+ ;;
+ esac
+fi
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+MODELB=$(echo $DEV2 | awk -F 'Manufacturer:|Revision:' '{print $2}'| xargs)
+MODELC=$(echo $MODELB | sed 's/Model://' | xargs)
+MODEL=$(echo $MODELC | awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}')
+FW=$(echo $DEV2 | awk -F 'Revision:|IMEI' '{print $2}'| xargs)
+
+# Protocol
+# Driver=qmi_wwan & Driver=cdc_mbim & Driver=cdc_ether & Driver=huawei_cdc_ncm
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=12d1 ProdID=1506' '{print $2}' | cut -c-1104)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+elif echo "$PVCUT" | grep -q "cdc_ncm"
+then
+ PROTO="ncm"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+OI=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$OI" | sed 's/AT+GSN//g' | xargs)
+if [ -n "NR_I" ]
+then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+OC=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$OC" | sed 's/AT+CIMI//g' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+NR_D=$(echo "$O" | awk -F [:] '/^\^ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+XFR=$(sms_tool -d $DEVICE at "at^hfreqinfo?")
+XFRCOUNT=$(echo -n "$XFR" | wc -c)
+
+if [ -n "$XFR" ] && [ "$XFRCOUNT" -gt "15" ]; then
+
+# DL / UL / Band
+TBX=$(echo "$XFR" | awk -F [:] '/^\^HFREQINFO:/{print $2}' | xargs)
+TB=$(echo "$TBX" | cut -d ',' -f3-3 )
+
+TDL=$(echo "$TBX" | cut -d ',' -f6-6 )
+DL=$(($TDL/1000))
+
+TUL=$(echo "$TBX" | cut -d ',' -f9-9 )
+UL=$(($TUL/1000))
+
+ULBW="UL: @$UL MHz"
+DLBW="DL: @$DL MHz"
+
+PBAND="$(band4g $TB "") $DLBW $ULBW"
+EARFCN=$(echo "$TBX" | cut -d ',' -f4-4 )
+PCI="-"
+
+if [[ "$MODE" == *"LTE"* ]] && [ -n "$TB" ]; then
+MODE="LTE | "$(band4g $TB "")
+fi
+
+fi
+
+# LAC & TAC
+T_HEX=$LAC_HEX
+T_DEC=$LAC_DEC
+
+# Temperature
+T=$(echo "$O" | awk -F[,:] '/^\^CHIPTEMP/ {gsub(/[ \r]/,"");t=0;for(i=2;i<=NF;i++)if($i!=65535){if($i>100){$i=$i/10};if($i>t){t=$i}};printf "%.1f", t}')
+if [ "x$T" != "x0.0" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ TEMP="$T °C"
+ #ADDON="$ADDON"'{"Temperatura":"'$T' °C"}'
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d1155e b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d1155e
new file mode 100644
index 00000000..e246ccea
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d1155e
@@ -0,0 +1,122 @@
+# Huawei E3272/E3372/E3276
+
+O=$(sms_tool -d $DEVICE at "at^chiptemp?;^hcsq?;^iccid?")
+
+T=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ MODE="$T"
+
+ case "$MODE" in
+ WCDMA*)
+ PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}' | xargs)
+ PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}' | xargs)
+ RSCP=$(awk 'BEGIN {print -121 + '$PARAM2'}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSCP":"'$RSCP' dBm"}'
+ ECIO=$(awk 'BEGIN {print -32.5 + '$PARAM3'/2}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"ECIO":"'$ECIO' dB"}'
+ ;;
+ LTE*)
+ PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}' | xargs)
+ PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}' | xargs)
+ PARAM4=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $6}' | xargs)
+ RSRP=$(awk 'BEGIN {print -141 + '$PARAM2'}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRP":"'$RSRP' dBm"}'
+ SINR=$(awk 'BEGIN {print -20.2 + '$PARAM3'/5}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"SINR":"'$SINR' dB"}'
+ RSRQ=$(awk 'BEGIN {print -20 + '$PARAM4'/2}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRQ":"'$RSRQ' dB"}'
+ ;;
+ esac
+fi
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+MODELB=$(echo $DEV2 | awk -F 'Manufacturer:|Revision:' '{print $2}'| xargs)
+MODELC=$(echo $MODELB | sed 's/Model://' | xargs)
+MODEL=$(echo $MODELC | awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}')
+FW=$(echo $DEV2 | awk -F 'Revision:|IMEI' '{print $2}'| xargs)
+
+# Protocol
+# Driver=qmi_wwan & Driver=cdc_mbim & Driver=cdc_ether & Driver=huawei_cdc_ncm
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=12d1 ProdID=155e' '{print $2}' | cut -c-1104)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+elif echo "$PVCUT" | grep -q "cdc_ncm"
+then
+ PROTO="ncm"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+OI=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$OI" | sed 's/AT+GSN//g' | xargs)
+if [ -n "NR_I" ]
+then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+OC=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$OC" | sed 's/AT+CIMI//g' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+NR_D=$(echo "$O" | awk -F [:] '/^\^ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+XFR=$(sms_tool -d $DEVICE at "at^hfreqinfo?")
+XFRCOUNT=$(echo -n "$XFR" | wc -c)
+
+if [ -n "$XFR" ] && [ "$XFRCOUNT" -gt "15" ]; then
+
+# DL / UL / Band
+TBX=$(echo "$XFR" | awk -F [:] '/^\^HFREQINFO:/{print $2}' | xargs)
+TB=$(echo "$TBX" | cut -d ',' -f3-3 )
+
+TDL=$(echo "$TBX" | cut -d ',' -f6-6 )
+DL=$(($TDL/1000))
+
+TUL=$(echo "$TBX" | cut -d ',' -f9-9 )
+UL=$(($TUL/1000))
+
+ULBW="UL: @$UL MHz"
+DLBW="DL: @$DL MHz"
+
+PBAND="$(band4g $TB "") $DLBW $ULBW"
+EARFCN=$(echo "$TBX" | cut -d ',' -f4-4 )
+PCI="-"
+
+if [[ "$MODE" == *"LTE"* ]] && [ -n "$TB" ]; then
+MODE="LTE | "$(band4g $TB "")
+fi
+
+fi
+
+# LAC & TAC
+T_HEX=$LAC_HEX
+T_DEC=$LAC_DEC
+
+# Temperature
+T=$(echo "$O" | awk -F[,:] '/^\^CHIPTEMP/ {gsub(/[ \r]/,"");t=0;for(i=2;i<=NF;i++)if($i!=65535){if($i>100){$i=$i/10};if($i>t){t=$i}};printf "%.1f", t}')
+if [ "x$T" != "x0.0" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ TEMP="$T °C"
+ #ADDON="$ADDON"'{"Temperatura":"'$T' °C"}'
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d1156c b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d1156c
new file mode 100644
index 00000000..e85928e8
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/12d1156c
@@ -0,0 +1,113 @@
+# Huawei E3272/E3372/E3276
+
+O=$(sms_tool -d $DEVICE at "at^chiptemp?;^hcsq?")
+
+T=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ MODE="$T"
+
+ case "$MODE" in
+ WCDMA*)
+ PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}' | xargs)
+ PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}' | xargs)
+ RSCP=$(awk 'BEGIN {print -121 + '$PARAM2'}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSCP":"'$RSCP' dBm"}'
+ ECIO=$(awk 'BEGIN {print -32.5 + '$PARAM3'/2}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"ECIO":"'$ECIO' dB"}'
+ ;;
+ LTE*)
+ PARAM2=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $4}' | xargs)
+ PARAM3=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $5}' | xargs)
+ PARAM4=$(echo "$O" | awk -F[,:] '/^\^HCSQ:/ {print $6}' | xargs)
+ RSRP=$(awk 'BEGIN {print -141 + '$PARAM2'}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRP":"'$RSRP' dBm"}'
+ SINR=$(awk 'BEGIN {print -20.2 + '$PARAM3'/5}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"SINR":"'$SINR' dB"}'
+ RSRQ=$(awk 'BEGIN {print -20 + '$PARAM4'/2}')
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRQ":"'$RSRQ' dB"}'
+ ;;
+ esac
+fi
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+MODELB=$(echo $DEV2 | awk -F 'Manufacturer:|Revision:' '{print $2}'| xargs)
+MODELC=$(echo $MODELB | sed 's/Model://' | xargs)
+MODEL=$(echo $MODELC | awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}')
+FW=$(echo $DEV2 | awk -F 'Revision:|IMEI' '{print $2}'| xargs)
+
+# Protocol
+# Driver=qmi_wwan & Driver=cdc_mbim & Driver=cdc_ether & Driver=huawei_cdc_ncm
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=12d1 ProdID=1506' '{print $2}' | cut -c-1104)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+elif echo "$PVCUT" | grep -q "cdc_ncm"
+then
+ PROTO="ncm"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | sed 's/AT+GSN//g' | xargs)
+if [ -n "NR_I" ]
+then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed 's/AT+CIMI//g' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT^ICCID?")
+NR_D=$(echo "$O" | awk -F [:] '/^\^ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# DL / UL / Band
+OTB=$(sms_tool -d $DEVICE at "AT^HFREQINFO?")
+TBX=$(echo "$OTB" | awk -F [:] '/^\^HFREQINFO:/{print $2}' | xargs)
+TB=$(echo "$TBX" | cut -d ',' -f3-3 )
+
+TDL=$(echo "$TBX" | cut -d ',' -f6-6 )
+DL=$(($TDL/1000))
+
+TUL=$(echo "$TBX" | cut -d ',' -f9-9 )
+UL=$(($TUL/1000))
+
+ULBW="UL: @$UL MHz"
+DLBW="DL: @$DL MHz"
+
+PBAND="$(band4g $TB "") $DLBW $ULBW"
+EARFCN=$(echo "$TBX" | cut -d ',' -f4-4 )
+PCI="-"
+
+# LAC & TAC
+T_HEX=$LAC_HEX
+T_DEC=$LAC_DEC
+
+# Temperature
+T=$(echo "$O" | awk -F[,:] '/^\^CHIPTEMP/ {gsub(/[ \r]/,"");t=0;for(i=2;i<=NF;i++)if($i!=65535){if($i>100){$i=$i/10};if($i>t){t=$i}};printf "%.1f", t}')
+if [ "x$T" != "x0.0" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ TEMP="$T °C"
+ #ADDON="$ADDON"'{"Temperatura":"'$T' °C"}'
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/16907588 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/16907588
new file mode 100644
index 00000000..d93d7ddc
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/16907588
@@ -0,0 +1,148 @@
+# ASKEY WWHC050
+
+O=$(sms_tool -d $DEVICE at "at\$qcai?;+ccputemp;+cgcelli;+cgnws")
+T=$(echo "$O" | awk 'BEGIN{FS="BEARER:"}/^\+CGCELLI/{print $2}' | awk 'BEGIN{FS=","}{print $1}')
+
+case "$T" in
+"0x01"*)
+ MODE="GPRS";;
+"0x02"*)
+ MODE="EDGE";;
+"0x03"*)
+ MODE="HSDPA";;
+"0x04"*)
+ MODE="HSUPA";;
+"0x05"*)
+ MODE="WCDMA";;
+"0x06"*)
+ MODE="CDMA";;
+"0x07"*)
+ MODE="EV-DO REV 0";;
+"0x08"*)
+ MODE="EV-DO REV A";;
+"0x09"*)
+ MODE="GSM";;
+"0x0a"*|"0x0A"*)
+ MODE="EV-DO REV B";;
+"0x0b"*|"0x0B"*)
+ MODE="LTE";;
+"0x0c"*|"0x0C"*)
+ MODE="HSDPA+";;
+"0x0d"*|"0x0D"*)
+ MODE="DC-HSDPA+";;
+esac
+
+if [ $MODE != "LTE" ]; then
+ O1=$(echo "$O" | grep CGCELLI | sed 's/+CGCELLI://')
+ T1="$O1"
+ while true; do
+ T2=${T1%%,*}
+ [ -z "$T2" ] && break
+ if echo "$T2" | grep -q ":"; then
+ F1=${T2%%:*}
+ F2=${T2##*:}
+ UNIT=""
+ IGNORE=0
+ case "$F1" in
+ RSCP|RSRP|RSSI) UNIT=" dBm";;
+ ECIO|SINR|RSRQ) UNIT=" dB";;
+ LAC|PLMN|BEARER) IGNORE=1;;
+ esac
+ if [ $IGNORE -eq 0 ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"'$F1'":"'$F2''$UNIT'"}'
+ fi
+ fi
+ if echo "$T1" | grep -q ","; then
+ T2="${T2},"
+ fi
+ T1=$(echo "$T1" | sed 's/^'$T2'//')
+ done
+fi
+
+T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $7}')
+if [ -n "$T" ]; then
+ case $T in
+ *"Band:1") MODE=$(band4g 1 "LTE ");;
+ *"Band:3") MODE=$(band4g 3 "LTE ");;
+ *"Band:7") MODE=$(band4g 7 "LTE ");;
+ *"Band:8") MODE=$(band4g 8 "LTE ");;
+ *"Band:20") MODE=$(band4g 20 "LTE ");;
+ *) MODE="LTE ${T}";;
+ esac
+fi
+
+T=$(echo "$O" | awk -F[,] '/CA:ADDED/{print $16}')
+if [ -n "$T" ]; then
+ case $T in
+ *"(S)Band:1") MODE="${MODE/LTE/LTE_A} / "$(band4g 1 "");;
+ *"(S)Band:3") MODE="${MODE/LTE/LTE_A} / "$(band4g 3 "");;
+ *"(S)Band:7") MODE="${MODE/LTE/LTE_A} / "$(band4g 7 "");;
+ *"(S)Band:8") MODE="${MODE/LTE/LTE_A} / "$(band4g 8 "");;
+ *"(S)Band:20") MODE="${MODE/LTE/LTE_A} / "$(band4g 20 "");;
+ *) MODE="${MODE/LTE/LTE_A} / B${T}";;
+ esac
+fi
+
+T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $3}')
+if [ -n "$T" ]; then
+ RSRP=${T##*:}
+ T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $12}')
+ if [ -n "$T" ]; then
+ RSRP="$RSRP / "${T##*:}" dBm"
+ fi
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"RSRP":"'$RSRP'"}'
+fi
+T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $4}')
+if [ -n "$T" ]; then
+ RSRQ=${T##*:}
+ T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $13}')
+ if [ -n "$T" ]; then
+ RSRQ="$RSRQ / "${T##*:}" dB"
+ fi
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"RSRQ":"'$RSRQ'"}'
+fi
+T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $5}')
+if [ -n "$T" ]; then
+ RSSI=${T##*:}
+ T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $14}')
+ if [ -n "$T" ]; then
+ RSSI="$RSSI / "${T##*:}" dBm"
+ fi
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"RSSI":"'$RSSI'"}'
+fi
+#T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $6}')
+#if [ -n "$T" ]; then
+# SINR=${T##*:}
+# T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $15}')
+# if [ -n "$T" ]; then
+# SINR="$SINR / "${T##*:}" dB"
+# fi
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"SINR":"'$SINR'"}'
+#fi
+#T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $8}')
+#if [ -n "$T" ]; then
+# BW=${T##*:}" MHz"
+# T=$(echo "$O" | awk -F[,] '/^\$QCAI/{print $17}')
+# if [ -n "$T" ]; then
+# BW="$BW / "${T##*:}" MHz"
+# fi
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"BW":"'$BW'"}'
+#fi
+
+T=$(echo "$O" | awk -F[:] '/^\+CCPUTEMP/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ TEMP="$T °C"
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"Temperatura":"'$T' °C"}'
+fi
+
+T=$(echo "$O" | awk -F[,] '/^\+CGNWS/ {print $9}' | xargs)
+if [ -n "$T" ]; then
+ COPS="$T"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d20167 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d20167
new file mode 100644
index 00000000..5ca06324
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d20167
@@ -0,0 +1,19 @@
+# ZTE MF821
+
+O=$(sms_tool -d $DEVICE at "at+zcellinfo?")
+BAND=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO:/ {print $4}')
+case "$MODE_NUM" in
+ 7*)
+ case "$BAND" in
+ *"B1") MODE=$(band4g 1 "LTE ");;
+ *"B3") MODE=$(band4g 3 "LTE ");;
+ *"B7") MODE=$(band4g 7 "LTE ");;
+ *"B8") MODE=$(band4g 8 "LTE ");;
+ *"B20") MODE=$(band4g 20 "LTE ");;
+ *) MODE="$MODE B${BAND}";;
+ esac
+ ;;
+ *)
+ MODE="$MODE $BAND"
+ ;;
+esac
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d20189 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d20189
new file mode 100644
index 00000000..540dbeea
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d20189
@@ -0,0 +1,62 @@
+# ZTE MF28D/MF290
+
+O=$(sms_tool -d $DEVICE at "at+zrssi?;+zcellinfo?")
+
+case "$MODE_NUM" in
+ 3*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ RSSI="$T"
+ ADDON="$ADDON"'{"RSSI":"'$T' dBm"}'
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ [ -n "$T" ] && MODE="$T"
+ ;;
+ 2*|\
+ 4*|\
+ 5*|\
+ 6*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"RSCP":"'$T' dBm"}'
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $3}' | xargs)
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"ECIO":"'$T' dB"}'
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ [ -n "$T" ] && MODE="$T"
+ ;;
+ 7*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ RSRP="$T"
+ ADDON="$ADDON"'{"RSRP":"'$T' dBm"}'
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $3}' | xargs)
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ RSRQ="$T"
+ ADDON="$ADDON"'{"RSRQ":"'$T' dB"}'
+# T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $5}' | xargs)
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+ SINR="$T"
+# ADDON="$ADDON"'{"SINR":"'$T' dB"}'
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCELLINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ PCI="$T"
+ ADDON="$ADDON"'{"PCI":"'$T'"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $5}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ EARFCN="$T"
+ ADDON="$ADDON"'{"EARFCN":"'$T'"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ case "$T" in
+ *"LTE B1") MODE=$(band4g 1 "LTE ");;
+ *"LTE B3") MODE=$(band4g 3 "LTE ");;
+ *"LTE B7") MODE=$(band4g 7 "LTE ");;
+ *"LTE B8") MODE=$(band4g 8 "LTE ");;
+ *"LTE B20") MODE=$(band4g 20 "LTE ");;
+ *) MODE="${T}";;
+ esac
+ ;;
+esac
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21275 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21275
new file mode 100644
index 00000000..2de86cf0
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21275
@@ -0,0 +1,58 @@
+# ZTE P685M
+# ZTE ZM8630A
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at+zrssi;+zcellinfo?;+zcainfo?")
+
+case "$MODE_NUM" in
+ 3*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ RSSI="$T"
+ ;;
+ 2*|\
+ 4*|\
+ 5*|\
+ 6*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+# addon 35 "RSCP" "$T dBm"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $3}' | xargs)
+# addon 36 "ECIO" "$T dB"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ [ -n "$T" ] && MODE="$T"
+ ;;
+ 7*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $4}' | xargs)
+ if [ -n "$T" ]; then
+ T_HEX=$(printf "%X" $T)
+ T_DEC=$(printf "%d" "0x${T_HEX}")
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $4}' | xargs)
+ [ -n "$T" ] && RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $3}' | xargs)
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $5}' | xargs)
+ [ -n "$T" ] && SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ MODE="LTE | $(band4g ${T/LTE B/})"
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $6}' | xargs)
+ if [ -z "$T1" ] || [ "x$T1" = "x0.0" ]; then
+ PBAND="$(band4g $T)"
+ else
+ PBAND="$(band4g $T) @${T1} MHz"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $2}' | xargs)
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $5}' | xargs)
+ [ -n "$T" ] && EARFCN="$T"
+ fi
+ ;;
+esac
+
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21432 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21432
new file mode 100644
index 00000000..c27f8532
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21432
@@ -0,0 +1,134 @@
+# ZTE MF286
+# ZTE MF286A
+
+
+O=$(sms_tool -d $DEVICE at "at+zrssi;+zcellinfo?;+zcainfo?")
+
+case "$MODE_NUM" in
+ 3*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ RSSI="$T"
+ ;;
+ 2*|\
+ 4*|\
+ 5*|\
+ 6*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ [ -n "$T" ] && MODE="$T"
+ ;;
+ 7*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $4}' | xargs)
+ if [ -n "$T" ]; then
+ T_HEX=$(printf "%X" $T)
+ T_DEC=$T
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $4}' | xargs)
+ RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $3}' | xargs)
+ RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $5}' | xargs)
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ MODE="LTE $(band4g ${T/LTE B/})"
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $6}' | xargs)
+ PBAND="$(band4g $T "") @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $2}' | xargs)
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $5}' | xargs)
+ [ -n "$T" ] && EARFCN="$T"
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $9}' | xargs)
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $11}' | xargs)
+ S1BAND="$(band4g $T "") @$T1 MHz"
+ MODE="${MODE/LTE/LTE_A} / $(band4g ${T})"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $7}' | xargs)
+ [ -n "$T" ] && S1PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO/ {print $10}' | xargs)
+ [ -n "$T" ] && S1EARFCN="$T"
+ fi
+ ;;
+esac
+
+MODE=$(echo $MODE | sed "s/LTE_A/LTE-A |/g" | sed 's,/,+,')
+
+if [ "${LAC_DEC}" = "0" ]; then
+ LAC_DEC="-"
+ LAC_HEX="-"
+fi
+
+OF=$(sms_tool -d $DEVICE at "ati")
+DEVV=$(echo $OF | tr -s "\n" | xargs)
+FWA=$(sms_tool -d $DEVICE at "AT+GMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | cut -c 8-)
+
+MODELA=$(echo $DEVV | awk -F 'Revision: ' '{print $1}'| xargs)
+MODELB=$(echo $MODELA | awk -F 'Manufacturer: |CORPORATION' '{print $2}'| xargs)
+
+MODELD=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELDCUT=$(echo $MODELD | cut -c 9-)
+
+MODEL="$MODELB "$MODELDCUT
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | cut -c 8-)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | cut -c 9-)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\ICCID:/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PV85=$(echo $PV | awk -F 'Vendor=19d2 ProdID=1485' '{print $2}' | cut -c-1220)
+if [ -n "$PV85" ]; then
+ if echo "$PV85" | grep -q "Driver=qmi_wwan"
+ then
+ PROTO="qmi"
+ elif echo "$PV85" | grep -q "Driver=cdc_mbim"
+ then
+ PROTO="mbim"
+ elif echo "$PV85" | grep -q "Driver=cdc_ether"
+ then
+ PROTO="ecm"
+ fi
+fi
+PV32=$(echo $PV | awk -F 'Vendor=19d2 ProdID=1432' '{print $2}' | cut -c-1220)
+if [ -n "$PV32" ]; then
+ if echo "$PV32" | grep -q "Driver=qmi_wwan"
+ then
+ PROTO="qmi"
+ elif echo "$PV32" | grep -q "Driver=cdc_mbim"
+ then
+ PROTO="mbim"
+ elif echo "$PV32" | grep -q "Driver=cdc_ether"
+ then
+ PROTO="ecm"
+ fi
+fi
+
+#T=$(echo "$O" | awk -F[,:] '/^\+ZDON/ {print $2}' | xargs)
+#if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+# COPS="$T"
+#fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21485 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21485
new file mode 100644
index 00000000..329e1048
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21485
@@ -0,0 +1,202 @@
+# ZTE MF286D
+# ZTE MF289F
+
+O=$(sms_tool -d $DEVICE at "at+zrssi;+zcellinfo?;+zcainfo?")
+
+case "$MODE_NUM" in
+ 3*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ RSSI="$T"
+ if [ "x${LAC_DEC}" = "x0" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ LAC_DEC=$T
+ LAC_HEX=$(printf "%X" $T)
+ fi
+ fi
+ if [ "x${CID_DEC}" = "x0" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ CID_DEC=$T
+ CID_HEX=$(printf "%X" $T)
+ fi
+ fi
+ ;;
+ 2*|\
+ 4*|\
+ 5*|\
+ 6*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ [ -n "$T" ] && MODE="$T"
+ if [ "x${LAC_DEC}" = "x0" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ LAC_DEC=$T
+ LAC_HEX=$(printf "%X" $T)
+ fi
+ fi
+ if [ "x${CID_DEC}" = "x0" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ CID_DEC=$T
+ CID_HEX=$(printf "%X" $T)
+ fi
+ fi
+ ;;
+ 7*)
+ if [ "x${CID_DEC}" = "x0" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ CID_DEC=$T
+ CID_HEX=$(printf "%X" $T)
+ fi
+ fi
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $4}' | xargs)
+ if [ -n "$T" ]; then
+ T_HEX=$(printf "%X" $T)
+ T_DEC=$T
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $4}' | xargs)
+ RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $3}' | xargs)
+ RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $5}' | xargs)
+ SINR="$T"
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ MODE="LTE $(band4g ${T/LTE B/})"
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $6}' | xargs)
+ PBAND="$(band4g $T "") @$T1 MHz"
+ [ "x$MODE" = "xLTE BUnknown" ] && MODE="LTE $(band4g $T)"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $2}' | xargs)
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $5}' | xargs)
+ [ -n "$T" ] && EARFCN="$T"
+ fi
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $9}' | xargs)
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $11}' | xargs)
+ S1BAND="$(band4g $T "") @$T1 MHz"
+ MODE="${MODE/LTE/LTE_A} / $(band4g ${T})"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $7}' | xargs)
+ [ -n "$T" ] && S1PCI="$T"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $10}' | xargs)
+ [ -n "$T" ] && S1EARFCN="$T"
+ fi
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $14}' | xargs)
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $16}' | xargs)
+ S2BAND="$(band4g $T "") @$T1 MHz"
+ MODE="$MODE / $(band4g ${T})"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $12}' | xargs)
+ [ -n "$T" ] && S2PCI="$T"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $15}' | xargs)
+ [ -n "$T" ] && S2EARFCN="$T"
+ fi
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $19}' | xargs)
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $21}' | xargs)
+ S3BAND="$(band4g $T "") @$T1 MHz"
+ MODE="$MODE / $(band4g ${T})"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $17}' | xargs)
+ [ -n "$T" ] && S3PCI="$T"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $20}' | xargs)
+ [ -n "$T" ] && S3EARFCN="$T"
+ fi
+
+ ;;
+esac
+
+MODE=$(echo $MODE | sed "s/LTE_A/LTE-A |/g" | sed 's,/,+,')
+
+if [ "${LAC_DEC}" = "0" ]; then
+ LAC_DEC="-"
+ LAC_HEX="-"
+fi
+
+# Firmware
+OF=$(sms_tool -d $DEVICE at "ati")
+DEVV=$(echo $OF | tr -s "\n" | xargs)
+FWA=$(sms_tool -d $DEVICE at "AT+GMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | cut -c 8-)
+
+# Model
+MODELA=$(echo $DEVV | awk -F 'Revision: ' '{print $1}'| xargs)
+MODELB=$(echo $MODELA | awk -F 'Manufacturer: |CORPORATION' '{print $2}'| xargs)
+
+MODELD=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+
+SUB='MODULE'
+if [[ "$MODELD" == *"$SUB"* ]]; then
+MODELDCUT=$(echo $MODELD | awk -F 'CGMM |MODULE' '{print $2}'| xargs)
+MODEL="$MODELB "$MODELDCUT
+else
+MODELDCUT=$(echo $MODELD | cut -c 9-)
+MODEL="$MODELB "$MODELDCUT
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | cut -c 8-)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | cut -c 9-)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\ICCID:/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PV85=$(echo $PV | awk -F 'Vendor=19d2 ProdID=1485' '{print $2}' | cut -c-1220)
+if [ -n "$PV85" ]; then
+ if echo "$PV85" | grep -q "Driver=qmi_wwan"
+ then
+ PROTO="qmi"
+ elif echo "$PV85" | grep -q "Driver=cdc_mbim"
+ then
+ PROTO="mbim"
+ elif echo "$PV85" | grep -q "Driver=cdc_ether"
+ then
+ PROTO="ecm"
+ fi
+fi
+PV32=$(echo $PV | awk -F 'Vendor=19d2 ProdID=1432' '{print $2}' | cut -c-1220)
+if [ -n "$PV32" ]; then
+ if echo "$PV32" | grep -q "Driver=qmi_wwan"
+ then
+ PROTO="qmi"
+ elif echo "$PV32" | grep -q "Driver=cdc_mbim"
+ then
+ PROTO="mbim"
+ elif echo "$PV32" | grep -q "Driver=cdc_ether"
+ then
+ PROTO="ecm"
+ fi
+fi
+
+#T=$(echo "$O" | awk -F[,:] '/^\+ZDON/ {print $2}' | xargs)
+#if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+# COPS="$T"
+#fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21489 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21489
new file mode 100644
index 00000000..00fe2651
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/19d21489
@@ -0,0 +1,139 @@
+# ZTE MF286R
+
+O=$(sms_tool -d $DEVICE at "at+zrssi;+zcellinfo?;+zcainfo?")
+
+case "$MODE_NUM" in
+ 3*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ RSSI="$T"
+ ;;
+ 2*|\
+ 4*|\
+ 5*|\
+ 6*|\
+ 8*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ [ -n "$T" ] && MODE="$T"
+ ;;
+
+ 7*|\
+ 9*)
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $4}' | xargs)
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ T_HEX=$(printf "%X" $T)
+ T_DEC=$T
+ LAC_DEC=$T_DEC
+ LAC_HEX=$T_HEX
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $4}' | xargs)
+ RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $2}' | xargs)
+ RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $3}' | xargs)
+ RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $5}' | xargs)
+ SINR="$T"
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ MODE="LTE $(band4g ${T/LTE B/})"
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $3}' | xargs)
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ T1=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $6}' | xargs)
+ PBAND="$(band4g $T "") @$T1 MHz"
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $2}' | xargs)
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PCI="$T"
+ fi
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $5}' | xargs)
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ EARFCN="$T"
+ fi
+ fi
+
+ if [ "x$MODE_NUM" = "x9" ]; then
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $9}' | xargs)
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ T1=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $11}' | xargs)
+ S1BAND="$(band4g $T "") @$T1 MHz"
+ MODE="${MODE/LTE/LTE_A} / $(band4g ${T})"
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $7}' | xargs)
+ [ -n "$T" ] && S1PCI="$T"
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO/ {print $10}' | xargs)
+ [ -n "$T" ] && S1EARFCN="$T"
+ fi
+ fi
+ ;;
+esac
+
+MODE=$(echo $MODE | sed "s/LTE_A/LTE-A |/g" | sed 's,/,+,')
+
+# Firmware
+FWB=$(sms_tool -d $DEVICE at "AT+GMR")
+FW=$(echo $FWB | tr -d " \t\n\r" | xargs)
+
+if [[ "$FW" == *"MF286RA"* && "$CSQ" == *"-"* ]]; then
+OQ=$(sms_tool -D -d $DEVICE at "AT+CSQ")
+CSQ=$(echo "$OQ" | awk -F[,\ ] '/^\+CSQ/ {print $2}')
+
+[ "x$CSQ" = "x" ] && CSQ=-1
+ if [ $CSQ -ge 0 -a $CSQ -le 31 ]; then
+ CSQ_PER=$(($CSQ * 100/31))
+ fi
+fi
+
+# Modem
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+
+if [[ "$MODELA" == *"ZTE"* ]]; then
+MODELACUT=$(echo $MODELA | awk -F'CGMI: ' '{print $2}' | sed 's/"//g' | sed 's/ CORPORATION//g')
+MODELO=$(echo $MODELACUT | tr -d " \t\n\r" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMM")
+MODELBCUT=$(echo $MODELB | awk -F'CGMM: ' '{print $2}' | sed 's/"//g')
+MODELCUT=$(echo $MODELBCUT | tr -d " \t\n\r" | xargs)
+
+MODEL="$MODELO "$MODELCUT
+else
+MODELO=$(echo $MODELA | tr -d " \t\n\r" | cut -d ":" -f2 | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMM")
+MODELCUT=$(echo $MODELB | tr -d " \t\n\r" | cut -d ":" -f2 | xargs)
+
+MODEL="$MODELO "$MODELCUT
+fi
+
+# International Mobile Equipment Identity (IMEI)
+OI=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$OI" | sed 's/AT+GSN//g' | xargs)
+if [ -z "NR_I" ]; then
+ OIB=$(sms_tool -d $DEVICE at "AT*MRD_IMEI?" | xargs)
+ NR_I=$(echo "$OIB" | awk -F [:] '/^\*MRD_IMEI:/{print $2}' | xargs)
+ NR_IMEI="$NR_I"
+else
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+OS=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$OS" | sed 's/AT+CIMI//g' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+OD=$(sms_tool -d $DEVICE at "AT*ICCID?" | xargs)
+NR_D=$(echo "$OD" | awk -F [:] '/^\*ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=19d2 ProdID=1489' '{print $2}' | cut -c-1450)
+if echo "$PVCUT" | grep -q "rndis_host"
+then
+ PROTO="ncm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71040 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71040
new file mode 100644
index 00000000..d8b7ecba
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71040
@@ -0,0 +1,162 @@
+# Telit LN940-CP
+
+O=$(sms_tool -d $DEVICE at "at#servinfo;#cainfo?")
+
+channeltoband()
+{
+ if [ $1 -ge 0 ] && [ $1 -le 599 ]; then
+ echo "1"
+ elif [ $1 -ge 1200 ] && [ $1 -le 1949 ]; then
+ echo "3"
+ elif [ $1 -ge 2750 ] && [ $1 -le 3449 ]; then
+ echo "7"
+ elif [ $1 -ge 3450 ] && [ $1 -le 3799 ]; then
+ echo "8"
+ elif [ $1 -ge 6150 ] && [ $1 -le 6449 ]; then
+ echo "20"
+ else
+ echo "?"
+ fi
+}
+
+case "$MODE_NUM" in
+ 7*)
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $4}' | xargs)
+ [ -n "$COPS" ] && COPS="$T"
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $7}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ T_DEC=$(printf "%d" "0x$T")
+# ADDON="$ADDON"'{"TAC":"'$T_DEC' ('$T')"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ RSSI=$T
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSSI":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $10}' | xargs)
+ if [ -n "$T" ]; then
+ RSRP=$T
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRP":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ EARFCN=$T
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"EARFCN":"'$T'"}'
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ T1=$(channeltoband $T)
+ PBAND="$(band4g $T1 "")"
+ ADDON="$ADDON"'{"Primary band":"'$(band4g $T1 "")'"}'
+ MODE=$(band4g $T1 "LTE ")
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $5}' | xargs)
+ if [ -n "$T" ]; then
+ PCI=$T
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"PCI":"'$T'"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $7}' | xargs)
+ if [ -n "$T" ]; then
+ RSSI=$T
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSSI":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $6}' | xargs)
+ if [ -n "$T" ]; then
+ RSRP=$T
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRP":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $8}' | xargs)
+ if [ -n "$T" ]; then
+ RSRQ=$T
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"RSRQ":"'$T'"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $9}' | xargs)
+ if [ -n "$T" ]; then
+ SINR=$T
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"SINR":"'$T'"}'
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $15}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ T1=$(channeltoband $T)
+ S1BAND=="$(band4g $T1 "")"
+# ADDON="$ADDON"'{"(S1) band":"'$(band4g $T1 "")'"}'
+# MODE="${MODE/LTE/LTE_A} / "$(band4g $T1 "")
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $17}' | xargs)
+ if [ -n "$T" ]; then
+ S1PCI=$T
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"(S1) PCI":"'$T'"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $19}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S1) RSSI":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $18}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S1) RSRP":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $20}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S1) RSRQ":"'$T' dB"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $21}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S1) SINR":"'$T' dB"}'
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $26}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ T1=$(channeltoband $T)
+ S2BAND=="$(band4g $T1 "")"
+ ADDON="$ADDON"'{"(S2) band":"'$(band4g $T1 "")'"}'
+ MODE="${MODE} / "$(band4g $T1 "")
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $28}' | xargs)
+ if [ -n "$T" ]; then
+ S2PCI="$T"
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S2) PCI":"'$T'"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $30}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S2) RSSI":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $29}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S2) RSRP":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $31}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S2) RSRQ":"'$T' dB"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#CAINFO/ {print $32}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"(S2) SINR":"'$T' dB"}'
+ fi
+ ;;
+esac
+
+MODE=$(echo $MODE | sed 's,/,+,')
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71201 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71201
new file mode 100644
index 00000000..a444dade
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71201
@@ -0,0 +1,42 @@
+# Telit LE910-EUG
+
+O=$(sms_tool -d $DEVICE at "at#servinfo")
+
+case "$MODE_NUM" in
+ 7*)
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $4}' | xargs)
+ [ -n "$COPS" ] && COPS="$T"
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $7}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ T_DEC=$(printf "%d" "0x$T")
+ TAC_HEX=$T
+ TAC_DEC=$T_DEC
+ ADDON="$ADDON"'{"TAC":"'$T_DEC' ('$T')"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ RSSI="$T"
+ ADDON="$ADDON"'{"RSSI":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $10}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ RSRP="$T"
+ ADDON="$ADDON"'{"RSRP":"'$T' dBm"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $6}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ PCI="$(printf "%d" "0x$T")"
+ ADDON="$ADDON"'{"PCI":"'$(printf "%d" "0x$T")'"}'
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^#SERVINFO/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ EARFCN="$T"
+ ADDON="$ADDON"'{"EARFCN":"'$T'"}'
+ fi
+ ;;
+esac
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71900 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71900
new file mode 100644
index 00000000..f4a53cda
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71900
@@ -0,0 +1,128 @@
+# Telit LN940 (QMI) / Telit LN940 (MBIM) / HP lt4220 (MBIM) / HP lt4220 (QMI)
+
+O=$(sms_tool -D -d $DEVICE at "AT^CA_INFO?;^RFSTS?;+TEMP")
+
+TR=$(echo "$O" |grep -A2 RFSTS: | awk 'NR ==2{print $0}')
+
+if [ "$MODE" = "LTE" ]; then
+ RSRP=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$3}')
+ RSSI=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$4}')
+ RSRQ=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$5}')
+ SINR=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$16*2-20}')
+else
+ SINR=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$4}')
+ RSSI=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$6}')
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\PCC info: /{print $2}' | sed 's/Band is //g')
+[ -z "$T" ] && T=$(echo "$O" | awk -F[,] '/^\PCC info: /{print $2}')
+if [ -n "$T" ]; then
+ PC=$(echo $T | tr -d 'LTE_B')
+ MODE="LTE | $(band4g $PC)"
+
+ T=$(echo "$O" | awk -F[,:] '/^\SCC1 info: /{print $2}' | sed 's/Band is //g')
+ if [ -n "$T" ]; then
+ SC1=$(echo $T | tr -d 'LTE_B')
+ MODE="${MODE/LTE/LTE_A} / "$(band4g ${SC1} "")
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\SCC2 info: /{print $2}' | sed 's/Band is //g')
+ if [ -n "$T" ]; then
+ SC2=$(echo $T | tr -d 'LTE_B')
+ MODE="${MODE} / "$(band4g ${SC2} "")
+ fi
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,' | sed 's,LTE_A,LTE-A ,')
+
+# Primary band
+T1=$(echo "$O" | awk '/PCC/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T1" ]; then
+ T2=$(echo "$O" | awk '/PCC/{print $8}' | sed -e 's/Band_width//g')
+ PBAND="$(band4g ${T1/B/} "") @$T2 MHz"
+ EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+ PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# CA band (S1)
+T3=$(echo "$O" | awk '/SCC1/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T3" ]; then
+ T4=$(echo "$O" | awk '/SCC1/{print $8}' | sed -e 's/Band_width//g')
+ S1BAND="$(band4g ${T3/B/} "") @$T4 MHz"
+# S1EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+# S1PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# CA band (S2)
+T5=$(echo "$O" | awk '/SCC2/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T5" ]; then
+ T6=$(echo "$O" | awk '/SCC2/{print $8}' | sed -e 's/Band_width//g')
+ S2BAND="$(band4g ${T5/B/} "") @$T6 MHz"
+# S2EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+# S2PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# Temperature
+T=$(echo "$O" | awk -F [:] '/tsens_tz_sensor0:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ TEMP=$(echo "$T °C")
+fi
+
+# Cell ID & LAC & TAC
+LAC_HEX=$(printf "%X" $LAC_DEC)
+if [ -n "$LAC_DEC" ]; then
+ TAC_HEX=$LAC_HEX
+fi
+CID_HEX=$(printf "%X" $CID_DEC)
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=1bc7 ProdID=1900' '{print $2}' | cut -c-1220)
+
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
+
+# Model
+PVMODEL=$(echo $PV | awk -F 'Vendor=1bc7 ProdID=1900' '{print $2}' | cut -c-150)
+if [ -z "$MODEL" ]
+then
+ MODELBCUT=$(echo $PVMODEL | awk -F 'Manufacturer=|S: Product=' '{print $2}'| xargs)
+ MODELACUT=$(echo $PVMODEL | awk -F 'Product=|S: SerialNumber' '{print $2}'| xargs)
+ MODELC="$MODELBCUT "$MODELACUT
+ MODEL=$(echo "$MODELC" | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}')
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | awk -F " " '/GSN /{print $2}')
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | awk -F " " '/CIMI /{print $2}')
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID" | xargs)
+NR_D=$(echo "$O" | awk -F [:] '/ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# FW
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+FW=$(echo $DEV2 | awk -F 'Revision: | IMEI: ' '{print $2}' | cut -c-50)v
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71901 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71901
new file mode 100644
index 00000000..f82a6b98
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1bc71901
@@ -0,0 +1,128 @@
+# Telit LN940 (QMI) / Telit LN940 (MBIM) / HP lt4220 (MBIM) / HP lt4220 (QMI)
+
+O=$(sms_tool -D -d $DEVICE at "AT^CA_INFO?;^RFSTS?;+TEMP")
+
+TR=$(echo "$O" |grep -A2 RFSTS: | awk 'NR ==2{print $0}')
+
+if [ "$MODE" = "LTE" ]; then
+ RSRP=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$3}')
+ RSSI=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$4}')
+ RSRQ=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$5}')
+ SINR=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$16*2-20}')
+else
+ SINR=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$4}')
+ RSSI=$(echo "$TR" | awk -F [,] '{printf "%.0f\n",$6}')
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\PCC info: /{print $2}' | sed 's/Band is //g')
+[ -z "$T" ] && T=$(echo "$O" | awk -F[,] '/^\PCC info: /{print $2}')
+if [ -n "$T" ]; then
+ PC=$(echo $T | tr -d 'LTE_B')
+ MODE="LTE | $(band4g $PC)"
+
+ T=$(echo "$O" | awk -F[,:] '/^\SCC1 info: /{print $2}' | sed 's/Band is //g')
+ if [ -n "$T" ]; then
+ SC1=$(echo $T | tr -d 'LTE_B')
+ MODE="${MODE/LTE/LTE_A} / "$(band4g ${SC1} "")
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\SCC2 info: /{print $2}' | sed 's/Band is //g')
+ if [ -n "$T" ]; then
+ SC2=$(echo $T | tr -d 'LTE_B')
+ MODE="${MODE} / "$(band4g ${SC2} "")
+ fi
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,' | sed 's,LTE_A,LTE-A ,')
+
+# Primary band
+T1=$(echo "$O" | awk '/PCC/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T1" ]; then
+ T2=$(echo "$O" | awk '/PCC/{print $8}' | sed -e 's/Band_width//g')
+ PBAND="$(band4g ${T1/B/} "") @$T2 MHz"
+ EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+ PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# CA band (S1)
+T3=$(echo "$O" | awk '/SCC1/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T3" ]; then
+ T4=$(echo "$O" | awk '/SCC1/{print $8}' | sed -e 's/Band_width//g')
+ S1BAND="$(band4g ${T3/B/} "") @$T4 MHz"
+# S1EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+# S1PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# CA band (S2)
+T5=$(echo "$O" | awk '/SCC2/{print $5}' | sed -e 's/LTE_//g' -e 's/.$//')
+if [ -n "$T5" ]; then
+ T6=$(echo "$O" | awk '/SCC2/{print $8}' | sed -e 's/Band_width//g')
+ S2BAND="$(band4g ${T5/B/} "") @$T6 MHz"
+# S2EARFCN=$(echo "$TR" |awk -F [,] '{print $2}')
+# S2PCI=$(echo "$TR" |awk -F [,] '{print $11}')
+fi
+
+# Temperature
+T=$(echo "$O" | awk -F [:] '/tsens_tz_sensor0:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ TEMP=$(echo "$T °C")
+fi
+
+# Cell ID & LAC & TAC
+LAC_HEX=$(printf "%X" $LAC_DEC)
+if [ -n "$LAC_DEC" ]; then
+ TAC_HEX=$LAC_HEX
+fi
+CID_HEX=$(printf "%X" $CID_DEC)
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=1bc7 ProdID=1901' '{print $2}' | cut -c-1220)
+
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
+
+# Model
+PVMODEL=$(echo $PV | awk -F 'Vendor=1bc7 ProdID=1901' '{print $2}' | cut -c-150)
+if [ -z "$MODEL" ]
+then
+ MODELBCUT=$(echo $PVMODEL | awk -F 'Manufacturer=|S: Product=' '{print $2}'| xargs)
+ MODELACUT=$(echo $PVMODEL | awk -F 'Product=|S: SerialNumber' '{print $2}'| xargs)
+ MODELC="$MODELBCUT "$MODELACUT
+ MODEL=$(echo "$MODELC" | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}')
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | awk -F " " '/GSN /{print $2}')
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | awk -F " " '/CIMI /{print $2}')
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID" | xargs)
+NR_D=$(echo "$O" | awk -F [:] '/ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# FW
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+FW=$(echo $DEV2 | awk -F 'Revision: | IMEI: ' '{print $2}' | cut -c-50)
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9000 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9000
new file mode 100644
index 00000000..b2177bc5
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9000
@@ -0,0 +1,100 @@
+# SIMCOM SIM8200EA-M2
+# SIMCOM SIM7906
+
+OT=$(sms_tool -d $DEVICE at "AT+CPMUTEMP")
+
+T=$(echo "$OT" | awk -F[,:] '/^\+CPMUTEMP: / {print $2}' | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+O=$(sms_tool -d $DEVICE at "AT+CPSI?")
+
+case $MODE_NUM in
+ 7)
+ MODE="LTE |"
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $5}')
+ if [ -n "$T" ]; then
+ TAC_DEC=$(printf "%d" "$T")
+ TAC_HEX="${T/0x/}"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $7}')
+ [ -n "$T" ] && PCI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $8}')
+ if [ -n "$T" ]; then
+ PBAND="$(band4g ${T/EUTRAN-BAND/})"
+ MODE="$MODE $(band4g ${T/EUTRAN-BAND/})"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $9}')
+ [ -n "$T" ] && EARFCN=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $10}')
+ if [ -n "$T" ]; then
+ DLBW="DL: @$T MHz"
+ PBAND="$(band4g ${T/EUTRAN-BAND/}) $DLBW"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $11}')
+ if [ -n "$T" ]; then
+ ULBW="UL: @$T MHz"
+ PBAND="$(band4g ${T/EUTRAN-BAND/}) $DLBW $ULBW"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $12/10}')
+ [ -n "$T" ] && RSRQ=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $13/10}')
+ [ -n "$T" ] && RSRP=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $14/10}')
+ [ -n "$T" ] && RSSI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $15}' | xargs)
+ [ -n "$T" ] && SINR=$T
+ ;;
+ 11) MODE="5G SA";;
+ 13) MODE="5G NSA";;
+esac
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "AT+CGMR")
+FWA=$(echo "$OF" | awk -F [:] '/^\+CGMR: /{print $2}' | xargs)
+if [ -n "$FWA" ]; then
+ FW="$FWA"
+fi
+
+OL=$(sms_tool -d $DEVICE at "AT+CGMM")
+MODELB=$(echo "$OL" | sed s/"AT+CGMM"// | tr -s "\n" | xargs)
+if [ -n "$MODELB" ]; then
+ MODEL="$(echo $MODELB | sed 's,_, ,')"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+OM=$(sms_tool -d $DEVICE at "AT+CGSN")
+NR_I=$(echo "$OM" | sed s/"AT+CGSN"// | xargs)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+OC=$(sms_tool -d $DEVICE at "AT+CIMI")
+NR_C=$(echo "$OC" | sed s/"AT+CIMI"// | tr -s "\n" | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+OI=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$OI" | awk -F [:] '/^\+ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=1e0e ProdID=9000' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9001 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9001
new file mode 100644
index 00000000..303275ef
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9001
@@ -0,0 +1,100 @@
+# SIMCOM SIM8200EA-M2
+# SIMCOM SIM7906
+
+OT=$(sms_tool -d $DEVICE at "AT+CPMUTEMP")
+
+T=$(echo "$OT" | awk -F[,:] '/^\+CPMUTEMP: / {print $2}' | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+O=$(sms_tool -d $DEVICE at "AT+CPSI?")
+
+case $MODE_NUM in
+ 7)
+ MODE="LTE |"
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $5}')
+ if [ -n "$T" ]; then
+ TAC_DEC=$(printf "%d" "$T")
+ TAC_HEX="${T/0x/}"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $7}')
+ [ -n "$T" ] && PCI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $8}')
+ if [ -n "$T" ]; then
+ PBAND="$(band4g ${T/EUTRAN-BAND/})"
+ MODE="$MODE $(band4g ${T/EUTRAN-BAND/})"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $9}')
+ [ -n "$T" ] && EARFCN=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $10}')
+ if [ -n "$T" ]; then
+ DLBW="DL: @$T MHz"
+ PBAND="$(band4g ${T/EUTRAN-BAND/}) $DLBW"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $11}')
+ if [ -n "$T" ]; then
+ ULBW="UL: @$T MHz"
+ PBAND="$(band4g ${T/EUTRAN-BAND/}) $DLBW $ULBW"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $12/10}')
+ [ -n "$T" ] && RSRQ=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $13/10}')
+ [ -n "$T" ] && RSRP=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $14/10}')
+ [ -n "$T" ] && RSSI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $15}' | xargs)
+ [ -n "$T" ] && SINR=$T
+ ;;
+ 11) MODE="5G SA";;
+ 13) MODE="5G NSA";;
+esac
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "AT+CGMR")
+FWA=$(echo "$OF" | awk -F [:] '/^\+CGMR: /{print $2}' | xargs)
+if [ -n "$FWA" ]; then
+ FW="$FWA"
+fi
+
+OL=$(sms_tool -d $DEVICE at "AT+CGMM")
+MODELB=$(echo "$OL" | sed s/"AT+CGMM"// | tr -s "\n" | xargs)
+if [ -n "$MODELB" ]; then
+ MODEL="$(echo $MODELB | sed 's,_, ,')"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+OM=$(sms_tool -d $DEVICE at "AT+CGSN")
+NR_I=$(echo "$OM" | sed s/"AT+CGSN"// | xargs)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+OC=$(sms_tool -d $DEVICE at "AT+CIMI")
+NR_C=$(echo "$OC" | sed s/"AT+CIMI"// | tr -s "\n" | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+OI=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$OI" | awk -F [:] '/^\+ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=1e0e ProdID=9001' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9003 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9003
new file mode 100644
index 00000000..2117d96d
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e0e9003
@@ -0,0 +1,100 @@
+# SIMCOM SIM8200EA-M2
+# SIMCOM SIM7906
+
+OT=$(sms_tool -d $DEVICE at "AT+CPMUTEMP")
+
+T=$(echo "$OT" | awk -F[,:] '/^\+CPMUTEMP: / {print $2}' | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+O=$(sms_tool -d $DEVICE at "AT+CPSI?")
+
+case $MODE_NUM in
+ 7)
+ MODE="LTE |"
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $5}')
+ if [ -n "$T" ]; then
+ TAC_DEC=$(printf "%d" "$T")
+ TAC_HEX="${T/0x/}"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $7}')
+ [ -n "$T" ] && PCI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $8}')
+ if [ -n "$T" ]; then
+ PBAND="$(band4g ${T/EUTRAN-BAND/})"
+ MODE="$MODE $(band4g ${T/EUTRAN-BAND/})"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $9}')
+ [ -n "$T" ] && EARFCN=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $10}')
+ if [ -n "$T" ]; then
+ DLBW="DL: @$T MHz"
+ PBAND="$(band4g ${T/EUTRAN-BAND/}) $DLBW"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $11}')
+ if [ -n "$T" ]; then
+ ULBW="UL: @$T MHz"
+ PBAND="$(band4g ${T/EUTRAN-BAND/}) $DLBW $ULBW"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $12/10}')
+ [ -n "$T" ] && RSRQ=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $13/10}')
+ [ -n "$T" ] && RSRP=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $14/10}')
+ [ -n "$T" ] && RSSI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+CPSI: LTE/ {print $15}' | xargs)
+ [ -n "$T" ] && SINR=$T
+ ;;
+ 11) MODE="5G SA";;
+ 13) MODE="5G NSA";;
+esac
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "AT+CGMR")
+FWA=$(echo "$OF" | awk -F [:] '/^\+CGMR: /{print $2}' | xargs)
+if [ -n "$FWA" ]; then
+ FW="$FWA"
+fi
+
+OL=$(sms_tool -d $DEVICE at "AT+CGMM")
+MODELB=$(echo "$OL" | sed s/"AT+CGMM"// | tr -s "\n" | xargs)
+if [ -n "$MODELB" ]; then
+ MODEL="$(echo $MODELB | sed 's,_, ,')"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+OM=$(sms_tool -d $DEVICE at "AT+CGSN")
+NR_I=$(echo "$OM" | sed s/"AT+CGSN"// | xargs)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+OC=$(sms_tool -d $DEVICE at "AT+CIMI")
+NR_C=$(echo "$OC" | sed s/"AT+CIMI"// | tr -s "\n" | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+OI=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$OI" | awk -F [:] '/^\+ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=1e0e ProdID=9003' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e2d00b3 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e2d00b3
new file mode 100644
index 00000000..fd24a6b0
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e2d00b3
@@ -0,0 +1,225 @@
+# Dell DW5930e
+# Foxconn T99W175
+# Thales Cinterion MV31-W
+
+O=$(sms_tool -d $DEVICE at "AT^TEMP?")
+
+T=$(echo "$O" | awk '/^TSENS: / {gsub("C","",$2); print $2}')
+T1=$(echo "$O" | awk '/^PA: / {gsub("C","",$2); print $2}')
+if [ -n "$T" ] && [ -n "$T1" ]; then
+ if [[ "$T1" =~ ^[0-9]+$ && "$T" =~ ^[0-9]+$ ]]; then
+ if [ "$T1" -gt "$T" ]; then
+ T="$T1"
+ fi
+ fi
+fi
+
+T1=$(echo "$O" | awk '/^Skin Sensor: / {gsub("C","",$2); print $2}')
+if [ -n "$T" ] && [ -n "$T1" ]; then
+ if [[ "$T1" =~ ^[0-9]+$ && "$T" =~ ^[0-9]+$ ]]; then
+ if [ "$T1" -gt "$T" ]; then
+ T="$T1"
+ fi
+ fi
+fi
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at^debug?")
+
+case "$MODE_NUM" in
+ "7")
+ MODE="LTE |"
+ echo "$O" | grep -q "scell:" && MODE="LTE-A |"
+ ;;
+ "11")
+ MODE="5G SA |"
+ ;;
+ "13")
+ MODE="5G NSA |"
+ ;;
+esac
+
+T=$(echo "$O" | awk -F: '/^lte_tac:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+# TAC_HEX=$(printf "%X" $T)
+# TAC_DEC=$(printf "%d" "0x$T")
+
+ TAC_HEX=$(printf "%X" $T)
+ TAC_DEC="$T"
+fi
+
+O1=$(echo "$O" | grep -A 3 pcell)
+T=$(echo "$O1" | awk -F: '/^pcell:/ {print $3}' | cut -f1 -d" ")
+if [ -n "$T" ]; then
+ MODE="$MODE $(band4g $T)"
+ T1=$(echo "$O1" | awk -F: '/^pcell:/ {print $4}' | xargs)
+ PBAND="$(band4g $T) @${T1/MHz/} MHz"
+
+ T=$(echo "$O1" | awk -F: '/pci:/ {print $3}' | xargs)
+ [ -n "$T" ] && PCI=$T
+ T=$(echo "$O1" | awk -F: '/^channel:/ {print $2}' | cut -f1 -d" " | xargs)
+ [ -n "$T" ] && EARFCN=$T
+ T=$(echo "$O1" | awk -F[:,] '/^lte_rsrp:/ {print $2}')
+ [ -n "$T" ] && RSRP="${T/dBm/}"
+ T=$(echo "$O1" | awk -F[:,] '/rsrq:/ {print $4}' | xargs)
+ [ -n "$T" ] && RSRQ="${T/dB/}"
+ T=$(echo "$O1" | awk -F[:,] '/^lte_rssi:/ {print $2}')
+ [ -n "$T" ] && RSSI="${T/dBm/}"
+ T=$(echo "$O1" | awk -F[:,] '/lte_snr:/ {print $4}' | xargs)
+ [ -n "$T" ] && [ "$T" != "NA" ] && SINR="${T/dB/}"
+fi
+
+O1=$(echo "$O" | grep -A 3 scell)
+IDX=0;
+while true; do
+ O2=$(echo "$O1" | head -n4)
+ if [ -z "$O2" ]; then
+ break
+ fi
+ IDX=$((IDX + 1))
+
+ T=$(echo "$O2" | awk -F: '/^scell:/ {print $3}' | cut -f1 -d" ")
+ MODE="$MODE / $(band4g $T)"
+ T1=$(echo "$O2" | awk -F: '/^scell:/ {print $4}' | xargs)
+ if [ -n "$T1" ]; then
+ case $IDX in
+ 1) S1BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 2) S2BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 3) S3BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 4) S4BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F: '/pci:/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$T";;
+ 2) S2PCI="$T";;
+ 3) S3PCI="$T";;
+ 4) S4PCI="$T";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F: '/^channel:/ {print $2}' | cut -f1 -d" " | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T";;
+ 2) S2EARFCN="$T";;
+ 3) S3EARFCN="$T";;
+ 4) S4EARFCN="$T";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F[:,] '/^lte_rsrp:/ {print $2}')
+# [ -n "$T" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "${T/dBm/} dBm"
+ T=$(echo "$O2" | awk -F[:,] '/rsrq:/ {print $4}' | xargs)
+# [ -n "$T" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "${T/dB/} dB"
+ T=$(echo "$O2" | awk -F[:,] '/^lte_rssi:/ {print $2}')
+# [ -n "$T" ] && addon $((POS + 5)) "(S${IDX}) RSSI" "${T/dBm/} dBm"
+ T=$(echo "$O2" | awk -F[:,] '/lte_snr:/ {print $4}' | xargs)
+# [ -n "$T" ] && [ "$T" != "NA" ] && addon $((POS + 8)) "(S${IDX}) SNR" "${T/dB/} dB"
+
+ O1=$(echo "$O1" | sed '1,4d')
+done
+
+T=$(echo "$O" | awk -F: '/^nr_band:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ MODE="$MODE / $(band5g ${T/n/})"
+ IDX=$((IDX + 1))
+
+ T1=$(echo "$O" | awk -F: '/^nr_band_width:/ {print $2}' | xargs)
+ if [ -n "$T1" ]; then
+ case $IDX in
+ 1) S1BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 2) S2BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 3) S3BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 4) S4BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O" | awk -F: '/^nr_pci:/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$T";;
+ 2) S2PCI="$T";;
+ 3) S3PCI="$T";;
+ 4) S4PCI="$T";;
+ *) ;;
+ esac
+ fi
+ T=$(echo "$O" | awk -F: '/^nr_channel:/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T";;
+ 2) S2EARFCN="$T";;
+ 3) S3EARFCN="$T";;
+ 4) S4EARFCN="$T";;
+ *) ;;
+ esac
+ fi
+ T=$(echo "$O" | awk -F: '/^nr_rsrp:/ {print $2}' | cut -f1 -d" ")
+# [ -n "$T" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "${T/dBm/} dBm"
+ T=$(echo "$O" | awk -F: '/^nr_rsrq:/ {print $2}' | xargs)
+# [ -n "$T" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "${T/dB/} dB"
+ T=$(echo "$O" | awk -F: '/^nr_snr:/ {print $2}' | xargs)
+# [ -n "$T" ] && [ "$T" != "NA" ] && addon $((POS + 8)) "(S${IDX}) SNR" "${T/dB/} dB"
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+
+# Modem
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "//)
+MODEL="$MODELBCUT "$MODELACUT
+
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+CGMR "//)
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\ICCID:/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=1e2d ProdID=00b3' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e2d00b7 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e2d00b7
new file mode 100644
index 00000000..a3202c68
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/1e2d00b7
@@ -0,0 +1,225 @@
+# Dell DW5930e
+# Foxconn T99W175
+# Thales Cinterion MV31-W
+
+O=$(sms_tool -d $DEVICE at "AT^TEMP?")
+
+T=$(echo "$O" | awk '/^TSENS: / {gsub("C","",$2); print $2}')
+T1=$(echo "$O" | awk '/^PA: / {gsub("C","",$2); print $2}')
+if [ -n "$T" ] && [ -n "$T1" ]; then
+ if [[ "$T1" =~ ^[0-9]+$ && "$T" =~ ^[0-9]+$ ]]; then
+ if [ "$T1" -gt "$T" ]; then
+ T="$T1"
+ fi
+ fi
+fi
+
+T1=$(echo "$O" | awk '/^Skin Sensor: / {gsub("C","",$2); print $2}')
+if [ -n "$T" ] && [ -n "$T1" ]; then
+ if [[ "$T1" =~ ^[0-9]+$ && "$T" =~ ^[0-9]+$ ]]; then
+ if [ "$T1" -gt "$T" ]; then
+ T="$T1"
+ fi
+ fi
+fi
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at^debug?")
+
+case "$MODE_NUM" in
+ "7")
+ MODE="LTE |"
+ echo "$O" | grep -q "scell:" && MODE="LTE-A |"
+ ;;
+ "11")
+ MODE="5G SA |"
+ ;;
+ "13")
+ MODE="5G NSA |"
+ ;;
+esac
+
+T=$(echo "$O" | awk -F: '/^lte_tac:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+# TAC_HEX=$(printf "%X" $T)
+# TAC_DEC=$(printf "%d" "0x$T")
+
+ TAC_HEX=$(printf "%X" $T)
+ TAC_DEC="$T"
+fi
+
+O1=$(echo "$O" | grep -A 3 pcell)
+T=$(echo "$O1" | awk -F: '/^pcell:/ {print $3}' | cut -f1 -d" ")
+if [ -n "$T" ]; then
+ MODE="$MODE $(band4g $T)"
+ T1=$(echo "$O1" | awk -F: '/^pcell:/ {print $4}' | xargs)
+ PBAND="$(band4g $T) @${T1/MHz/} MHz"
+
+ T=$(echo "$O1" | awk -F: '/pci:/ {print $3}' | xargs)
+ [ -n "$T" ] && PCI=$T
+ T=$(echo "$O1" | awk -F: '/^channel:/ {print $2}' | cut -f1 -d" " | xargs)
+ [ -n "$T" ] && EARFCN=$T
+ T=$(echo "$O1" | awk -F[:,] '/^lte_rsrp:/ {print $2}')
+ [ -n "$T" ] && RSRP="${T/dBm/}"
+ T=$(echo "$O1" | awk -F[:,] '/rsrq:/ {print $4}' | xargs)
+ [ -n "$T" ] && RSRQ="${T/dB/}"
+ T=$(echo "$O1" | awk -F[:,] '/^lte_rssi:/ {print $2}')
+ [ -n "$T" ] && RSSI="${T/dBm/}"
+ T=$(echo "$O1" | awk -F[:,] '/lte_snr:/ {print $4}' | xargs)
+ [ -n "$T" ] && [ "$T" != "NA" ] && SINR="${T/dB/}"
+fi
+
+O1=$(echo "$O" | grep -A 3 scell)
+IDX=0;
+while true; do
+ O2=$(echo "$O1" | head -n4)
+ if [ -z "$O2" ]; then
+ break
+ fi
+ IDX=$((IDX + 1))
+
+ T=$(echo "$O2" | awk -F: '/^scell:/ {print $3}' | cut -f1 -d" ")
+ MODE="$MODE / $(band4g $T)"
+ T1=$(echo "$O2" | awk -F: '/^scell:/ {print $4}' | xargs)
+ if [ -n "$T1" ]; then
+ case $IDX in
+ 1) S1BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 2) S2BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 3) S3BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ 4) S4BAND="$(band4g $T) @${T1/MHz/} MHz";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F: '/pci:/ {print $3}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$T";;
+ 2) S2PCI="$T";;
+ 3) S3PCI="$T";;
+ 4) S4PCI="$T";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F: '/^channel:/ {print $2}' | cut -f1 -d" " | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T";;
+ 2) S2EARFCN="$T";;
+ 3) S3EARFCN="$T";;
+ 4) S4EARFCN="$T";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O2" | awk -F[:,] '/^lte_rsrp:/ {print $2}')
+# [ -n "$T" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "${T/dBm/} dBm"
+ T=$(echo "$O2" | awk -F[:,] '/rsrq:/ {print $4}' | xargs)
+# [ -n "$T" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "${T/dB/} dB"
+ T=$(echo "$O2" | awk -F[:,] '/^lte_rssi:/ {print $2}')
+# [ -n "$T" ] && addon $((POS + 5)) "(S${IDX}) RSSI" "${T/dBm/} dBm"
+ T=$(echo "$O2" | awk -F[:,] '/lte_snr:/ {print $4}' | xargs)
+# [ -n "$T" ] && [ "$T" != "NA" ] && addon $((POS + 8)) "(S${IDX}) SNR" "${T/dB/} dB"
+
+ O1=$(echo "$O1" | sed '1,4d')
+done
+
+T=$(echo "$O" | awk -F: '/^nr_band:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ MODE="$MODE / $(band5g ${T/n/})"
+ IDX=$((IDX + 1))
+
+ T1=$(echo "$O" | awk -F: '/^nr_band_width:/ {print $2}' | xargs)
+ if [ -n "$T1" ]; then
+ case $IDX in
+ 1) S1BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 2) S2BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 3) S3BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ 4) S4BAND="$(band5g ${T/n/}) @${T1/MHz/} MHz";;
+ *) ;;
+ esac
+ fi
+
+ T=$(echo "$O" | awk -F: '/^nr_pci:/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$T";;
+ 2) S2PCI="$T";;
+ 3) S3PCI="$T";;
+ 4) S4PCI="$T";;
+ *) ;;
+ esac
+ fi
+ T=$(echo "$O" | awk -F: '/^nr_channel:/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T";;
+ 2) S2EARFCN="$T";;
+ 3) S3EARFCN="$T";;
+ 4) S4EARFCN="$T";;
+ *) ;;
+ esac
+ fi
+ T=$(echo "$O" | awk -F: '/^nr_rsrp:/ {print $2}' | cut -f1 -d" ")
+# [ -n "$T" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "${T/dBm/} dBm"
+ T=$(echo "$O" | awk -F: '/^nr_rsrq:/ {print $2}' | xargs)
+# [ -n "$T" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "${T/dB/} dB"
+ T=$(echo "$O" | awk -F: '/^nr_snr:/ {print $2}' | xargs)
+# [ -n "$T" ] && [ "$T" != "NA" ] && addon $((POS + 8)) "(S${IDX}) SNR" "${T/dB/} dB"
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+
+# Modem
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "//)
+MODEL="$MODELBCUT "$MODELACUT
+
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+CGMR "//)
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\ICCID:/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=1e2d ProdID=00b7' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/20202033 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/20202033
new file mode 100644
index 00000000..223e013b
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/20202033
@@ -0,0 +1,89 @@
+# BroadMobi BM806U (DLINK DWR-921 C1)
+
+if [ "x$MODE_NUM" = "x7" ]; then
+
+ O=$(sms_tool -d $DEVICE at "AT+BMTCELLINFO")
+ echo "$O" | grep "^+BMTCELLINFO" | grep -q ",LAC_ID:" && O=$(echo "$O"| sed 's/,[ ]*/\n/g')
+
+ T=$(echo "$O" | awk -F[,:] '/^TAC:/ {print $2}' | xargs)
+ if [ -n "$T" ]; then
+ T_HEX=$(printf "%X" $T)
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^RSSI:/ {print $2}' | xargs)
+ [ -n "$T" ] && RSSI="-${T}"
+ T=$(echo "$O" | awk -F[,:] '/^RSRP:/ {print $2}' | xargs)
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^RSRQ:/ {print $2}' | xargs)
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^SINR:/ {print $2}' | xargs)
+ [ -n "$T" ] && SINR="$T"
+
+ TB=$(echo "$O" | awk -F[,:] '/^ACTIVE BAND:/ {print $2}' | xargs)
+ [ -n "$TB" ] && MODE="LTE | $(band4g ${TB})" && PBAND="$(band4g ${TB})"
+ if [ -z "$TB" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^active band:/ {print $2}' | xargs)
+ [ -n "$T" ] && MODE="LTE | $(band4g ${T})"
+ PBAND="$(band4g ${T})"
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^PCI:/ {print $2}' | xargs)
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^EARFCN_DL:/ {print $2}' | xargs)
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ EARFCN="$T"
+# EARFCN DL="$T"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^EARFCN_UL:/ {print $2}' | xargs)
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ EARFCN UL="$T"
+ fi
+
+fi
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+CGMR "//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "//)
+MODEL="$MODELBCUT "$MODELACUT
+
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2020 ProdID=2033' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0122 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0122
new file mode 100644
index 00000000..ac421a72
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0122
@@ -0,0 +1,502 @@
+# Quectel RM551E-GL
+
+O=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {print $3}' | sort -r | head -n1 | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ -z "$REG" ] || [ "x$MODE_NUM" = "x11" ]; then
+ O=$(sms_tool -d $DEVICE at "at+c5greg=2;+c5greg?")
+
+ # C5GREG
+ eval $(echo "$O" | awk -F[,] '/^\+C5GREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";TAC_HEX=\"%X\";CID_HEX=\"%s\";TAC_DEC=\"%d\";MODE_NUM=\"%d\"", $2, "0x"$3, $4, "0x"$3, $5}')
+ case "$T" in
+ 0*) REG="0";;
+ 1*) REG="1";;
+ 2*) REG="2";;
+ 3*) REG="3";;
+ 5*) REG="5";;
+ *) REG="";;
+ esac
+ [ "x$REG" = "x1" ] || [ "x$REG" = "x5" ] && REGOK=1
+
+ [ "$TAC_DEC" != "0" ]
+ [ -n "$CID_HEX" ] && CID_DEC=$(printf "%d" "0x${CID_HEX}")
+fi
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qcainfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $2}' | xargs)
+if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+ COPS="$T"
+fi
+
+case "$MODE_NUM" in
+ 7*)
+ if echo "$O" | grep -q -i "+QCAINFO.*SCC"; then
+ MODE="LTE-A |"
+ fi
+ ;;
+ 11*)
+ MODE="5G SA |"
+ ;;
+ 13*)
+ if echo "$O" | grep -q -i "+QCAINFO.*NR5G"; then
+ MODE="5G NSA |"
+ else
+ if echo "$O" | grep -q -i "+QCAINFO.*PCC.*LTE"; then
+ MODE="LTE |"
+
+ OTS=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$OTS
+
+ TDX=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$TDX")
+ TAC_HEX=$TDX
+
+ if echo "$O" | grep -q -i "+QCAINFO.*SCC"; then
+ MODE="LTE-A |"
+
+ OTS=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$OTS
+
+ TDX=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$TDX")
+ TAC_HEX=$TDX
+ fi
+ fi
+ fi
+ ;;
+esac
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ MODE="$MODE $(band4g ${B})"
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ MODE="$MODE $(band5g ${B})"
+ ;;
+ esac
+
+ T1=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{gsub(" ", "-");print $5}')
+ if [ -n "$T1" ]; then
+ for T in $T1; do
+ case $T in
+ *"LTE-BAND"*)
+ B=$(echo $T | sed 's/"LTE-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band4g ${B})"
+ ;;
+ *"NR5G-BAND"*)
+ B=$(echo $T | sed 's/"NR5G-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band5g ${B})"
+ ;;
+ esac
+ done
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x11" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xNR5G-SA" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $8}')
+ if [ -n "$T" ]; then
+ CID_HEX=$T
+ CID_DEC=$(printf "%d" "0x${CID_HEX}")
+ fi
+# T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}')
+# [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0) BW="5";;
+ 1) BW="10";;
+ 2) BW="15";;
+ 3) BW="20";;
+ 4) BW="25";;
+ 5) BW="30";;
+ 6) BW="40";;
+ 7) BW="50";;
+ 8) BW="60";;
+ 9) BW="70";;
+ 10) BW="80";;
+ 11) BW="90";;
+ 12) BW="100";;
+ 13) BW="200";;
+ 14) BW="400";;
+ *) BW="";;
+ esac
+ [ -n "$BW" ] && DBW="@$BW MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ if [ -n "$T" ]; then
+ RSRP="$T"
+ if [ -n "$BW" ]; then
+ N=$((BW * 5))
+ RSSI=$(echo "$T $N" | awk '{printf "%d\n", $1 + 10*log(12*$2)/log(10)}')
+ if [ -n "$RSSI" ]; then
+ [ $RSSI -lt -113 ] && RSSI="-113"
+ [ $RSSI -gt -51 ] && RSSI="-51"
+ RSSI="$RSSI"
+ [ -z "$CSQ_PER" ] && CSQ_PER=$(((RSSI + 113) * 100 / 62 ))
+ [ -z "$CSQ" ] && CSQ=$(((31 * CSQ_PER) / 100))
+ fi
+ fi
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}')
+ [ -n "$T" ] && SINR="$T"
+ fi
+fi
+
+IFS="
+"
+
+if [ "x$MODE_NUM" = "x13" ]; then
+ LINES=$(echo "$O" | grep "+QENG")
+ for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/{print $2}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX=$T
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $16}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $10}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $11}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ elif [ "x$T" = "xservingcell" ]; then
+ if [ "x${MODE:0:3}" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.1f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+ fi
+ done
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ T2=$(band5g ${B})
+ ;;
+ esac
+ T3=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $4}')
+ case $T3 in
+ 6*) T4="1.4";;
+ 15*) T4="3";;
+ 25*) T4="5";;
+ 50*) T4="10";;
+ 75*) T4="15";;
+ 100*) T4="20";;
+ *) T4="";;
+ esac
+ if [ -z "$T4" ]; then
+ PBAND="$T2"
+ if [ -n "$DBW" ]; then
+ PBAND="$T2 $DBW"
+ fi
+ else
+ PBAND="$T2 @$T4 MHz"
+ fi
+ if [ "x$MODE_NUM" = "x11" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $6}' | xargs)
+ [ -n "$T" ] && PCI="$T"
+ else
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $7}')
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $10}')
+ [ -n "$T" ] && RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $8}')
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $9}')
+ [ -n "$T" ] && RSRQ="$T"
+ fi
+
+ IDX=1
+ LINES=$(echo "$O" | grep -E "^\+QCAINFO: \"(scc|SCC)\"")
+ for LINE in $LINES; do
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $5}')
+ T3=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $4}')
+ T4=""
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ case $T3 in
+ 6*) T4="1.4";;
+ 15*) T4="3";;
+ 25*) T4="5";;
+ 50*) T4="10";;
+ 75*) T4="15";;
+ 100*) T4="20";;
+ *) T4="";;
+ esac
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T5";;
+ 2) S2EARFCN="$T5";;
+ 3) S3EARFCN="$T5";;
+ 4) S4EARFCN="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $10}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 5)) "(S${IDX}) RSSI" "$T5 dBm"
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ T2=$(band5g ${B})
+ case $T3 in
+ 0) T4="5";;
+ 1) T4="10";;
+ 2) T4="15";;
+ 3) T4="20";;
+ 4) T4="25";;
+ 5) T4="30";;
+ 6) T4="40";;
+ 7) T4="50";;
+ 8) T4="60";;
+ 9) T4="70";;
+ 10) T4="80";;
+ 11) T4="90";;
+ 12) T4="100";;
+ 13) T4="200";;
+ 14) T4="400";;
+ *) T4="";;
+ esac
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}')
+ [ -n "$T5" ]
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T5";;
+ 2) S2EARFCN="$T5";;
+ 3) S3EARFCN="$T5";;
+ 4) S4EARFCN="$T5";;
+ *) ;;
+ esac
+ fi
+
+ if [ "x$MODE_NUM" = "x11" ]; then
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}' | xargs)
+ if [ -n "$T5" ] && [ "$T5" != "-" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ else
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $6}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ fi
+ ;;
+ esac
+ if [ -z "$T4" ]; then
+ case $IDX in
+ 1) S1BAND="$T2";;
+ 2) S2BAND="$T2";;
+ 3) S3BAND="$T2";;
+ 4) S4BAND="$T2";;
+ *) ;;
+ esac
+ else
+ case $IDX in
+ 1) S1BAND="$T2 @$T4 MHz";;
+ 2) S2BAND="$T2 @$T4 MHz";;
+ 3) S3BAND="$T2 @$T4 MHz";;
+ 4) S4BAND="$T2 @$T4 MHz";;
+ *) ;;
+ esac
+ fi
+
+ IDX=$((IDX + 1))
+ done
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+if [ "${LAC_DEC}" = "0" ]; then
+ LAC_DEC="-"
+ LAC_HEX="-"
+fi
+
+# Modem
+GETNFO=$(gcom -d $DEVICE -s /usr/share/3ginfo-lite/vendorproduct.gcom)
+FW=$(echo "$GETNFO" | awk -F [:] '/^\+CGMR:/{print $2}' | xargs)
+
+MVENDOR=$(echo "$GETNFO" | awk -F [:] '/^\+CGMI:/{print $2}' | xargs)
+MPRODUCT=$(echo "$GETNFO" | awk -F [:] '/^\+CGMM:/{print $2}' | xargs)
+MODEL="$MVENDOR "$MPRODUCT
+
+# Slot SIM
+O=$(sms_tool -d $DEVICE at "AT+QUIMSLOT?")
+T=$(echo "$O" | awk -F [:] '/^\+QUIMSLOT/{print $2}' | xargs)
+if [ -n "$T" ]; then
+ SSIM="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+NR_I=$(echo "$GETNFO" | awk -F [:] '/^\+CGSN:/{print $2}' | xargs)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+NR_C=$(echo "$GETNFO" | awk -F [:] '/^\+CIMI:/{print $2}' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+NR_D=$(echo "$GETNFO" | awk -F [:] '/^\+ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=0801' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0125 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0125
new file mode 100644
index 00000000..0bc2c35a
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0125
@@ -0,0 +1,120 @@
+# Quectel EC20-E
+# Quectel EC25
+
+O=$(sms_tool -d $DEVICE at "at+qtemp;+qnwinfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {t=$2*1;if($3*1>t)t=$3*1;if($4*1>t)t=$4*1;printf "%d", t}')
+if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ TEMP="$T °C"
+ ADDON="$ADDON"'{"Temperatura":"'$T' °C"}'
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QNWINFO:/ {print $4}' | xargs)
+if [ -n "$T" ]; then
+ case "$T" in
+ *"LTE BAND 1") MODE=$(band4g 1 "LTE ");;
+ *"LTE BAND 3") MODE=$(band4g 3 "LTE ");;
+ *"LTE BAND 7") MODE=$(band4g 5 "LTE ");;
+ *"LTE BAND 7") MODE=$(band4g 7 "LTE ");;
+ *"LTE BAND 8") MODE=$(band4g 8 "LTE ");;
+ *"LTE BAND 20") MODE=$(band4g 20 "LTE ");;
+ *"LTE BAND 28") MODE=$(band4g 28 "LTE ");;
+ *"LTE BAND 32") MODE=$(band4g 32 "LTE ");;
+ *"LTE BAND 38") MODE=$(band4g 38 "LTE ");;
+ *"LTE BAND 40") MODE=$(band4g 40 "LTE ");;
+ *"LTE BAND 41") MODE=$(band4g 41 "LTE ");;
+ *) MODE="$T";;
+ esac
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+if [ "x$T" = "xLTE" ] || [ "x$T" = "x4G" ]; then
+# CELLID=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $8}' | xargs)
+# PCID=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}' | xargs)
+# EARFCN=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $10}' | xargs)
+# FREQ_BAND_IND=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $11}' | xargs)
+ ULBW=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}' | xargs)
+ DLBW=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}' | xargs)
+# TAC=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}' | xargs)
+ RSRP=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}' | xargs)
+ RSRQ=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}' | xargs)
+ RSSI=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $17}' | xargs)
+ SINR=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | xargs | awk '{printf "%.1f\n", $1*0.2-20}')
+# SRXLEV=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $19}' | xargs)
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"CELLID":"'$CELLID'"}'
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"PCID":"'$PCID'"}'
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"EARFCN":"'$EARFCN'"}'
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"FREQ_BAND_IND":"'$FREQ_BAND_IND'"}'
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"UL_BANDWIDTH":"'$UL_BANDWIDTH'"}'
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"DL_BANDWIDTH":"'$DL_BANDWIDTH'"}'
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"TAC":"'$TAC'"}'
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"RSRP":"'$RSRP' dBm"}'
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"RSRQ":"'$RSRQ' dB"}'
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"RSSI":"'$RSSI' dBm"}'
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ ADDON="$ADDON"'{"SINR":"'$SINR' dB"}'
+# [ -n "$ADDON" ] && ADDON="$ADDON,"
+# ADDON="$ADDON"'{"SRXLEV":"'$SRXLEV'"}'
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $4}' | xargs)
+if [ -n "$T" ]; then
+ COPS="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | cut -c 8-)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | cut -c 9-)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+QCCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+QCCID/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEVV=$(echo $OF | tr -s "\n" | xargs)
+FW=$(echo $DEVV | awk -F 'Revision:' '{print $2}'| xargs)
+MODEL=$(echo $DEVV | awk -F 'ati|Revision:' '{print $1}'| xargs)
+if [ -z "$MODEL" ]
+then
+ MODEL=$(echo $DEVV | awk -F 'ati|Revision:' '{print $2}'| xargs)
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=0125' '{print $2}' | cut -c-1220)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0306 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0306
new file mode 100644
index 00000000..1cd3b4ca
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0306
@@ -0,0 +1,149 @@
+# Quectel EP06
+# Quectel EG06
+
+O=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {t=$2*1;if($3*1>t)t=$3*1;if($4*1>t)t=$4*1;printf "%d", t}')
+[ -n "$T" ] && TEMP="$T °C"
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QNWINFO/ {print $2"/"$4}' | xargs)
+if [ -n "$T" ]; then
+ if [ "x$MODE_NUM" = "x7" ]; then
+ B=$(echo $T | sed 's/.*LTE BAND \(.*\)/\1/')
+ MODE="LTE $(band4g ${B})"
+ MAINCUT="$(band4g ${B})"
+ fi
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+if [ "x$T" = "xLTE" ] || [ "x$T" = "x4G" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0) T1="1.4";;
+ 1) T1="3";;
+ 2) T1="5";;
+ 3) T1="10";;
+ 4) T1="15";;
+ 5) T1="20";;
+ *) T1="?";;
+ esac
+ ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0) T1="1.4";;
+ 1) T1="3";;
+ 2) T1="5";;
+ 3) T1="10";;
+ 4) T1="15";;
+ 5) T1="20";;
+ *) T1="?";;
+ esac
+ DLBW="DL: @$T1 MHz"
+ PBAND="$MAINCUT $DLBW $ULBW"
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}')
+ PCI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $10}')
+ EARFCN=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $17}')
+ RSSI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}')
+ RSRP=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}')
+ RSRQ=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.1f\n", $1*0.2-20}')
+ SINR=$T
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $2}' | xargs)
+if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+ COPS="$T"
+fi
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ O=$(sms_tool -d $DEVICE at "AT+QCAINFO")
+
+ T=$(echo "$O" | awk -F[,] '/^\+QCAINFO: "scc"/{print $4}' | xargs)
+ if [ -n "$T" ]; then
+ B=$(echo $T | sed 's/.*LTE BAND \(.*\)/\1/')
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "scc"/ {print $4}')
+ case $T in
+ 6) T1="1.4";;
+ 15) T1="3";;
+ 25) T1="5";;
+ 50) T1="10";;
+ 75) T1="15";;
+ 100) T1="20";;
+ *) T1="?";;
+ esac
+ MODE="${MODE/LTE/LTE_A} / $(band4g ${B})"
+ S1BAND="$(band4g ${B}) @$T1 MHz"
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "scc"/ {print $7}')
+ S1PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "scc"/ {print $3}')
+ S1EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "scc"/ {print $10}')
+ RSSI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "scc"/ {print $8}')
+ RSRP=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "scc"/ {print $9}')
+ RSRQ=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "scc"/ {print $11}' | awk '{printf "%.1f\n", $1*0.2-20}')
+ SINR=$T
+ fi
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,' | sed "s/LTE_A/LTE-A | /g")
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEVV=$(echo $OF | tr -s "\n" | xargs)
+FW=$(echo $DEVV | awk -F 'Revision:' '{print $2}'| xargs)
+MODEL=$(echo $DEVV | awk -F 'ati|Revision:' '{print $1}'| xargs)
+if [ -z "$MODEL" ]
+then
+ MODEL=$(echo $DEVV | awk -F 'ati|Revision:' '{print $2}'| xargs)
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | cut -c 8-)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | cut -c 9-)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+QCCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+QCCID/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=0306' '{print $2}' | cut -c-1220)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0512 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0512
new file mode 100644
index 00000000..5e86a97f
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0512
@@ -0,0 +1,251 @@
+# Quectel EG18-EA
+# Quectel EM12-G
+# Quectel EM160R-GL
+
+O=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {print $3}' | sort -r | head -n1 | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qcainfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $2}' | xargs)
+if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+ COPS="$T"
+fi
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ echo "$O" | grep -q -i "+QCAINFO.*SCC" && MODE="LTE-A"
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX=$T
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0) T1="1.4";;
+ 1) T1="3";;
+ 2) T1="5";;
+ 3) T1="10";;
+ 4) T1="15";;
+ 5) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0) T1="1.4";;
+ 1) T1="3";;
+ 2) T1="5";;
+ 3) T1="10";;
+ 4) T1="15";;
+ 5) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+ if [ -z "$T" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QNWINFO:/{print $4}')
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ MODE="$MODE $T2"
+ T3=$(echo "$O" | awk -F[,:] '/^\+QNWINFO:"/{print $11}')
+ case $T3 in
+ 6) T4="1.4";;
+ 15) T4="3";;
+ 25) T4="5";;
+ 50) T4="10";;
+ 75) T4="15";;
+ 100) T4="20";;
+ *) T4="";;
+ esac
+ if [ -z "$T4" ]; then
+ PBAND="$T2"
+ else
+ PBAND="$T2 @${T4} MHz"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}')
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $10}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $17}')
+ [ -n "$T" ] && RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}')
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {printf "%.1f\n", $18/5-20}' | xargs)
+ [ -n "$T" ] && SINR="$T"
+ else
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ MODE="$MODE $T2"
+ T3=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $4}')
+ case $T3 in
+ 6) T4="1.4";;
+ 15) T4="3";;
+ 25) T4="5";;
+ 50) T4="10";;
+ 75) T4="15";;
+ 100) T4="20";;
+ *) T4="";;
+ esac
+ if [ -z "$T4" ]; then
+ PBAND="$T2"
+ else
+ PBAND="$T2 @${T4} MHz"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $7}')
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $10}')
+ [ -n "$T" ] && RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $8}')
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $9}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{printf "%.1f\n", $11/5-20}' | xargs)
+ [ -n "$T" ] && SINR="$T"
+
+IFS="
+"
+
+ IDX=1
+ LINES=$(echo "$O" | grep -E "^\+QCAINFO: \"(scc|SCC)\"")
+ for LINE in $LINES; do
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $5}')
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ MODE="$MODE / $T2"
+ T3=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $4}')
+ case $T3 in
+ 6) T4="1.4";;
+ 15) T4="3";;
+ 25) T4="5";;
+ 50) T4="10";;
+ 75) T4="15";;
+ 100) T4="20";;
+ *) T4="";;
+ esac
+ if [ -z "$T4" ]; then
+ case $IDX in
+ 1) S1BAND="$T2";;
+ 2) S2BAND="$T2";;
+ 3) S3BAND="$T2";;
+ 4) S4BAND="$T2";;
+ *) ;;
+ esac
+ else
+ case $IDX in
+ 1) S1BAND="$T2 @${T4} MHz";;
+ 2) S2BAND="$T2 @${T4} MHz";;
+ 3) S3BAND="$T2 @${T4} MHz";;
+ 4) S4BAND="$T2 @${T4} MHz";;
+ *) ;;
+ esac
+ fi
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}')
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T";;
+ 2) S2EARFCN="$T";;
+ 3) S3EARFCN="$T";;
+ 4) S4EARFCN="$T";;
+ *) ;;
+ esac
+ fi
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}')
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$T";;
+ 2) S2PCI="$T";;
+ 3) S3PCI="$T";;
+ 4) S4PCI="$T";;
+ *) ;;
+ esac
+ fi
+# T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $10}')
+# addon $((POS + 5)) "(S${IDX}) RSSI" "$T dBm"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# addon $((POS + 6)) "(S${IDX}) RSRP" "$T dBm"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}')
+# addon $((POS + 7)) "(S${IDX}) RSRQ" "$T dB"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{printf "%.1f\n", $11/5-20}' | xargs)
+# addon $((POS + 8)) "(S${IDX}) SINR" "$T dB"
+
+ IDX=$((IDX + 1))
+ done
+ fi
+fi
+
+fi
+
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+# Modem
+OF=$(sms_tool -d $DEVICE at "ati")
+DEVV=$(echo $OF | tr -s "\n" | xargs)
+FWA=$(sms_tool -d $DEVICE at "AT+GMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | cut -c 8-)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | cut -c 9-)
+MODELBCUT=$(echo $MODELB | cut -c 9-)
+MODEL="$MODELBCUT "$MODELACUT
+if [ -z "$MODEL" ]
+then
+ MODEL=$(echo $DEVV | awk -F 'ati|Revision:' '{print $2}'| xargs)
+fi
+
+# Slot SIM
+O=$(sms_tool -d $DEVICE at "AT+QUIMSLOT?")
+T=$(echo "$O" | awk -F [:] '/^\+QUIMSLOT/{print $2}' | xargs)
+if [ -n "$T" ]; then
+ SSIM="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | cut -c 8-)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | cut -c 9-)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+QCCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+QCCID/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=0512' '{print $2}' | cut -c-1220)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0620 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0620
new file mode 100644
index 00000000..7d5f78f1
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0620
@@ -0,0 +1,255 @@
+# Quectel EM160R-GL
+
+O=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {print $3}' | sort -r | head -n1 | xargs)
+if [ -n "$T" ]; then
+ TEMP="$T °C"
+fi
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qcainfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $2}' | xargs)
+if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+ COPS="$T"
+fi
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ echo "$O" | grep -q -i "+QCAINFO.*SCC" && MODE="LTE-A |"
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ MODE="$MODE $(band4g ${B})"
+
+ T1=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{gsub(" ", "-");print $5}')
+ if [ -n "$T1" ]; then
+ for T in $T1; do
+ B=$(echo $T | sed 's/"LTE-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band4g ${B})"
+ done
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$T
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $17}' | xargs)
+ if [ -n "$T" ]; then
+ RSSI=$T
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}' | xargs)
+ if [ -n "$T" ]; then
+ RSRP=$T
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}' | xargs)
+ if [ -n "$T" ]; then
+ RSRQ=$T
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}' | xargs)
+ if [ -n "$T" ]; then
+ PCI=$T
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $10}' | xargs)
+ if [ -n "$T" ]; then
+ EARFCN=$T
+ fi
+
+ QO=$(sms_tool -d $DEVICE at "at+qnwinfo;")
+ PBAND=$(echo "$QO" | awk -F[,:] '/^\+QNWINFO:/ {print $4}' | xargs)
+ MAINCUT=$(echo $PBAND | sed 's/LTE BAND //g')
+
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="?";;
+ esac
+ ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ DLBW="DL: @$T1 MHz"
+
+ PBAND="$(band4g $MAINCUT "") $DLBW $ULBW"
+ if [ "x$MODE" = "xLTE" ]; then
+ MODE="LTE | $(band4g $MAINCUT "")"
+ fi
+ fi
+fi
+
+IFS="
+"
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ T3=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $4}')
+ case $T3 in
+ 6) T4="1.4";;
+ 15) T4="3";;
+ 25) T4="5";;
+ 50) T4="10";;
+ 75) T4="15";;
+ 100) T4="20";;
+ *) T4="?";;
+ esac
+ if [ -z "$T4" ]; then
+ PBAND="$T2"
+ else
+ PBAND="$T2 @$T4 MHz"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ EARFCN=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $7}')
+ PCI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $10}')
+ RSSI=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $8}')
+ RSRP=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $9}')
+ RSRQ=$T
+
+ IDX=1
+ LINES=$(echo "$O" | grep -E "^\+QCAINFO: \"(scc|SCC)\"")
+ for LINE in $LINES; do
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $5}')
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ T3=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $4}')
+ case $T3 in
+ 6) T4="1.4";;
+ 15) T4="3";;
+ 25) T4="5";;
+ 50) T4="10";;
+ 75) T4="15";;
+ 100) T4="20";;
+ *) T4="?";;
+ esac
+ if [ -z "$T4" ]; then
+
+ case $IDX in
+ 1) S1BAND="$T2";;
+ 2) S2BAND="$T2";;
+ 3) S3BAND="$T2";;
+ 4) S4BAND="$T2";;
+ *) ;;
+ esac
+
+ else
+
+ case $IDX in
+ 1) S1BAND="$T2 @$T4 MHz";;
+ 2) S2BAND="$T2 @$T4 MHz";;
+ 3) S3BAND="$T2 @$T4 MHz";;
+ 4) S4BAND="$T2 @$T4 MHz";;
+ *) ;;
+ esac
+
+ fi
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}')
+ if [ -n "$T" ]; then
+
+ case $IDX in
+ 1) S1EARFCN="$T";;
+ 2) S2EARFCN="$T";;
+ 3) S3EARFCN="$T";;
+ 4) S4EARFCN="$T";;
+ *) ;;
+ esac
+
+ fi
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}')
+ if [ -n "$T" ]; then
+
+ case $IDX in
+ 1) S1PCI="$T";;
+ 2) S2PCI="$T";;
+ 3) S3PCI="$T";;
+ 4) S4PCI="$T";;
+ *) ;;
+ esac
+
+ fi
+
+ IDX=$((IDX + 1))
+ done
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+GMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+GMR "//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "//)
+MODEL="$MODELBCUT "$MODELACUT
+
+# Slot SIM
+O=$(sms_tool -d $DEVICE at "AT+QUIMSLOT?")
+T=$(echo "$O" | awk -F [:] '/^\+QUIMSLOT/{print $2}' | xargs)
+if [ -n "$T" ]; then
+ SSIM="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | cut -c 8-)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | cut -c 9-)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+QCCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+QCCID/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=0620' '{print $2}' | cut -c-1220)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
+
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0800 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0800
new file mode 100644
index 00000000..c92f8b92
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0800
@@ -0,0 +1,510 @@
+# Quectel RG500Q-EA
+# Quectel RG502Q-EA
+# Quectel RM500Q-GL
+# Quectel RM502Q-AE
+
+O=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {print $3}' | sort -r | head -n1 | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ -z "$REG" ] || [ "x$MODE_NUM" = "x11" ]; then
+ O=$(sms_tool -d $DEVICE at "at+c5greg=2;+c5greg?")
+
+ # C5GREG
+ eval $(echo "$O" | awk -F[,] '/^\+C5GREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";TAC_HEX=\"%X\";CID_HEX=\"%s\";TAC_DEC=\"%d\";MODE_NUM=\"%d\"", $2, "0x"$3, $4, "0x"$3, $5}')
+ case "$T" in
+ 0*) REG="0";;
+ 1*) REG="1";;
+ 2*) REG="2";;
+ 3*) REG="3";;
+ 5*) REG="5";;
+ *) REG="";;
+ esac
+ [ "x$REG" = "x1" ] || [ "x$REG" = "x5" ] && REGOK=1
+
+ [ "$TAC_DEC" != "0" ]
+ [ -n "$CID_HEX" ] && CID_DEC=$(printf "%d" "0x${CID_HEX}")
+fi
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qcainfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $2}' | xargs)
+if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+ COPS="$T"
+fi
+
+case "$MODE_NUM" in
+ 7*)
+ if echo "$O" | grep -q -i "+QCAINFO.*SCC"; then
+ MODE="LTE-A |"
+ fi
+ ;;
+ 11*)
+ MODE="5G SA |"
+ ;;
+ 13*)
+ if echo "$O" | grep -q -i "+QCAINFO.*NR5G"; then
+ MODE="5G NSA |"
+ else
+ if echo "$O" | grep -q -i "+QCAINFO.*PCC.*LTE"; then
+ MODE="LTE |"
+
+ OTS=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$OTS
+
+ TDX=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$TDX")
+ TAC_HEX=$TDX
+
+ if echo "$O" | grep -q -i "+QCAINFO.*SCC"; then
+ MODE="LTE-A |"
+
+ OTS=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$OTS
+
+ TDX=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$TDX")
+ TAC_HEX=$TDX
+ fi
+ fi
+ fi
+ ;;
+esac
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ MODE="$MODE $(band4g ${B})"
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ MODE="$MODE $(band5g ${B})"
+ ;;
+ esac
+
+ T1=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{gsub(" ", "-");print $5}')
+ if [ -n "$T1" ]; then
+ for T in $T1; do
+ case $T in
+ *"LTE-BAND"*)
+ B=$(echo $T | sed 's/"LTE-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band4g ${B})"
+ ;;
+ *"NR5G-BAND"*)
+ B=$(echo $T | sed 's/"NR5G-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band5g ${B})"
+ ;;
+ esac
+ done
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x11" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xNR5G-SA" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $8}')
+ if [ -n "$T" ]; then
+ CID_HEX=$T
+ CID_DEC=$(printf "%d" "0x${CID_HEX}")
+ fi
+# T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}')
+# [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0) BW="5";;
+ 1) BW="10";;
+ 2) BW="15";;
+ 3) BW="20";;
+ 4) BW="25";;
+ 5) BW="30";;
+ 6) BW="40";;
+ 7) BW="50";;
+ 8) BW="60";;
+ 9) BW="70";;
+ 10) BW="80";;
+ 11) BW="90";;
+ 12) BW="100";;
+ 13) BW="200";;
+ 14) BW="400";;
+ *) BW="";;
+ esac
+ [ -n "$BW" ] && DBW="@$BW MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ if [ -n "$T" ]; then
+ RSRP="$T"
+ if [ -n "$BW" ]; then
+ N=$((BW * 5))
+ RSSI=$(echo "$T $N" | awk '{printf "%d\n", $1 + 10*log(12*$2)/log(10)}')
+ if [ -n "$RSSI" ]; then
+ [ $RSSI -lt -113 ] && RSSI="-113"
+ [ $RSSI -gt -51 ] && RSSI="-51"
+ RSSI="$RSSI"
+ [ -z "$CSQ_PER" ] && CSQ_PER=$(((RSSI + 113) * 100 / 62 ))
+ [ -z "$CSQ" ] && CSQ=$(((31 * CSQ_PER) / 100))
+ fi
+ fi
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}')
+ [ -n "$T" ] && SINR="$T"
+ fi
+fi
+
+IFS="
+"
+
+if [ "x$MODE_NUM" = "x13" ]; then
+ LINES=$(echo "$O" | grep "+QENG")
+ for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/{print $2}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX=$T
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $16}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $10}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $11}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ elif [ "x$T" = "xservingcell" ]; then
+ if [ "x${MODE:0:3}" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.1f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+ fi
+ done
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ T2=$(band5g ${B})
+ ;;
+ esac
+ T3=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $4}')
+ case $T3 in
+ 6*) T4="1.4";;
+ 15*) T4="3";;
+ 25*) T4="5";;
+ 50*) T4="10";;
+ 75*) T4="15";;
+ 100*) T4="20";;
+ *) T4="";;
+ esac
+ if [ -z "$T4" ]; then
+ PBAND="$T2"
+ if [ -n "$DBW" ]; then
+ PBAND="$T2 $DBW"
+ fi
+ else
+ PBAND="$T2 @$T4 MHz"
+ fi
+ if [ "x$MODE_NUM" = "x11" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $6}' | xargs)
+ [ -n "$T" ] && PCI="$T"
+ else
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $7}')
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $10}')
+ [ -n "$T" ] && RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $8}')
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $9}')
+ [ -n "$T" ] && RSRQ="$T"
+ fi
+
+ IDX=1
+ LINES=$(echo "$O" | grep -E "^\+QCAINFO: \"(scc|SCC)\"")
+ for LINE in $LINES; do
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $5}')
+ T3=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $4}')
+ T4=""
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ case $T3 in
+ 6*) T4="1.4";;
+ 15*) T4="3";;
+ 25*) T4="5";;
+ 50*) T4="10";;
+ 75*) T4="15";;
+ 100*) T4="20";;
+ *) T4="";;
+ esac
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T5";;
+ 2) S2EARFCN="$T5";;
+ 3) S3EARFCN="$T5";;
+ 4) S4EARFCN="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $10}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 5)) "(S${IDX}) RSSI" "$T5 dBm"
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ T2=$(band5g ${B})
+ case $T3 in
+ 0) T4="5";;
+ 1) T4="10";;
+ 2) T4="15";;
+ 3) T4="20";;
+ 4) T4="25";;
+ 5) T4="30";;
+ 6) T4="40";;
+ 7) T4="50";;
+ 8) T4="60";;
+ 9) T4="70";;
+ 10) T4="80";;
+ 11) T4="90";;
+ 12) T4="100";;
+ 13) T4="200";;
+ 14) T4="400";;
+ *) T4="";;
+ esac
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}')
+ [ -n "$T5" ]
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T5";;
+ 2) S2EARFCN="$T5";;
+ 3) S3EARFCN="$T5";;
+ 4) S4EARFCN="$T5";;
+ *) ;;
+ esac
+ fi
+
+ if [ "x$MODE_NUM" = "x11" ]; then
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}' | xargs)
+ if [ -n "$T5" ] && [ "$T5" != "-" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ else
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $6}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ fi
+ ;;
+ esac
+ if [ -z "$T4" ]; then
+ case $IDX in
+ 1) S1BAND="$T2";;
+ 2) S2BAND="$T2";;
+ 3) S3BAND="$T2";;
+ 4) S4BAND="$T2";;
+ *) ;;
+ esac
+ else
+ case $IDX in
+ 1) S1BAND="$T2 @$T4 MHz";;
+ 2) S2BAND="$T2 @$T4 MHz";;
+ 3) S3BAND="$T2 @$T4 MHz";;
+ 4) S4BAND="$T2 @$T4 MHz";;
+ *) ;;
+ esac
+ fi
+
+ IDX=$((IDX + 1))
+ done
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+if [ "${LAC_DEC}" = "0" ]; then
+ LAC_DEC="-"
+ LAC_HEX="-"
+fi
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+GMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+GMR "//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "//)
+MODEL="$MODELBCUT "$MODELACUT
+
+# Slot SIM
+O=$(sms_tool -d $DEVICE at "AT+QUIMSLOT?")
+T=$(echo "$O" | awk -F [:] '/^\+QUIMSLOT/{print $2}' | xargs)
+if [ -n "$T" ]; then
+ SSIM="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+GSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+QCCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+QCCID/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=0800' '{print $2}' | cut -c-1220)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0801 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0801
new file mode 100644
index 00000000..089be1cb
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0801
@@ -0,0 +1,503 @@
+# Quectel RM520N-GL
+# Quectel RM521F-GL
+
+O=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {print $3}' | sort -r | head -n1 | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ -z "$REG" ] || [ "x$MODE_NUM" = "x11" ]; then
+ O=$(sms_tool -d $DEVICE at "at+c5greg=2;+c5greg?")
+
+ # C5GREG
+ eval $(echo "$O" | awk -F[,] '/^\+C5GREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";TAC_HEX=\"%X\";CID_HEX=\"%s\";TAC_DEC=\"%d\";MODE_NUM=\"%d\"", $2, "0x"$3, $4, "0x"$3, $5}')
+ case "$T" in
+ 0*) REG="0";;
+ 1*) REG="1";;
+ 2*) REG="2";;
+ 3*) REG="3";;
+ 5*) REG="5";;
+ *) REG="";;
+ esac
+ [ "x$REG" = "x1" ] || [ "x$REG" = "x5" ] && REGOK=1
+
+ [ "$TAC_DEC" != "0" ]
+ [ -n "$CID_HEX" ] && CID_DEC=$(printf "%d" "0x${CID_HEX}")
+fi
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qcainfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $2}' | xargs)
+if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+ COPS="$T"
+fi
+
+case "$MODE_NUM" in
+ 7*)
+ if echo "$O" | grep -q -i "+QCAINFO.*SCC"; then
+ MODE="LTE-A |"
+ fi
+ ;;
+ 11*)
+ MODE="5G SA |"
+ ;;
+ 13*)
+ if echo "$O" | grep -q -i "+QCAINFO.*NR5G"; then
+ MODE="5G NSA |"
+ else
+ if echo "$O" | grep -q -i "+QCAINFO.*PCC.*LTE"; then
+ MODE="LTE |"
+
+ OTS=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$OTS
+
+ TDX=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$TDX")
+ TAC_HEX=$TDX
+
+ if echo "$O" | grep -q -i "+QCAINFO.*SCC"; then
+ MODE="LTE-A |"
+
+ OTS=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$OTS
+
+ TDX=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$TDX")
+ TAC_HEX=$TDX
+ fi
+ fi
+ fi
+ ;;
+esac
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ MODE="$MODE $(band4g ${B})"
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ MODE="$MODE $(band5g ${B})"
+ ;;
+ esac
+
+ T1=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{gsub(" ", "-");print $5}')
+ if [ -n "$T1" ]; then
+ for T in $T1; do
+ case $T in
+ *"LTE-BAND"*)
+ B=$(echo $T | sed 's/"LTE-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band4g ${B})"
+ ;;
+ *"NR5G-BAND"*)
+ B=$(echo $T | sed 's/"NR5G-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band5g ${B})"
+ ;;
+ esac
+ done
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x11" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xNR5G-SA" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $8}')
+ if [ -n "$T" ]; then
+ CID_HEX=$T
+ CID_DEC=$(printf "%d" "0x${CID_HEX}")
+ fi
+# T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}')
+# [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0) BW="5";;
+ 1) BW="10";;
+ 2) BW="15";;
+ 3) BW="20";;
+ 4) BW="25";;
+ 5) BW="30";;
+ 6) BW="40";;
+ 7) BW="50";;
+ 8) BW="60";;
+ 9) BW="70";;
+ 10) BW="80";;
+ 11) BW="90";;
+ 12) BW="100";;
+ 13) BW="200";;
+ 14) BW="400";;
+ *) BW="";;
+ esac
+ [ -n "$BW" ] && DBW="@$BW MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ if [ -n "$T" ]; then
+ RSRP="$T"
+ if [ -n "$BW" ]; then
+ N=$((BW * 5))
+ RSSI=$(echo "$T $N" | awk '{printf "%d\n", $1 + 10*log(12*$2)/log(10)}')
+ if [ -n "$RSSI" ]; then
+ [ $RSSI -lt -113 ] && RSSI="-113"
+ [ $RSSI -gt -51 ] && RSSI="-51"
+ RSSI="$RSSI"
+ [ -z "$CSQ_PER" ] && CSQ_PER=$(((RSSI + 113) * 100 / 62 ))
+ [ -z "$CSQ" ] && CSQ=$(((31 * CSQ_PER) / 100))
+ fi
+ fi
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}')
+ [ -n "$T" ] && SINR="$T"
+ fi
+fi
+
+IFS="
+"
+
+if [ "x$MODE_NUM" = "x13" ]; then
+ LINES=$(echo "$O" | grep "+QENG")
+ for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/{print $2}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX=$T
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $16}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $10}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $11}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ elif [ "x$T" = "xservingcell" ]; then
+ if [ "x${MODE:0:3}" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.1f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+ fi
+ done
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ T2=$(band5g ${B})
+ ;;
+ esac
+ T3=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $4}')
+ case $T3 in
+ 6*) T4="1.4";;
+ 15*) T4="3";;
+ 25*) T4="5";;
+ 50*) T4="10";;
+ 75*) T4="15";;
+ 100*) T4="20";;
+ *) T4="";;
+ esac
+ if [ -z "$T4" ]; then
+ PBAND="$T2"
+ if [ -n "$DBW" ]; then
+ PBAND="$T2 $DBW"
+ fi
+ else
+ PBAND="$T2 @$T4 MHz"
+ fi
+ if [ "x$MODE_NUM" = "x11" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $6}' | xargs)
+ [ -n "$T" ] && PCI="$T"
+ else
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $7}')
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $10}')
+ [ -n "$T" ] && RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $8}')
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $9}')
+ [ -n "$T" ] && RSRQ="$T"
+ fi
+
+ IDX=1
+ LINES=$(echo "$O" | grep -E "^\+QCAINFO: \"(scc|SCC)\"")
+ for LINE in $LINES; do
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $5}')
+ T3=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $4}')
+ T4=""
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ case $T3 in
+ 6*) T4="1.4";;
+ 15*) T4="3";;
+ 25*) T4="5";;
+ 50*) T4="10";;
+ 75*) T4="15";;
+ 100*) T4="20";;
+ *) T4="";;
+ esac
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T5";;
+ 2) S2EARFCN="$T5";;
+ 3) S3EARFCN="$T5";;
+ 4) S4EARFCN="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $10}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 5)) "(S${IDX}) RSSI" "$T5 dBm"
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ T2=$(band5g ${B})
+ case $T3 in
+ 0) T4="5";;
+ 1) T4="10";;
+ 2) T4="15";;
+ 3) T4="20";;
+ 4) T4="25";;
+ 5) T4="30";;
+ 6) T4="40";;
+ 7) T4="50";;
+ 8) T4="60";;
+ 9) T4="70";;
+ 10) T4="80";;
+ 11) T4="90";;
+ 12) T4="100";;
+ 13) T4="200";;
+ 14) T4="400";;
+ *) T4="";;
+ esac
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}')
+ [ -n "$T5" ]
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T5";;
+ 2) S2EARFCN="$T5";;
+ 3) S3EARFCN="$T5";;
+ 4) S4EARFCN="$T5";;
+ *) ;;
+ esac
+ fi
+
+ if [ "x$MODE_NUM" = "x11" ]; then
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}' | xargs)
+ if [ -n "$T5" ] && [ "$T5" != "-" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ else
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $6}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ fi
+ ;;
+ esac
+ if [ -z "$T4" ]; then
+ case $IDX in
+ 1) S1BAND="$T2";;
+ 2) S2BAND="$T2";;
+ 3) S3BAND="$T2";;
+ 4) S4BAND="$T2";;
+ *) ;;
+ esac
+ else
+ case $IDX in
+ 1) S1BAND="$T2 @$T4 MHz";;
+ 2) S2BAND="$T2 @$T4 MHz";;
+ 3) S3BAND="$T2 @$T4 MHz";;
+ 4) S4BAND="$T2 @$T4 MHz";;
+ *) ;;
+ esac
+ fi
+
+ IDX=$((IDX + 1))
+ done
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+if [ "${LAC_DEC}" = "0" ]; then
+ LAC_DEC="-"
+ LAC_HEX="-"
+fi
+
+# Modem
+GETNFO=$(gcom -d $DEVICE -s /usr/share/3ginfo-lite/vendorproduct.gcom)
+FW=$(echo "$GETNFO" | awk -F [:] '/^\+CGMR:/{print $2}' | xargs)
+
+MVENDOR=$(echo "$GETNFO" | awk -F [:] '/^\+CGMI:/{print $2}' | xargs)
+MPRODUCT=$(echo "$GETNFO" | awk -F [:] '/^\+CGMM:/{print $2}' | xargs)
+MODEL="$MVENDOR "$MPRODUCT
+
+# Slot SIM
+O=$(sms_tool -d $DEVICE at "AT+QUIMSLOT?")
+T=$(echo "$O" | awk -F [:] '/^\+QUIMSLOT/{print $2}' | xargs)
+if [ -n "$T" ]; then
+ SSIM="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+NR_I=$(echo "$GETNFO" | awk -F [:] '/^\+CGSN:/{print $2}' | xargs)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+NR_C=$(echo "$GETNFO" | awk -F [:] '/^\+CIMI:/{print $2}' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+NR_D=$(echo "$GETNFO" | awk -F [:] '/^\+ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=0801' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0900 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0900
new file mode 100644
index 00000000..1ddb3daa
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c0900
@@ -0,0 +1,519 @@
+# Quectel RM500U-CNV
+
+O=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {print $3}' | sort -r | head -n1 | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ -z "$REG" ] || [ "x$MODE_NUM" = "x11" ]; then
+ O=$(sms_tool -d $DEVICE at "at+c5greg=2;+c5greg?")
+
+ # C5GREG
+ eval $(echo "$O" | awk -F[,] '/^\+C5GREG/ {gsub(/[[:space:]"]+/,"");printf "T=\"%d\";TAC_HEX=\"%X\";CID_HEX=\"%s\";TAC_DEC=\"%d\";MODE_NUM=\"%d\"", $2, "0x"$3, $4, "0x"$3, $5}')
+ case "$T" in
+ 0*) REG="0";;
+ 1*) REG="1";;
+ 2*) REG="2";;
+ 3*) REG="3";;
+ 5*) REG="5";;
+ *) REG="";;
+ esac
+ [ "x$REG" = "x1" ] || [ "x$REG" = "x5" ] && REGOK=1
+
+ [ "$TAC_DEC" != "0" ]
+ [ -n "$CID_HEX" ] && CID_DEC=$(printf "%d" "0x${CID_HEX}")
+fi
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qcainfo;+qeng=\"servingcell\";+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $2}' | xargs)
+if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+ COPS="$T"
+fi
+
+case "$MODE_NUM" in
+ 7*)
+ if echo "$O" | grep -q -i "+QCAINFO.*SCC"; then
+ MODE="LTE-A |"
+ fi
+ ;;
+ 11*)
+ MODE="5G SA |"
+ ;;
+ 13*)
+ if echo "$O" | grep -q -i "+QCAINFO.*NR5G"; then
+ MODE="5G NSA |"
+ else
+ if echo "$O" | grep -q -i "+QCAINFO.*PCC.*LTE"; then
+ MODE="LTE |"
+
+ OTS=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$OTS
+
+ TDX=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$TDX")
+ TAC_HEX=$TDX
+
+ if echo "$O" | grep -q -i "+QCAINFO.*SCC"; then
+ MODE="LTE-A |"
+
+ OTS=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR=$OTS
+
+ TDX=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$TDX")
+ TAC_HEX=$TDX
+ fi
+ fi
+ fi
+ ;;
+esac
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ MODE="$MODE $(band4g ${B})"
+ ;;
+ *"NR N"*)
+ B=$(echo $T | sed 's/NR N\(.*\)/\1/')
+ MODE="$MODE $(band5g ${B})"
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ MODE="$MODE $(band5g ${B})"
+ ;;
+ esac
+
+ T1=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{gsub(" ", "-");print $5}')
+ if [ -n "$T1" ]; then
+ for T in $T1; do
+ case $T in
+ *"LTE-BAND"*)
+ B=$(echo $T | sed 's/"LTE-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band4g ${B})"
+ ;;
+ *"NR-N"*)
+ B=$(echo $T | sed 's/NR-N\(.*\)/\1/')
+ MODE="$MODE / $(band5g ${B})"
+ ;;
+ *"NR5G-BAND"*)
+ B=$(echo $T | sed 's/"NR5G-BAND-\(.*\)"/\1/')
+ MODE="$MODE / $(band5g ${B})"
+ ;;
+ esac
+ done
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+fi
+
+if [ "x$MODE_NUM" = "x11" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+ if [ "x$T" = "xNR5G-SA" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $8}')
+ if [ -n "$T" ]; then
+ CID_HEX=$T
+ CID_DEC=$(printf "%d" "0x${CID_HEX}")
+ fi
+# T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $9}')
+# [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0) BW="5";;
+ 1) BW="10";;
+ 2) BW="15";;
+ 3) BW="20";;
+ 4) BW="25";;
+ 5) BW="30";;
+ 6) BW="40";;
+ 7) BW="50";;
+ 8) BW="60";;
+ 9) BW="70";;
+ 10) BW="80";;
+ 11) BW="90";;
+ 12) BW="100";;
+ 13) BW="200";;
+ 14) BW="400";;
+ *) BW="";;
+ esac
+ [ -n "$BW" ] && DBW="@$BW MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ if [ -n "$T" ]; then
+ RSRP="$T"
+ if [ -n "$BW" ]; then
+ N=$((BW * 5))
+ RSSI=$(echo "$T $N" | awk '{printf "%d\n", $1 + 10*log(12*$2)/log(10)}')
+ if [ -n "$RSSI" ]; then
+ [ $RSSI -lt -113 ] && RSSI="-113"
+ [ $RSSI -gt -51 ] && RSSI="-51"
+ RSSI="$RSSI"
+ [ -z "$CSQ_PER" ] && CSQ_PER=$(((RSSI + 113) * 100 / 62 ))
+ [ -z "$CSQ" ] && CSQ=$(((31 * CSQ_PER) / 100))
+ fi
+ fi
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $15}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $16}')
+ [ -n "$T" ] && SINR="$T"
+ fi
+fi
+
+IFS="
+"
+
+if [ "x$MODE_NUM" = "x13" ]; then
+ LINES=$(echo "$O" | grep "+QENG")
+ for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/{print $2}' | xargs)
+ if [ "x$T" = "xLTE" ]; then
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ TAC_DEC=$(printf "%d" "0x$T")
+ TAC_HEX=$T
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $16}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $10}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $11}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ elif [ "x$T" = "xservingcell" ]; then
+ if [ "x${MODE:0:3}" = "xLTE" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.1f\n", 0.2*$1*10 - 20}')
+ SINR="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && ULBW="UL: @$T1 MHz"
+ T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0*) T1="1.4";;
+ 1*) T1="3";;
+ 2*) T1="5";;
+ 3*) T1="10";;
+ 4*) T1="15";;
+ 5*) T1="20";;
+ *) T1="";;
+ esac
+ [ -n "$T1" ] && DLBW="DL: @$T1 MHz"
+ fi
+ fi
+ done
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $5}')
+if [ -n "$T" ]; then
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ ;;
+ *"NR N"*)
+ B=$(echo $T | sed 's/NR N\(.*\)/\1/')
+ T2=$(band5g ${B})
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ T2=$(band5g ${B})
+ ;;
+ esac
+ T3=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $4}')
+ case $T3 in
+ 6*) T4="1.4";;
+ 15*) T4="3";;
+ 25*) T4="5";;
+ 50*) T4="10";;
+ 75*) T4="15";;
+ 100*) T4="20";;
+ *) T4="";;
+ esac
+ if [ -z "$T4" ]; then
+ PBAND="$T2"
+ if [ -n "$DBW" ]; then
+ PBAND="$T2 $DBW"
+ fi
+ else
+ PBAND="$T2 @$T4 MHz"
+ fi
+ if [ "x$MODE_NUM" = "x11" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $6}' | xargs)
+ [ -n "$T" ] && PCI="$T"
+ else
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $3}')
+ [ -n "$T" ] && EARFCN="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $7}')
+ [ -n "$T" ] && PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $10}')
+ [ -n "$T" ] && RSSI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $8}')
+ [ -n "$T" ] && RSRP="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+QCAINFO: "(pcc|PCC)"/{print $9}')
+ [ -n "$T" ] && RSRQ="$T"
+ fi
+
+ IDX=1
+ LINES=$(echo "$O" | grep -E "^\+QCAINFO: \"(scc|SCC)\"")
+ for LINE in $LINES; do
+
+ T=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $5}')
+ T3=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $4}')
+ T4=""
+ case $T in
+ *"LTE BAND"*)
+ B=$(echo $T | sed 's/"LTE BAND \(.*\)"/\1/')
+ T2=$(band4g ${B})
+ case $T3 in
+ 6*) T4="1.4";;
+ 15*) T4="3";;
+ 25*) T4="5";;
+ 50*) T4="10";;
+ 75*) T4="15";;
+ 100*) T4="20";;
+ *) T4="";;
+ esac
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T5";;
+ 2) S2EARFCN="$T5";;
+ 3) S3EARFCN="$T5";;
+ 4) S4EARFCN="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $10}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 5)) "(S${IDX}) RSSI" "$T5 dBm"
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}' | xargs)
+# [ -n "$T5" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ ;;
+ *"NR5G BAND"*)
+ B=$(echo $T | sed 's/"NR5G BAND \(.*\)"/\1/')
+ T2=$(band5g ${B})
+ case $T3 in
+ 0) T4="5";;
+ 1) T4="10";;
+ 2) T4="15";;
+ 3) T4="20";;
+ 4) T4="25";;
+ 5) T4="30";;
+ 6) T4="40";;
+ 7) T4="50";;
+ 8) T4="60";;
+ 9) T4="70";;
+ 10) T4="80";;
+ 11) T4="90";;
+ 12) T4="100";;
+ 13) T4="200";;
+ 14) T4="400";;
+ *) T4="";;
+ esac
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}')
+ [ -n "$T5" ]
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1EARFCN="$T5";;
+ 2) S2EARFCN="$T5";;
+ 3) S3EARFCN="$T5";;
+ 4) S4EARFCN="$T5";;
+ *) ;;
+ esac
+ fi
+
+ if [ "x$MODE_NUM" = "x11" ]; then
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}' | xargs)
+ if [ -n "$T5" ] && [ "$T5" != "-" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $9}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ else
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $6}' | xargs)
+ if [ -n "$T5" ]; then
+ case $IDX in
+ 1) S1PCI="$T5";;
+ 2) S2PCI="$T5";;
+ 3) S3PCI="$T5";;
+ 4) S4PCI="$T5";;
+ *) ;;
+ esac
+ fi
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$T5 dBm"
+ T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $8}')
+# [ -n "$T5" ] && [ "$T5" != "-" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$T5 dB"
+ fi
+ ;;
+ esac
+ if [ -z "$T4" ]; then
+ case $IDX in
+ 1) S1BAND="$T2";;
+ 2) S2BAND="$T2";;
+ 3) S3BAND="$T2";;
+ 4) S4BAND="$T2";;
+ *) ;;
+ esac
+ else
+ case $IDX in
+ 1) S1BAND="$T2 @$T4 MHz";;
+ 2) S2BAND="$T2 @$T4 MHz";;
+ 3) S3BAND="$T2 @$T4 MHz";;
+ 4) S4BAND="$T2 @$T4 MHz";;
+ *) ;;
+ esac
+ fi
+
+ IDX=$((IDX + 1))
+ done
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,'| sed 's,LTE B,LTE | B,')
+
+if [ "${LAC_DEC}" = "0" ]; then
+ LAC_DEC="-"
+ LAC_HEX="-"
+fi
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+GMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+GMR "//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "//)
+MODEL="$MODELBCUT "$MODELACUT
+
+# Slot SIM
+O=$(sms_tool -d $DEVICE at "AT+QUIMSLOT?")
+T=$(echo "$O" | awk -F [:] '/^\+QUIMSLOT/{print $2}' | xargs)
+if [ -n "$T" ]; then
+ SSIM="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+GSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+QCCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+QCCID/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=0900' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c6026 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c6026
new file mode 100644
index 00000000..b64a1ee7
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2c7c6026
@@ -0,0 +1,116 @@
+# Quectel EC200T
+
+O=$(sms_tool -d $DEVICE at "at+qtemp")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QTEMP/ {print $2}' | sort -r | head -n1 | xargs)
+if [ -n "$T" ]; then
+ TEMP="$T °C"
+fi
+
+O=$(sms_tool -d $DEVICE at "at+qnwinfo;+qspn")
+
+T=$(echo "$O" | awk -F[,:] '/^\+QNWINFO/ {print $2"/"$4}' | xargs)
+if [ -n "$T" ]; then
+ if [ "x$MODE_NUM" = "x7" ]; then
+ B=$(echo $T | sed 's/.*LTE BAND \(.*\)/\1/')
+ MODE="LTE | $(band4g ${B})"
+ MAINCUT="$(band4g ${B})"
+ fi
+fi
+
+E=$(sms_tool -d $DEVICE at "at+qeng=\"servingcell\"")
+
+T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $4}' | xargs)
+if [ "x$T" = "xLTE" ] || [ "x$T" = "x4G" ]; then
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $14}')
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $12}')
+ case $T in
+ 0) T1="1.4";;
+ 1) T1="3";;
+ 2) T1="5";;
+ 3) T1="10";;
+ 4) T1="15";;
+ 5) T1="20";;
+ *) T1="?";;
+ esac
+ ULBW="UL: @$T1 MHz"
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $13}')
+ case $T in
+ 0) T1="1.4";;
+ 1) T1="3";;
+ 2) T1="5";;
+ 3) T1="10";;
+ 4) T1="15";;
+ 5) T1="20";;
+ *) T1="?";;
+ esac
+ DLBW="DL: @$T1 MHz"
+ PBAND="$MAINCUT $DLBW $ULBW"
+
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $9}')
+ PCI=$T
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $10}')
+ EARFCN=$T
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $17}')
+ RSSI=$T
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $15}')
+ RSRP=$T
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $16}')
+ RSRQ=$T
+ T=$(echo "$E" | awk -F[,:] '/^\+QENG:/ {print $18}')
+ SINR=$T
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+QSPN/ {print $2}' | xargs)
+if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
+ COPS="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O" | sed 's/AT+GSN//g' | xargs)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed 's/AT+CIMI//g' | xargs)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+QCCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+QCCID/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+GMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+GMR"//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM"//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI"//)
+MODEL="$MODELBCUT "$MODELACUT
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices)
+PVCUT=$(echo $PV | awk -F 'Vendor=2c7c ProdID=6026' '{print $2}' | cut -c-1220)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cb70104 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cb70104
new file mode 100644
index 00000000..65a24f4f
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cb70104
@@ -0,0 +1,205 @@
+# Fibocom FM150-AE
+
+O=$(sms_tool -d $DEVICE at "at+gtccinfo?;+gtcainfo?")
+
+if [ "x$MODE" = "xLTE" ]; then
+ if [[ "$O" == *"SCC"* ]]; then
+ MODE="LTE_A"
+ fi
+ T1=$(echo "$O" | grep -A 3 'LTE service cell' | grep '1,4,'${COPS_MCC}','${COPS_MNC}',')
+ if [ -n "$T1" ]; then
+ T=$(echo "$T1" | awk -F, '{print $5}')
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $8}')
+ if [ -n "$T" ]; then
+ PCI=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $7}')
+ if [ -n "$T" ]; then
+ EARFCN=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $11}')
+ if [ -n "$T" ]; then
+ if [ $T -ge -100 ] || [ $T -le 100 ]; then
+ T=$(echo "$T" | awk -F, '{printf "%0.1f", $T/2}')
+ fi
+ fi
+ T=$(echo "$T1" | awk -F, '{print $13}')
+ if [ -n "$T" ]; then
+ RSRP=$((T - 141))
+ fi
+ T=$(echo "$T1" | awk -F, '{print $14}')
+ if [ -n "$T" ]; then
+ T2=$(echo "$T" | awk '{printf "%0.1f", ($1-34)/2-3 }')
+ RSRQ=$T2
+ fi
+ T=$(echo "$T1" | awk -F, '{print $11}')
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ T2=$(echo "$T" | awk '{printf "%0.1f", $1/4+5 }')
+ SINR=$T2
+ fi
+ T=$(echo "$T1" | awk -F, '{print $14}')
+ if [ -n "$T" ]; then
+ [ -n "$ADDON" ] && ADDON="$ADDON,"
+ T2=$(echo "$T" | awk '{printf "%0.1f", $1-110 }')
+ RSSI=$T2
+ fi
+
+ T=$(echo "$T1" | awk -F, '{print $9}')
+ if [ -n "$T" ]; then
+ T=$((T - 100))
+
+ case $T in
+ *"1") MODE="$MODE | "$(band4g 1 "");;
+ *"2") MODE="$MODE | "$(band4g 2 "");;
+ *"3") MODE="$MODE | "$(band4g 3 "");;
+ *"5") MODE="$MODE | "$(band4g 5 "");;
+ *"7") MODE="$MODE | "$(band4g 7 "");;
+ *"8") MODE="$MODE | "$(band4g 8 "");;
+ *"18") MODE="$MODE | "$(band4g 18 "");;
+ *"19") MODE="$MODE | "$(band4g 19 "");;
+ *"20") MODE="$MODE | "$(band4g 20 "");;
+ *"28") MODE="$MODE | "$(band4g 28 "");;
+ *"32") MODE="$MODE | "$(band4g 32 "");;
+ *"34") MODE="$MODE | "$(band4g 34 "");;
+ *"38") MODE="$MODE | "$(band4g 38 "");;
+ *"39") MODE="$MODE | "$(band4g 39 "");;
+ *"40") MODE="$MODE | "$(band4g 40 "");;
+ *"41") MODE="$MODE | "$(band4g 41 "");;
+ *"42") MODE="$MODE | "$(band4g 42 "");;
+ *"43") MODE="$MODE | "$(band4g 43 "");;
+ *) MODE="$MODE / B${T}";;
+ esac
+ PBAND="$(band4g $T "")"
+ fi
+
+ fi
+
+ T=$(echo "$O" | awk -F[:,] '/^PCC/{print $3}')
+ if [ -n "$T" ]; then
+ PCI=$T
+ fi
+ T=$(echo "$O" | awk -F[:,] '/^PCC/{print $4}')
+ if [ -n "$T" ]; then
+ EARFCN=$T
+ fi
+
+IFS="
+"
+
+ IDX=1
+ LINES=$(echo "$O" | grep -E "^SCC[0-9]: ")
+ for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC'$IDX': 1,0/{print $4}')
+ T=$((T - 100))
+
+ case $T in
+ "1") T2=$(band4g 1 "");;
+ "2") T2=$(band4g 2 "");;
+ "3") T2=$(band4g 3 "");;
+ "5") T2=$(band4g 5 "");;
+ "7") T2=$(band4g 7 "");;
+ "8") T2=$(band4g 8 "");;
+ "18") T2=$(band4g 18 "");;
+ "19") T2=$(band4g 19 "");;
+ "20") T2=$(band4g 20 "");;
+ "28") T2=$(band4g 28 "");;
+ "32") T2=$(band4g 32 "");;
+ "34") T2=$(band4g 34 "");;
+ "38") T2=$(band4g 38 "");;
+ "39") T2=$(band4g 39 "");;
+ "40") T2=$(band4g 40 "");;
+ "41") T2=$(band4g 41 "");;
+ "42") T2=$(band4g 42 "");;
+ "43") T2=$(band4g 43 "");;
+ *) T2="B${T}";;
+ esac
+ MODE="$MODE / $T2"
+
+ if [ -n "$T" ]; then
+
+ case $IDX in
+ "1") S1BAND="$T2";;
+ "2") S2BAND="$T2";;
+ "3") S3BAND="$T2";;
+ "4") S4BAND="$T2";;
+ *);;
+ esac
+
+ case $IDX in
+ "1") S1PCI="$T";;
+ "2") S2PCI="$T";;
+ "3") S3PCI="$T";;
+ "4") S4PCI="$T";;
+ *);;
+ esac
+
+ fi
+
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC'$IDX': 1,0/{print $6}')
+ if [ -n "$T" ]; then
+
+ case $IDX in
+ "1") S1EARFCN="$T";;
+ "2") S2EARFCN="$T";;
+ "3") S3EARFCN="$T";;
+ "4") S4EARFCN="$T";;
+ *);;
+ esac
+
+ fi
+ IDX=$((IDX + 1))
+ done
+
+fi
+
+MODE=$(echo $MODE | sed "s/LTE_A /LTE-A /g" | sed 's,/,+,')
+
+# Modem
+OA=$(sms_tool -d $DEVICE at "AT+CGMM?")
+MODELA=$(echo "$OA" | awk -F [:,] '/\+CGMM/{print $2}' | xargs)
+OB=$(sms_tool -d $DEVICE at "AT+CGMI?")
+MODELB=$(echo "$OB" | awk -F [:,] '/\+CGMI/{print $2}' | xargs)
+MODELBCUT=$(echo $MODELB | sed s/"Wireless Inc."//)
+MODEL="$MODELBCUT $MODELA"
+
+OF=$(sms_tool -d $DEVICE at "AT+GMR?")
+FW=$(echo "$OF" | awk -F[,:] '/\+GMR:/ {print $2}' | xargs)
+
+# International Mobile Equipment Identity (IMEI)
+OAA=$(sms_tool -d $DEVICE at "AT+CGSN?")
+NR_IMEI=$(echo "$OAA" | awk -F[,:] '/\+CGSN:/ {print $2}' | xargs)
+
+# International Mobile Subscriber Identity (IMSI)
+OBB=$(sms_tool -d $DEVICE at "AT+CIMI?")
+NR_IMSI=$(echo "$OBB" | awk -F [,:] '/\+CIMI:/ {print $2}' | xargs)
+
+# Integrated Circuit Card Identifier (ICCID)
+OCC=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_ICCID=$(echo "$OCC" | awk -F [,:] '/\+ICCID:/ {print $2}' | xargs)
+
+# Temp
+OT=$(sms_tool -d $DEVICE at "AT+MTSM=1")
+TX=$(echo "$OT" | awk '/\+MTSM:/{print $2}')
+if [ -n "$TX" ]; then
+ TEMP="$TX °C"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2cb7 ProdID=0104' '{print $2}' | cut -c-1290)
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cb70105 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cb70105
new file mode 100644
index 00000000..eda3685e
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cb70105
@@ -0,0 +1,176 @@
+# Fibocom modems with ProdID=0105
+# NL952-EAU in ECM mode (LTE CAT18)
+
+O=$(sms_tool -d $DEVICE at "AT+GTCCINFO?;+GTCAINFO?")
+
+if [ "x$MODE" = "xLTE" ]; then
+ if [[ "$O" == *"SCC"* ]]; then
+ MODE="LTE_A"
+ fi
+ T1=$(echo "$O" | grep -A 3 'LTE service cell' | grep '1,4,'${COPS_MCC}','${COPS_MNC}',')
+ if [ -n "$T1" ]; then
+ T=$(echo "$T1" | awk -F, '{print $5}')
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+ LAC_DEC=""
+ LAC_HEX=""
+ fi
+ T=$(echo "$T1" | awk -F, '{print $7}')
+ if [ -n "$T" ]; then
+ EARFCN=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $8}')
+ if [ -n "$T" ]; then
+ PCI=$T
+ fi
+ T=$(echo "$T1" | awk -F, '{print $9}')
+ if [ -n "$T" ]; then
+ T=$((T - 100))
+ MODE="$MODE | $(band4g $T)"
+ PBAND="$(band4g $T "")"
+ fi
+ T=$(echo "$T1" | awk -F, '{print $11}')
+ if [ -n "$T" ]; then
+ T2=$(echo "$T" | awk '{printf "%0.1f", $1/2 }')
+ SINR=$T2
+ fi
+ T=$(echo "$T1" | awk -F, '{print $13}')
+ if [ -n "$T" ]; then
+ RSRP=$((T - 141))
+ fi
+ T=$(echo "$T1" | awk -F, '{print $14}')
+ if [ -n "$T" ]; then
+ T2=$(echo "$T" | awk '{printf "%0.1f", ($1-34)/2-3 }')
+ RSRQ=$T2
+ fi
+
+ if [ -n "$CSQ" ]; then
+ RSSI=$((2 * $CSQ -113))
+ fi
+
+
+ fi
+
+ T=$(echo "$O" | awk -F[:,] '/^PCC/{print $3}')
+ if [ -n "$T" ]; then
+ PCI=$T
+ fi
+ T=$(echo "$O" | awk -F[:,] '/^PCC/{print $4}')
+ if [ -n "$T" ]; then
+ EARFCN=$T
+ fi
+
+IFS="
+"
+
+ IDX=1
+ LINES=$(echo "$O" | grep -E "^SCC[0-9]: 2")
+ for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC'$IDX': 2,./{print $4}')
+ T=$((T - 100))
+
+ T2=$(band4g $T)
+ MODE="$MODE / $T2"
+
+ if [ -n "$T" ]; then
+
+ case $IDX in
+ "1") S1BAND="$T2";;
+ "2") S2BAND="$T2";;
+ "3") S3BAND="$T2";;
+ "4") S4BAND="$T2";;
+ *);;
+ esac
+
+ case $IDX in
+ "1") S1PCI="$T";;
+ "2") S2PCI="$T";;
+ "3") S3PCI="$T";;
+ "4") S4PCI="$T";;
+ *);;
+ esac
+
+ fi
+
+ T=$(echo "$LINE" | awk -F[:,] '/^SCC'$IDX': 2,./{print $6}')
+ if [ -n "$T" ]; then
+
+ case $IDX in
+ "1") S1EARFCN="$T";;
+ "2") S2EARFCN="$T";;
+ "3") S3EARFCN="$T";;
+ "4") S4EARFCN="$T";;
+ *);;
+ esac
+
+ fi
+ IDX=$((IDX + 1))
+ done
+
+fi
+
+MODE=$(echo $MODE | sed "s/LTE_A /LTE-A /g" | sed 's,/,+,')
+
+# Modem
+OA=$(sms_tool -d $DEVICE at "AT+CGMM?")
+MODELA=$(echo "$OA" | awk -F [:,] '/\+CGMM/{print $2}' | xargs)
+OB=$(sms_tool -d $DEVICE at "AT+CGMI?")
+MODELB=$(echo "$OB" | awk -F [:,] '/\+CGMI/{print $2}' | xargs)
+MODELBCUT=$(echo $MODELB | sed s/"Wireless Inc."//)
+MODEL="$MODELBCUT $MODELA"
+
+OF=$(sms_tool -d $DEVICE at "AT+GMR?")
+FW=$(echo "$OF" | awk -F[,:] '/\+GMR:/ {print $2}' | xargs)
+
+# International Mobile Equipment Identity (IMEI)
+OAA=$(sms_tool -d $DEVICE at "AT+CGSN?")
+NR_IMEI=$(echo "$OAA" | awk -F[,:] '/\+CGSN:/ {print $2}' | xargs)
+
+# International Mobile Subscriber Identity (IMSI)
+OBB=$(sms_tool -d $DEVICE at "AT+CIMI?")
+NR_IMSI=$(echo "$OBB" | awk -F [,:] '/\+CIMI:/ {print $2}' | xargs)
+
+# Integrated Circuit Card Identifier (ICCID)
+OCC=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_ICCID=$(echo "$OCC" | awk -F [,:] '/\+ICCID:/ {print $2}' | xargs)
+
+# Temp
+OT=$(sms_tool -d $DEVICE at "AT+MTSM=1")
+TM=$(echo "$OT" | awk '/\+MTSM:/{print $2}')
+if [ -n "$TM" ]; then
+ TEMP="$TM °C"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+
+TTY=$(basename $DEVICE)
+devpath=$(readlink -f /sys/class/tty/$TTY/device)
+BASE=$(readlink -f ${devpath%/*/*})
+
+NETIF=$(for a in /sys/class/net/*; do readlink -f $a; done | grep "$BASE")
+NETDRV=$(basename $(readlink -f $NETIF/../../driver))
+
+case $NETDRV in
+ "qmi_wwan")
+ PROTO="QMI";;
+ "cdc_mbim")
+ PROTO="MBIM";;
+ "cdc_ether")
+ PROTO="ECM";;
+esac
+
+
+#PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+#PVCUT=$(echo $PV | awk -F 'Vendor=2cb7 ProdID=0105' '{print $2}' | cut -c-1290)
+#if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+#then
+# PROTO="qmi"
+#elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+#then
+# PROTO="mbim"
+#elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+#then
+# PROTO="ecm"
+#fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cd20001 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cd20001
new file mode 100644
index 00000000..8d402d4b
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cd20001
@@ -0,0 +1,88 @@
+# Mikrotik R11e-LTE6
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "at+cesq;+zcainfo?;+zpas?;+zcellinfo?")
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ [ "$T" != "99" ] && RSSI="$((T - 111))"
+fi
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $4}' | xargs)
+#if [ -n "$T" ]; then
+# [ "$T" != "255" ] && addon 35 "RSCP" "$((T - 121)) dBm"
+#fi
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $5}' | xargs)
+#if [ -n "$T" ]; then
+# if [ "$T" != "255" ]; then
+# T=$(echo "$T" | awk '{printf "%.1f", -1 * (24.5 - $1 * 0.5)}')
+# addon 36 "ECIO" "$T dB"
+# fi
+#fi
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $7}' | xargs)
+if [ -n "$T" ]; then
+ [ "$T" != "255" ] && RSRP="$((T - 141))"
+fi
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $6}' | xargs)
+if [ -n "$T" ]; then
+ if [ "$T" != "255" ]; then
+ T=$(echo "$T" | awk '{printf "%.1f", -1 * (20 - $1 * 0.5)}')
+ RSRQ="$T"
+ fi
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+ZPAS/ {print $2}' | xargs)
+[ -n "$T" ] && MODE=$T
+
+case "$MODE_NUM" in
+ 7*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ MODE="$MODE $(band4g ${T/LTE B/})"
+ PBAND="$(band4g ${T/LTE B/})"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $3}' | xargs)
+ PCI="$T"
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $5}' | xargs)
+ EARFCN="$T"
+ ;;
+ 9*)
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ MODE="$MODE $(band4g ${T/LTE B/})"
+ if [ -n "$T" ] && [ "$T" != "0" ]; then
+ PBAND="$(band4g ${T/LTE B/})"
+ fi
+
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO: /{print $6}')
+ if [ -n "$T" ] && [ "$T" != "0" ]; then
+ DBW="$T MHz"
+ PBAND="$PBAND @$DBW"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO: /{print $2}' | xargs)
+ if [ -n "$T" ] && [ "$T" != "0" ]; then
+ PCI="$T"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCAINFO: /{print $5}')
+ if [ -n "$T" ] && [ "$T" != "0" ]; then
+ EARFCN="$T"
+ fi
+
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO: /{print $13}')
+ if [ -n "$T" ] && [ "$T" != "0" ]; then
+ MODE="$MODE / $(band4g ${T})"
+ S1BAND="$(band4g ${T})"
+ fi
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO: /{print $15}')
+ if [ -n "$T" ] && [ "$T" != "0" ]; then
+ S1DBW="$T MHz"
+ S1BAND="$S1BAND @$S1DBW"
+ fi
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO: /{print $11}')
+ if [ -n "$T" ] && [ "$T" != "0" ]; then
+ S1PCI="$T"
+ fi
+ T=$(echo "$O" | awk -F[,:\;] '/^\+ZCAINFO: /{print $14}')
+ if [ -n "$T" ] && [ "$T" != "0" ]; then
+ S1EARFCN="$T"
+ fi
+ ;;
+esac
+
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cd20004 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cd20004
new file mode 100644
index 00000000..fb36d61e
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/2cd20004
@@ -0,0 +1,101 @@
+# Mikrotik R11e-LTE6
+
+O=$(sms_tool -d $DEVICE at "at+cesq;+zcainfo?;+zpas?;+zcellinfo?")
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ [ "$T" != "99" ] && RSSI="$((T - 111))"
+fi
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $4}' | xargs)
+if [ -n "$T" ]; then
+ [ "$T" != "255" ] && RSCP="$((T - 121))"
+fi
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $5}' | xargs)
+if [ -n "$T" ]; then
+ if [ "$T" != "255" ]; then
+ T=$(echo "$T" | awk '{printf "%.1f", -1 * (24.5 - $1 * 0.5)}')
+ ECIO="$T dB"
+ fi
+fi
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $7}' | xargs)
+if [ -n "$T" ]; then
+ [ "$T" != "255" ] && RSRP="$((T - 141))"
+fi
+T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $6}' | xargs)
+if [ -n "$T" ]; then
+ if [ "$T" != "255" ]; then
+ T=$(echo "$T" | awk '{printf "%.1f", -1 * (20 - $1 * 0.5)}')
+ RSRQ="$T"
+ SINR=""
+ fi
+fi
+
+T=$(echo "$O" | awk -F[,:] '/^\+ZPAS/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ MODE=$T
+ T=$(echo "$O" | awk -F[,:] '/^\+ZCELLINFO/ {print $4}' | xargs)
+ if [ "x$MODE_NUM" = "x7" ] || [ "x$MODE_NUM" = "x9" ]; then
+ MODE="$MODE $(band4g ${T/LTE B/})"
+ PBAND="$(band4g ${T/LTE B/})"
+ else
+ MODE="$MODE $T"
+ PBAND="$(band4g ${T})"
+ fi
+fi
+
+case "$MODE_NUM" in
+ 9*)
+ T=$(echo "$O" | awk -F[,] '/^\+ZCAINFO: /{print $11}')
+ if [ -n "$T" ]; then
+ if [ "$T" != "0" ]; then
+ MODE="$MODE / $(band4g ${T})"
+ S1BAND="$(band4g ${T})"
+ fi
+ fi
+ ;;
+esac
+
+MODE=$(echo $MODE | sed 's,/,+,' | sed "s/LTE_A/LTE-A | /g")
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR" | xargs)
+FW=$(echo $FWA | sed s/"AT+CGMR"//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | xargs)
+MODELACUT=$(echo $MODELA | awk -F [:] '/^\+CGMM:/{print $2}' | xargs)
+MODELBCUT=$(echo $MODELB | awk -F [:] '/^\+CGMI:/{print $2}' | xargs)
+MODEL="$MODELBCUT "$MODELACUT
+
+# LAC & TAC
+T_HEX=$LAC_HEX
+T_DEC=$LAC_DEC
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN"//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI"//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT*ICCID?")
+NR_D=$(echo "$O" | awk -F [:] '/^\*ICCID:/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=2cd2 ProdID=0004' '{print $2}' | cut -c-1220)
+if echo "$PVCUT" | grep -q "Driver=rndis_host"
+then
+ PROTO="ncm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/413c81b6 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/413c81b6
new file mode 100644
index 00000000..8e4c2417
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/413c81b6
@@ -0,0 +1,103 @@
+# DW5809e Dell Wireless 5809e Gobi 4G LTE Mobile Broadband Card (EM7305)
+# DW5811e Snapdragon X7 LTE (EM7455B)
+# Sierra Wireless EM7455
+
+O=$(sms_tool -d $DEVICE at "at!gstatus?")
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk '/.*TAC:/ {print $5}')
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX="$T"
+ fi
+
+ T=$(echo "$O" | awk '/^PCC.*RSSI/ {print $4}' | xargs)
+ [ -n "$T" ] && RSSI="$(echo "${T// //}" | sed 's,/.*,,')"
+ T=$(echo "$O" | awk '/^PCC.*RSRP/ {print $7}' | xargs)
+ [ -n "$T" ] && RSRP="$(echo "${T// //}" | sed 's,/.*,,')"
+ T=$(echo "$O" | awk '/^RSRQ/ {print $3}')
+ [ -n "$T" ] && RSRQ="$T"
+ T=$(echo "$O" | awk '/^SINR/ {print $3}')
+ [ -n "$T" ] && SINR="$T"
+
+ T=$(echo "$O" | awk '/^LTE band:/ {print $3}')
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE band:/ {print $6}')
+ PBAND="$(band4g ${T/B/}) @${T1} MHz"
+ MODE="$MODE $(band4g ${T/B/})"
+ fi
+
+ T=$(echo "$O" | awk -F: '/^LTE CA state:.*ACTIVE/ {print $3}')
+ if [ -n "$T" ]; then
+ T1=$(echo "$O" | awk '/^LTE Scell bw:/ {print $3}')
+ if [ -n "$T1" ]; then
+ S1BAND="$(band4g ${T/B/}) @${T1#bw:} MHz"
+ else
+ S1BAND="$(band4g ${T/B/})"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $(band4g ${T/B/})"
+
+ T=$(echo "$O" | awk '/.*LTE Scell chan:/ {print $7}')
+ [ -n "$T" ] && EARFCN="${T#chan:}"
+
+ T=$(echo "$O" | awk '/^SCC.*RSSI/ {print $4}' | xargs)
+ [ -n "$T" ] && RSSI=$(echo "${T// //}" | sed 's,/.*,,')
+ T=$(echo "$O" | awk '/^SCC.*RSRP/ {print $7}' | xargs)
+ [ -n "$T" ] && RSRP=$(echo "${T// //}" | sed 's,/.*,,')
+ fi
+fi
+
+T=$(echo "$O" | awk -F: '/Temperature:/ {print $3}' | xargs)
+if [ -n "$T" ]; then
+ TEMP="$T °C"
+fi
+
+MODE=$(echo $MODE | sed "s/LTE_A/LTE-A |/g" | sed 's,/,+,')
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+CGMR" | tr -s "\n" | xargs)
+FW=$(echo $FWA | sed s/"AT+CGMR "//)
+
+MODELA=$(sms_tool -d $DEVICE at "AT+CGMM" | tr -s "\n" | xargs)
+MODELB=$(sms_tool -d $DEVICE at "AT+CGMI" | tr -s "\n" | xargs)
+
+MODELACUT=$(echo $MODELA | sed s/"AT+CGMM "//)
+MODELBCUT=$(echo $MODELB | sed s/"AT+CGMI "// | cut -f1 -d",")
+MODEL="$MODELBCUT "$MODELACUT
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID")
+NR_D=$(echo "$O" | awk -F[,:] '/^ICCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCUT=$(echo $PV | awk -F 'Vendor=413c ProdID=81b6' '{print $2}' | cut -c-1290)
+
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/413c81d7 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/413c81d7
new file mode 100644
index 00000000..2828b6e6
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/413c81d7
@@ -0,0 +1,221 @@
+# DW5821e Snapdragon X20 LTE
+
+
+O=$(sms_tool -d $DEVICE at "at+temp")
+
+T=$(echo "$O" | awk -F: '/xo_therm_buf:/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ TEMP="$T °C"
+else
+ O=$(sms_tool -d $DEVICE at "at^temp?")
+ T=$(echo "$O" | awk '{gsub("C","");print $2}' | sort -r | head -n 1)
+ [ -n "$T" ] && TEMP="$T °C"
+fi
+
+O=$(sms_tool -d $DEVICE at "at^ca_info?;^debug?")
+
+O1=$(echo "$O" | sed -n '/^RAT:/,/^SCell1:/p')
+[ -z "$O1" ] && O1=$(echo "$O" | sed -n '/^EARFCN/,/^SCell1:/p')
+
+T=$(echo "$O1" | awk '/TAC:/ {print $2}')
+if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ T_HEX=$T
+fi
+
+T=$(echo "$O" | awk '/^RSSI:/ {print $2}' | sed 's/dBm//')
+[ -n "$T" ] && RSSI=$T
+T=$(echo "$O" | awk '/^RSRP:/ {print $2}' | sed 's/dBm//')
+[ -n "$T" ] && RSRP=$T
+T=$(echo "$O" | awk '/^RSRQ:/ {print $2}' | sed 's/dB//')
+[ -n "$T" ] && RSRQ=$T
+T=$(echo "$O" | awk '/^RS-SINR/ {print $2}' | sed 's/dB//')
+[ -n "$T" ] && SINR=$T
+T=$(echo "$O" | awk '/^RS-SNR/ {print $2}' | sed 's/dB//')
+[ -n "$T" ] && SINR=$T
+# SNR > SINR
+
+T=$(echo "$O1" | awk '/^BAND:/ {print $2}')
+if [ -n "$T" ]; then
+ B=$(band4g $T)
+ PBAND="$B"
+ MODE="$MODE $B"
+fi
+T=$(echo "$O1" | awk '/^BW:/ {print $2}')
+[ -n "$T" ] && PBAND="$PBAND @$T MHz"
+T=$(echo "$O1" | awk -F[\(\)] '/^eNB ID\(PCI\)/ {print $4}')
+[ -n "$T" ] && PCI="$T"
+T=$(echo "$O1" | awk '/^EARFCN/ {print $2}' | xargs)
+if [ -n "$T" ]; then
+ EARFCN="$(echo $T | cut -f1 -d/)"
+# addon 34 "EARFCN DL" "$(echo $T | cut -f1 -d/)"
+# addon 34 "EARFCN UL" "$(echo $T | cut -f2 -d/)"
+fi
+
+T=$(echo "$O" | awk '/^SCC1 info:/ {print $5}')
+if [ -n "$T" ]; then
+ T=${T/,/}
+ T=${T/LTE_B/}
+ S1BAND="$(band4g $T)"
+ MODE="${MODE/LTE/LTE_A} / $(band4g $T)"
+ T=$(echo "$O" | awk '/^SCC1 info:/ {print $8}')
+ [ -n "$T" ] && S1BAND="$S1BAND @$T MHz"
+
+ O1=$(echo "$O" | sed -n '/^SCell1:/,/^SCell2:/p')
+ T=$(echo "$O1" | awk -F [:,\ ] '/^EARFCN/{print $2}')
+ [ -n "$T" ] && S1EARFCN="$T"
+ T=$(echo "$O1" | awk -F [:,\ ] '/^EARFCN/{print $4}' | xargs)
+ [ -n "$T" ] && S1PCI="$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSRP/{print $2}' | sed 's/dBm//')
+# [ -n "$T" ] && addon 56 "(S1) RSRP" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSRP/{print $4}' | xargs | sed 's/dB//')
+# [ -n "$T" ] && addon 57 "(S1) RSRQ" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSSI/{print $2}' | sed 's/dBm//')
+# [ -n "$T" ] && addon 55 "(S1) RSSI" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSSI/{print $4}' | xargs | sed 's/dB//')
+# [ -n "$T" ] && addon 58 "(S1) SNR" "$T"
+fi
+
+T=$(echo "$O" | awk '/^SCC2 info:/ {print $5}')
+if [ -n "$T" ]; then
+ T=${T/,/}
+ T=${T/LTE_B/}
+ S2BAND="$(band4g $T)"
+ MODE="${MODE} / $(band4g $T)"
+ T=$(echo "$O" | awk '/^SCC2 info:/ {print $8}')
+ [ -n "$T" ] && S2BAND="$S2BAND @$T MHz"
+
+ O1=$(echo "$O" | sed -n '/^SCell2:/,/^SCell3:/p')
+ T=$(echo "$O1" | awk -F [:,\ ] '/^EARFCN/{print $2}')
+ [ -n "$T" ] && S2EARFCN="$T"
+ T=$(echo "$O1" | awk -F [:,\ ] '/^EARFCN/{print $4}' | xargs)
+ [ -n "$T" ] && S2PCI="$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSRP/{print $2}' | sed 's/dBm/ dBm/')
+# [ -n "$T" ] && addon 66 "(S2) RSRP" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSRP/{print $4}' | xargs | sed 's/dB/ dB/')
+# [ -n "$T" ] && addon 67 "(S2) RSRQ" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSSI/{print $2}' | sed 's/dBm/ dBm/')
+# [ -n "$T" ] && addon 65 "(S2) RSSI" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSSI/{print $4}' | xargs | sed 's/dB/ dB/')
+# [ -n "$T" ] && addon 68 "(S2) SNR" "$T"
+fi
+
+T=$(echo "$O" | awk '/^SCC3 info:/ {print $5}')
+if [ -n "$T" ]; then
+ T=${T/,/}
+ T=${T/LTE_B/}
+ S3BAND="$(band4g $T)"
+ MODE="${MODE} / $(band4g $T)"
+ T=$(echo "$O" | awk '/^SCC3 info:/ {print $8}')
+ [ -n "$T" ] && S3BAND="$S3BAND @$T MHz"
+
+ O1=$(echo "$O" | sed -n '/^SCell3:/,/^SCell4:/p')
+ T=$(echo "$O1" | awk -F [:,\ ] '/^EARFCN/{print $2}')
+ [ -n "$T" ] && S3EARFCN="$T"
+ T=$(echo "$O1" | awk -F [:,\ ] '/^EARFCN/{print $4}' | xargs)
+ [ -n "$T" ] && S3PCI="$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSRP/{print $2}' | sed 's/dBm/ dBm/')
+# [ -n "$T" ] && addon 66 "(S3) RSRP" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSRP/{print $4}' | xargs | sed 's/dB/ dB/')
+# [ -n "$T" ] && addon 67 "(S3) RSRQ" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSSI/{print $2}' | sed 's/dBm/ dBm/')
+# [ -n "$T" ] && addon 65 "(S3) RSSI" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSSI/{print $4}' | xargs | sed 's/dB/ dB/')
+# [ -n "$T" ] && addon 68 "(S3) SNR" "$T"
+fi
+
+T=$(echo "$O" | awk '/^SCC4 info:/ {print $5}')
+if [ -n "$T" ]; then
+ T=${T/,/}
+ T=${T/LTE_B/}
+ S4BAND="$(band4g $T)"
+ MODE="${MODE} / $(band4g $T)"
+ T=$(echo "$O" | awk '/^SCC4 info:/ {print $8}')
+ [ -n "$T" ] && S4BAND="$S4BAND @$T MHz"
+
+ O1=$(echo "$O" | sed -n '/^SCell4:/,/^SCell5:/p')
+ T=$(echo "$O1" | awk -F [:,\ ] '/^EARFCN/{print $2}')
+ [ -n "$T" ] && S4EARFCN="$T"
+ T=$(echo "$O1" | awk -F [:,\ ] '/^EARFCN/{print $4}' | xargs)
+ [ -n "$T" ] && S4PCI="$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSRP/{print $2}' | sed 's/dBm/ dBm/')
+# [ -n "$T" ] && addon 66 "(S4) RSRP" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSRP/{print $4}' | xargs | sed 's/dB/ dB/')
+# [ -n "$T" ] && addon 67 "(S4) RSRQ" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSSI/{print $2}' | sed 's/dBm/ dBm/')
+# [ -n "$T" ] && addon 65 "(S4) RSSI" "$T"
+ T=$(echo "$O1" | awk -F [:,] '/^RSSI/{print $4}' | xargs | sed 's/dB/ dB/')
+# [ -n "$T" ] && addon 68 "(S4) SNR" "$T"
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,' | sed 's,LTE_A,LTE-A | ,' | sed 's,LTE B,LTE | B,')
+
+# Cell ID & LAC & TAC
+LAC_HEX=$(printf "%X" $LAC_DEC)
+if [ -n "$LAC_DEC" ]; then
+ TAC_HEX=$LAC_HEX
+fi
+CID_HEX=$(printf "%X" $CID_DEC)
+
+if [ -z "$TAC_DEC" ]
+then
+ [ -n "$TAC_HEX" ] && TAC_DEC=$(echo $((0x$TAC_HEX)))
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices)
+PVCUT=$(echo $PV | awk -F 'Vendor=413c ProdID=81d7' '{print $2}' | cut -c-1520)
+
+if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
+then
+ PROTO="qmi"
+elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
+then
+ PROTO="mbim"
+elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
+then
+ PROTO="ecm"
+fi
+
+# Modem
+PVMODEL=$(echo $PV | awk -F 'Vendor=413c ProdID=81d7' '{print $2}' | cut -c-150)
+if [ -z "$MODEL" ]
+then
+ MODELBCUT=$(echo $PVMODEL | awk -F 'Manufacturer=|S: Product=' '{print $2}' | sed s/"Inc. "// | xargs)
+ MODELACUT=$(echo $PVMODEL | awk -F 'Product=| S: SerialNumber' '{print $2}'| xargs)
+ MODEL="$MODELBCUT "$MODELACUT
+# MODELC="$MODELBCUT "$MODELACUT
+# MODEL=$(echo "$MODELC" | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}' | tr -d '\r\n')
+fi
+
+# FW
+OF=$(sms_tool -d $DEVICE at "ati")
+DEV2=$(echo $OF | tr -s "\n" | xargs)
+FW=$(echo $DEV2 | awk -F 'Revision: | IMEI: ' '{print $2}' | cut -c-50)
+
+T=$(echo "$O" | awk -F ': ' '/ICCID:/ {print $2}')
+if [ -n "$T" ]; then
+ NR_ICCID="$T"
+fi
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+GSN" | xargs)
+NR_I=$(echo "$O")
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O")
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+ICCID" | xargs)
+NR_D=$(echo "$O" | awk -F [:] '/^\ICCID:/{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/808707f9 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/808707f9
new file mode 100644
index 00000000..56533af3
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/808707f9
@@ -0,0 +1,482 @@
+# Fibocom L860
+
+bandwidth() {
+ case $1 in
+ 0) echo "1.4";;
+ 1) echo "3";;
+ 2) echo "5";;
+ 3) echo "10";;
+ 4) echo "15";;
+ 5) echo "20";;
+ *) echo "";;
+ esac
+}
+
+channeltoband()
+{
+ if [ $1 -ge 0 ] && [ $1 -le 599 ]; then
+ echo "1"
+ elif [ $1 -ge 600 ] && [ $1 -le 1199 ]; then
+ echo "2"
+ elif [ $1 -ge 1200 ] && [ $1 -le 1949 ]; then
+ echo "3"
+ elif [ $1 -ge 1950] && [ $1 -le 2399 ]; then
+ echo "4"
+ elif [ $1 -ge 2400] && [ $1 -le 2469 ]; then
+ echo "5"
+ elif [ $1 -ge 2750 ] && [ $1 -le 3449 ]; then
+ echo "7"
+ elif [ $1 -ge 3450 ] && [ $1 -le 3799 ]; then
+ echo "8"
+ elif [ $1 -ge 6150 ] && [ $1 -le 6449 ]; then
+ echo "20"
+ elif [ $1 -ge 9210 ] && [ $1 -le 9659 ]; then
+ echo "28"
+ elif [ $1 -ge 9870 ] && [ $1 -le 9919 ]; then
+ echo "31"
+ elif [ $1 -ge 37750 ] && [ $1 -le 38249 ]; then
+ echo "38"
+ elif [ $1 -ge 38650 ] && [ $1 -le 39649 ]; then
+ echo "40"
+ else
+ echo "0"
+ fi
+}
+
+
+O=$(sms_tool -d $DEVICE at "AT+MTSM=1")
+
+T=$(echo "$O" | awk -F: '/^\+MTSM:/ {print $2}' | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "AT+XLEC?;+XMCI=1;+XCCINFO=1;+XCCINFO?")
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+XCCINFO:/{print $11}' | xargs)
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ fi
+
+ PB=""
+ S1B=""
+ S2B=""
+ S3B=""
+ S4B=""
+ BWP=""
+ BWS1=""
+ BWS2=""
+ BWS3=""
+ BWS4=""
+
+ CELLS=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $3}')
+ case $CELLS in
+ "1")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$PB"
+ else
+ PBAND="$PB @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ ;;
+ "2")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ BWS1=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $6}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$(band4g ${T/BAND_LTE_/})"
+ else
+ PBAND="$(band4g ${T/BAND_LTE_/}) @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $7}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S1B=$(band4g $T)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ ;;
+ "3")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ BWS1=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $6}')
+ BWS2=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $7}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$(band4g ${T/BAND_LTE_/})"
+ else
+ PBAND="$(band4g ${T/BAND_LTE_/}) @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $8}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S1B=$(band4g $T)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $9}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S2B=$(band4g $T)
+ if [ -z "$BWS2" ]; then
+ S2BAND="$S2B"
+ else
+ S2BAND="$S2B @${BWS2} MHz"
+ fi
+ MODE="$MODE / $S2B"
+ fi
+ ;;
+ "4")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ BWS1=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $6}')
+ BWS2=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $7}')
+ BWS3=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $8}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$PB"
+ else
+ PBAND="$PB @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $9}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S1B=$(band4g $T)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $10}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S2B=$(band4g $T)
+ if [ -z "$BWS2" ]; then
+ S2BAND="$S2B"
+ else
+ S2BAND="$S2B @${BWS2} MHz"
+ fi
+ MODE="$MODE / $S2B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $11}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S3B=$(band4g $T)
+ if [ -z "$BWS3" ]; then
+ S3BAND="$S3B"
+ else
+ S3BAND="$S3B @${BWS3} MHz"
+ fi
+ MODE="$MODE / $S3B"
+ fi
+ ;;
+ "5")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ BWS1=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $6}')
+ BWS2=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $7}')
+ BWS3=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $8}')
+ BWS4=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $9}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$PB"
+ else
+ PBAND="$PB @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $10}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S1B=$(band4g $T)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $11}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S2B=$(band4g $T)
+ if [ -z "$BWS2" ]; then
+ S2BAND="S2B"
+ else
+ S2BAND="S2B @${BWS2} MHz"
+ fi
+ MODE="$MODE / $S2B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $12}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S3B=$(band4g $T)
+ if [ -z "$BWS3" ]; then
+ S3BAND="$S3B"
+ else
+ S3BAND="$S3B @${BWS3} MHz"
+ fi
+ MODE="$MODE / $S3B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $13}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S4B=$(band4g $T)
+ if [ -z "$BWS4" ]; then
+ S4BAND="$S4B"
+ else
+ S4BAND="$S4B @${BWS4} MHz"
+ fi
+ MODE="$MODE / $S4B"
+ fi
+ ;;
+ esac
+
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $7}' | xargs)
+ if [ -n "$T" ]; then
+ PCI="$(printf "%d" "$T")"
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $8}' | xargs)
+ if [ "$T" != "0xFFFFFFFF" ]; then
+ # EARFCN DL
+ EARFCN="$(printf "%d" "$T")"
+ if [ -z "$PB" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ PB=$(band4g $T1)
+ if [ -z "$BWP" ]; then
+ PBAND="$PB"
+ else
+ PBAND="$PB @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $9}' | xargs)
+# [ "$T" != "0xFFFFFFFF" ] && addon 34 "EARFCN UL" "$(printf "%d" "$T")"
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $11}')
+ if [ "$T" != "255" ]; then
+ RSRP="$((-141 + T))"
+ N=""
+ case $BWP in
+ "1.4") N=6;;
+ "3") N=15;;
+ "5") N=25;;
+ "10") N=50;;
+ "15") N=75;;
+ "20") N=100;;
+ esac
+ if [ -n "$N" ]; then
+ RSSI=$(echo "$((-141 + T)) $N" | awk '{printf "%d\n", $1 + 10*log(12*$2)/log(10)}')
+ if [ -n "$RSSI" ]; then
+ [ $RSSI -lt -113 ] && RSSI="-113"
+ [ $RSSI -gt -51 ] && RSSI="-51"
+ RSSI="$RSSI"
+ CSQ_PER=$(((RSSI + 113) * 100 / 62))
+ fi
+ fi
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $12}')
+ [ "$T" != "255" ] && RSRQ="$((-20 + T/2))"
+# T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $13}')
+# [ "$T" != "255" ] && addon 38 "SNR" "$T dB"
+ fi
+
+IFS="
+"
+
+ IDX=1
+ LINES=$(echo "$O" | grep "+XMCI: 5")
+ for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $7}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$(printf "%d" "$T")";;
+ 2) S2PCI="$(printf "%d" "$T")";;
+ 3) S3PCI="$(printf "%d" "$T")";;
+ 4) S4PCI="$(printf "%d" "$T")";;
+ *) ;;
+ esac
+ T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $8}' | xargs)
+ if [ "$T" != "0xFFFFFFFF" ]; then
+ # EARFCN DL
+ case $IDX in
+ 1) S1EARFCN="$(printf "%d" "$T")";;
+ 2) S2EARFCN="$(printf "%d" "$T")";;
+ 3) S3EARFCN="$(printf "%d" "$T")";;
+ 4) S4EARFCN="$(printf "%d" "$T")";;
+ *) ;;
+ esac
+ case $IDX in
+ 1)
+ if [ -z "$S1B" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ S1B=$(band4g $T1)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ ;;
+ 2)
+ if [ -z "$S2B" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ S2B=$(band4g $T1)
+ if [ -z "$BWS2" ]; then
+ S2BAND="$S2B"
+ else
+ S2BAND="$S2B @${BWS2} MHz"
+ fi
+ MODE="$MODE / $S2B"
+ fi
+ ;;
+ 3)
+ if [ -z "$S3B" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ S3B=$(band4g $T1)
+ if [ -z "$BWS3" ]; then
+ S3BAND="$S3B"
+ else
+ S3BAND="$S3B @${BWS3} MHz"
+ fi
+ MODE="$MODE / $S3B"
+ fi
+ ;;
+ 4)
+ if [ -z "$S4B" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ S4B=$(band4g $T1)
+ if [ -z "$BWS4" ]; then
+ S4BAND="$S4B"
+ else
+ S4BAND="$S4B @${BWS4} MHz"
+ fi
+ MODE="$MODE / $S4B"
+ fi
+ ;;
+ esac
+ fi
+# T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $9}' | xargs)
+# [ "$T" != "0xFFFFFFFF" ] && addon $((POS + 4)) "(S${IDX}) EARFCN UL" "$(printf "%d" "$T")"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $11}')
+# [ "$T" != "255" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$((-141 + T)) dBm"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $12}')
+# [ "$T" != "255" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$((-20 + T/2)) dB"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 4/{print $13}')
+# [ "$T" != "255" ] && addon $((POS + 8)) "(S${IDX}) SNR" "$T dB"
+ IDX=$((IDX + 1))
+
+ fi
+ done
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,')
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+GTPKGVER?" | xargs)
+FW=$(echo "$FWA" | cut -d ":" -f2 | xargs)
+
+MDL=$(sms_tool -d $DEVICE at "AT+GMM?" | xargs)
+MODELM=$(echo "$MDL" | cut -d ':' -f2 | cut -d ',' -f1 | awk -F'"' '{print $1}')
+MODELF=$(sms_tool -d $DEVICE at "AT+CGMI" | xargs)
+
+MODELMCUT=$(echo $MODELM)
+MODELFCUT=$(echo $MODELF | sed s/"AT+CGMI "//)
+MODEL="$MODELFCUT "$MODELMCUT
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+CCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+CCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCAX=$(echo $PV | awk -F"Vendor=8087 ProdID=07f9" '{print $2}')
+PVCA=$(echo "$PVCAX" | cut -c-2453)
+PVCBX=$(echo $PV | awk -F"Vendor=8087 ProdID=095a" '{print $2}')
+PVCB=$(echo "$PVCBX" | cut -c-2453)
+
+if [ -n "$PVCA" ]; then
+ case $PVCA in
+ *"Driver=qmi_wwan"*)
+ PROTO="qmi"
+ ;;
+ *"Driver=cdc_ncm"*)
+ PROTO="ncm"
+ ;;
+ *"Driver=cdc_mbim"*)
+ PROTO="mbim"
+ ;;
+ *"Driver=cdc_ether"*)
+ PROTO="ecm"
+ ;;
+ esac
+fi
+
+if [ -n "$PVCB" ]; then
+ case $PVCB in
+ *"Driver=qmi_wwan"*)
+ PROTO="qmi"
+ ;;
+ *"Driver=cdc_ncm"*)
+ PROTO="ncm"
+ ;;
+ *"Driver=cdc_mbim"*)
+ PROTO="mbim"
+ ;;
+ *"Driver=cdc_ether"*)
+ PROTO="ecm"
+ ;;
+ esac
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/8087095a b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/8087095a
new file mode 100644
index 00000000..56533af3
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/modem/usb/8087095a
@@ -0,0 +1,482 @@
+# Fibocom L860
+
+bandwidth() {
+ case $1 in
+ 0) echo "1.4";;
+ 1) echo "3";;
+ 2) echo "5";;
+ 3) echo "10";;
+ 4) echo "15";;
+ 5) echo "20";;
+ *) echo "";;
+ esac
+}
+
+channeltoband()
+{
+ if [ $1 -ge 0 ] && [ $1 -le 599 ]; then
+ echo "1"
+ elif [ $1 -ge 600 ] && [ $1 -le 1199 ]; then
+ echo "2"
+ elif [ $1 -ge 1200 ] && [ $1 -le 1949 ]; then
+ echo "3"
+ elif [ $1 -ge 1950] && [ $1 -le 2399 ]; then
+ echo "4"
+ elif [ $1 -ge 2400] && [ $1 -le 2469 ]; then
+ echo "5"
+ elif [ $1 -ge 2750 ] && [ $1 -le 3449 ]; then
+ echo "7"
+ elif [ $1 -ge 3450 ] && [ $1 -le 3799 ]; then
+ echo "8"
+ elif [ $1 -ge 6150 ] && [ $1 -le 6449 ]; then
+ echo "20"
+ elif [ $1 -ge 9210 ] && [ $1 -le 9659 ]; then
+ echo "28"
+ elif [ $1 -ge 9870 ] && [ $1 -le 9919 ]; then
+ echo "31"
+ elif [ $1 -ge 37750 ] && [ $1 -le 38249 ]; then
+ echo "38"
+ elif [ $1 -ge 38650 ] && [ $1 -le 39649 ]; then
+ echo "40"
+ else
+ echo "0"
+ fi
+}
+
+
+O=$(sms_tool -d $DEVICE at "AT+MTSM=1")
+
+T=$(echo "$O" | awk -F: '/^\+MTSM:/ {print $2}' | xargs)
+[ -n "$T" ] && TEMP="$T °C"
+
+if [ "$REGOK" = "1" ]; then
+
+O=$(sms_tool -d $DEVICE at "AT+XLEC?;+XMCI=1;+XCCINFO=1;+XCCINFO?")
+
+if [ "x$MODE_NUM" = "x7" ]; then
+ T=$(echo "$O" | awk -F[,:] '/^\+XCCINFO:/{print $11}' | xargs)
+ if [ -n "$T" ]; then
+ T_DEC=$(printf "%d" "0x$T")
+ fi
+
+ PB=""
+ S1B=""
+ S2B=""
+ S3B=""
+ S4B=""
+ BWP=""
+ BWS1=""
+ BWS2=""
+ BWS3=""
+ BWS4=""
+
+ CELLS=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $3}')
+ case $CELLS in
+ "1")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$PB"
+ else
+ PBAND="$PB @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ ;;
+ "2")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ BWS1=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $6}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$(band4g ${T/BAND_LTE_/})"
+ else
+ PBAND="$(band4g ${T/BAND_LTE_/}) @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $7}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S1B=$(band4g $T)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ ;;
+ "3")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ BWS1=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $6}')
+ BWS2=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $7}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$(band4g ${T/BAND_LTE_/})"
+ else
+ PBAND="$(band4g ${T/BAND_LTE_/}) @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $8}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S1B=$(band4g $T)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $9}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S2B=$(band4g $T)
+ if [ -z "$BWS2" ]; then
+ S2BAND="$S2B"
+ else
+ S2BAND="$S2B @${BWS2} MHz"
+ fi
+ MODE="$MODE / $S2B"
+ fi
+ ;;
+ "4")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ BWS1=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $6}')
+ BWS2=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $7}')
+ BWS3=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $8}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$PB"
+ else
+ PBAND="$PB @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $9}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S1B=$(band4g $T)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $10}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S2B=$(band4g $T)
+ if [ -z "$BWS2" ]; then
+ S2BAND="$S2B"
+ else
+ S2BAND="$S2B @${BWS2} MHz"
+ fi
+ MODE="$MODE / $S2B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $11}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S3B=$(band4g $T)
+ if [ -z "$BWS3" ]; then
+ S3BAND="$S3B"
+ else
+ S3BAND="$S3B @${BWS3} MHz"
+ fi
+ MODE="$MODE / $S3B"
+ fi
+ ;;
+ "5")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $4}')
+ BWP=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $5}')
+ BWS1=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $6}')
+ BWS2=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $7}')
+ BWS3=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $8}')
+ BWS4=$(bandwidth "$T")
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $9}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ PB=$(band4g ${T/BAND_LTE_/})
+ if [ -z "$BWP" ]; then
+ PBAND="$PB"
+ else
+ PBAND="$PB @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $10}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S1B=$(band4g $T)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $11}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S2B=$(band4g $T)
+ if [ -z "$BWS2" ]; then
+ S2BAND="S2B"
+ else
+ S2BAND="S2B @${BWS2} MHz"
+ fi
+ MODE="$MODE / $S2B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $12}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S3B=$(band4g $T)
+ if [ -z "$BWS3" ]; then
+ S3BAND="$S3B"
+ else
+ S3BAND="$S3B @${BWS3} MHz"
+ fi
+ MODE="$MODE / $S3B"
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XLEC:/{print $13}')
+ if [ -n "$T" ] && [ "x$T" != "x0" ]; then
+ S4B=$(band4g $T)
+ if [ -z "$BWS4" ]; then
+ S4BAND="$S4B"
+ else
+ S4BAND="$S4B @${BWS4} MHz"
+ fi
+ MODE="$MODE / $S4B"
+ fi
+ ;;
+ esac
+
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $7}' | xargs)
+ if [ -n "$T" ]; then
+ PCI="$(printf "%d" "$T")"
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $8}' | xargs)
+ if [ "$T" != "0xFFFFFFFF" ]; then
+ # EARFCN DL
+ EARFCN="$(printf "%d" "$T")"
+ if [ -z "$PB" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ PB=$(band4g $T1)
+ if [ -z "$BWP" ]; then
+ PBAND="$PB"
+ else
+ PBAND="$PB @${BWP} MHz"
+ fi
+ MODE="$MODE $PB"
+ fi
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $9}' | xargs)
+# [ "$T" != "0xFFFFFFFF" ] && addon 34 "EARFCN UL" "$(printf "%d" "$T")"
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $11}')
+ if [ "$T" != "255" ]; then
+ RSRP="$((-141 + T))"
+ N=""
+ case $BWP in
+ "1.4") N=6;;
+ "3") N=15;;
+ "5") N=25;;
+ "10") N=50;;
+ "15") N=75;;
+ "20") N=100;;
+ esac
+ if [ -n "$N" ]; then
+ RSSI=$(echo "$((-141 + T)) $N" | awk '{printf "%d\n", $1 + 10*log(12*$2)/log(10)}')
+ if [ -n "$RSSI" ]; then
+ [ $RSSI -lt -113 ] && RSSI="-113"
+ [ $RSSI -gt -51 ] && RSSI="-51"
+ RSSI="$RSSI"
+ CSQ_PER=$(((RSSI + 113) * 100 / 62))
+ fi
+ fi
+ fi
+ T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $12}')
+ [ "$T" != "255" ] && RSRQ="$((-20 + T/2))"
+# T=$(echo "$O" | awk -F[,:] '/^\+XMCI: 4/{print $13}')
+# [ "$T" != "255" ] && addon 38 "SNR" "$T dB"
+ fi
+
+IFS="
+"
+
+ IDX=1
+ LINES=$(echo "$O" | grep "+XMCI: 5")
+ for LINE in $LINES; do
+ T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $7}' | xargs)
+ if [ -n "$T" ]; then
+ case $IDX in
+ 1) S1PCI="$(printf "%d" "$T")";;
+ 2) S2PCI="$(printf "%d" "$T")";;
+ 3) S3PCI="$(printf "%d" "$T")";;
+ 4) S4PCI="$(printf "%d" "$T")";;
+ *) ;;
+ esac
+ T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $8}' | xargs)
+ if [ "$T" != "0xFFFFFFFF" ]; then
+ # EARFCN DL
+ case $IDX in
+ 1) S1EARFCN="$(printf "%d" "$T")";;
+ 2) S2EARFCN="$(printf "%d" "$T")";;
+ 3) S3EARFCN="$(printf "%d" "$T")";;
+ 4) S4EARFCN="$(printf "%d" "$T")";;
+ *) ;;
+ esac
+ case $IDX in
+ 1)
+ if [ -z "$S1B" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ S1B=$(band4g $T1)
+ if [ -z "$BWS1" ]; then
+ S1BAND="$S1B"
+ else
+ S1BAND="$S1B @${BWS1} MHz"
+ fi
+ MODE="${MODE/LTE/LTE_A} / $S1B"
+ fi
+ ;;
+ 2)
+ if [ -z "$S2B" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ S2B=$(band4g $T1)
+ if [ -z "$BWS2" ]; then
+ S2BAND="$S2B"
+ else
+ S2BAND="$S2B @${BWS2} MHz"
+ fi
+ MODE="$MODE / $S2B"
+ fi
+ ;;
+ 3)
+ if [ -z "$S3B" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ S3B=$(band4g $T1)
+ if [ -z "$BWS3" ]; then
+ S3BAND="$S3B"
+ else
+ S3BAND="$S3B @${BWS3} MHz"
+ fi
+ MODE="$MODE / $S3B"
+ fi
+ ;;
+ 4)
+ if [ -z "$S4B" ]; then
+ T1=$(channeltoband $(printf "%d" "$T"))
+ S4B=$(band4g $T1)
+ if [ -z "$BWS4" ]; then
+ S4BAND="$S4B"
+ else
+ S4BAND="$S4B @${BWS4} MHz"
+ fi
+ MODE="$MODE / $S4B"
+ fi
+ ;;
+ esac
+ fi
+# T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $9}' | xargs)
+# [ "$T" != "0xFFFFFFFF" ] && addon $((POS + 4)) "(S${IDX}) EARFCN UL" "$(printf "%d" "$T")"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $11}')
+# [ "$T" != "255" ] && addon $((POS + 6)) "(S${IDX}) RSRP" "$((-141 + T)) dBm"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 5/{print $12}')
+# [ "$T" != "255" ] && addon $((POS + 7)) "(S${IDX}) RSRQ" "$((-20 + T/2)) dB"
+# T=$(echo "$LINE" | awk -F[,:] '/^\+XMCI: 4/{print $13}')
+# [ "$T" != "255" ] && addon $((POS + 8)) "(S${IDX}) SNR" "$T dB"
+ IDX=$((IDX + 1))
+
+ fi
+ done
+fi
+
+fi
+
+MODE=$(echo $MODE | sed 's,/,+,')
+
+# Modem
+FWA=$(sms_tool -d $DEVICE at "AT+GTPKGVER?" | xargs)
+FW=$(echo "$FWA" | cut -d ":" -f2 | xargs)
+
+MDL=$(sms_tool -d $DEVICE at "AT+GMM?" | xargs)
+MODELM=$(echo "$MDL" | cut -d ':' -f2 | cut -d ',' -f1 | awk -F'"' '{print $1}')
+MODELF=$(sms_tool -d $DEVICE at "AT+CGMI" | xargs)
+
+MODELMCUT=$(echo $MODELM)
+MODELFCUT=$(echo $MODELF | sed s/"AT+CGMI "//)
+MODEL="$MODELFCUT "$MODELMCUT
+
+# International Mobile Equipment Identity (IMEI)
+O=$(sms_tool -d $DEVICE at "AT+CGSN" | xargs)
+NR_I=$(echo "$O" | sed s/"AT+CGSN "//)
+if [ -n "$NR_I" ]; then
+ NR_IMEI="$NR_I"
+fi
+
+# International Mobile Subscriber Identity (IMSI)
+O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)
+NR_C=$(echo "$O" | sed s/"AT+CIMI "//)
+if [ -n "$NR_C" ]; then
+ NR_IMSI="$NR_C"
+fi
+
+# Integrated Circuit Card Identifier (ICCID)
+O=$(sms_tool -d $DEVICE at "AT+CCID")
+NR_D=$(echo "$O" | awk -F [:] '/^\+CCID: /{print $2}' | xargs)
+if [ -n "$NR_D" ]; then
+ NR_ICCID="$NR_D"
+fi
+
+# Protocol
+# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER
+PV=$(cat /sys/kernel/debug/usb/devices 2>/dev/null)
+PVCAX=$(echo $PV | awk -F"Vendor=8087 ProdID=07f9" '{print $2}')
+PVCA=$(echo "$PVCAX" | cut -c-2453)
+PVCBX=$(echo $PV | awk -F"Vendor=8087 ProdID=095a" '{print $2}')
+PVCB=$(echo "$PVCBX" | cut -c-2453)
+
+if [ -n "$PVCA" ]; then
+ case $PVCA in
+ *"Driver=qmi_wwan"*)
+ PROTO="qmi"
+ ;;
+ *"Driver=cdc_ncm"*)
+ PROTO="ncm"
+ ;;
+ *"Driver=cdc_mbim"*)
+ PROTO="mbim"
+ ;;
+ *"Driver=cdc_ether"*)
+ PROTO="ecm"
+ ;;
+ esac
+fi
+
+if [ -n "$PVCB" ]; then
+ case $PVCB in
+ *"Driver=qmi_wwan"*)
+ PROTO="qmi"
+ ;;
+ *"Driver=cdc_ncm"*)
+ PROTO="ncm"
+ ;;
+ *"Driver=cdc_mbim"*)
+ PROTO="mbim"
+ ;;
+ *"Driver=cdc_ether"*)
+ PROTO="ecm"
+ ;;
+ esac
+fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/vendorproduct.gcom b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/vendorproduct.gcom
new file mode 100644
index 00000000..8863262e
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/vendorproduct.gcom
@@ -0,0 +1,91 @@
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.01
+ waitquiet 0.01 0.01
+
+ let $c="ATE0;+CGMI^m"
+ let $r="+CGMI:"
+ gosub readatcmdfl
+
+ let $c="AT+CGMM^m"
+ let $r="+CGMM:"
+ gosub readatcmdfl
+
+ let $c="AT+CGMR^m"
+ let $r="+CGMR:"
+ gosub readatcmdfl
+ let $c="AT+GMR^m"
+ let $r="+GMR:"
+ gosub readatcmdfl
+
+ let $c="AT+CGSN^m"
+ let $r="+CGSN:"
+ gosub readatcmdfl
+
+ let $c="AT+CIMI^m"
+ let $r="+CIMI:"
+ gosub readatcmdfl
+
+ let $c="AT\^ICCID?^m"
+ gosub readatcmd
+ let $c="AT+ICCID^m"
+ gosub readatcmd
+ let $c="AT+QCCID^m"
+ gosub readatcmd
+ let $c="AT#CCID^m"
+ gosub readatcmd
+ let $c="AT!ICCID?^m"
+ gosub readatcmd
+ let $c="AT*ICCID?^m"
+ gosub readatcmd
+ let $c="AT+CCID^m"
+ gosub readatcmd
+
+ exit 0
+
+:readatcmd
+ let i=15
+ send $c
+:loop
+ get 0.1 "^m" $s
+ if len($s) < 2 goto loop2
+ if $mid($s,1,2) = "ER" goto loop1
+ if $mid($s,1,2) = "OK" goto loop2
+ if $mid($s,1,2) = "AT" goto loop2
+ print $s,"\n"
+ exit 0
+
+:loop1
+ return
+
+:loop2
+ if i = 0 return
+ let i=i-1
+ goto loop
+
+:readatcmdfl
+ let i=15
+ send $c
+:loop3
+ get 0.1 "^m" $s
+ if len($s) < 2 goto loop5
+ let f=0
+ if $mid($s,0,1) ="\n" let f=1
+ if $mid($s,f,2) = "ER" goto loop4
+ if $mid($s,f,2) = "OK" goto loop5
+ if $mid($s,f,2) = "AT" goto loop5
+ if $mid($s,f,1) = "\^" goto loop5
+ if $mid($s,f,1) = "#" goto loop5
+ let l=len($s)
+ let $s=$mid($s,f,l)
+ print $r,$s,"\n"
+ return
+
+:loop4
+ return
+
+:loop5
+ if i = 0 return
+ let i=i-1
+ goto loop3
diff --git a/luci-app-3ginfo-lite/root/usr/share/luci/menu.d/luci-app-3ginfo-lite.json b/luci-app-3ginfo-lite/root/usr/share/luci/menu.d/luci-app-3ginfo-lite.json
new file mode 100644
index 00000000..c854cb0f
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/luci/menu.d/luci-app-3ginfo-lite.json
@@ -0,0 +1,50 @@
+{
+ "admin/modem": {
+ "title": "Modem",
+ "order": 30,
+ "action": {
+ "type": "firstchild",
+ "recurse": true
+ }
+ },
+
+ "admin/modem/3ginfo-lite": {
+ "title": "Information about 3G/4G/5G connection",
+ "order": 10,
+ "action": {
+ "type": "alias",
+ "path": "admin/modem/3ginfo-lite/3gdetail"
+ },
+ "depends": {
+ "acl": [ "luci-app-3ginfo-lite" ],
+ "uci": { "3ginfo": true }
+ }
+ },
+
+ "admin/modem/3ginfo-lite/3gdetail": {
+ "title": "Details",
+ "order": 10,
+ "action": {
+ "type": "view",
+ "path": "modem/3gdetail"
+ }
+ },
+
+ "admin/modem/3ginfo-lite/3gdebug": {
+ "title": "Diagnostics",
+ "order": 20,
+ "action": {
+ "type": "view",
+ "path": "modem/3gdebug"
+ }
+ },
+
+ "admin/modem/3ginfo-lite/3gconfig": {
+ "title": "Configuration",
+ "order": 30,
+ "action": {
+ "type": "view",
+ "path": "modem/3gconfig"
+ }
+ }
+}
diff --git a/luci-app-3ginfo-lite/root/usr/share/rpcd/acl.d/luci-app-3ginfo-lite.json b/luci-app-3ginfo-lite/root/usr/share/rpcd/acl.d/luci-app-3ginfo-lite.json
new file mode 100644
index 00000000..28ebbd37
--- /dev/null
+++ b/luci-app-3ginfo-lite/root/usr/share/rpcd/acl.d/luci-app-3ginfo-lite.json
@@ -0,0 +1,29 @@
+{
+ "luci-app-3ginfo-lite": {
+ "description": "Grant access to LuCI app 3ginfo-lite",
+ "read": {
+ "cgi-io": [ "exec" ],
+ "file": {
+ "/usr/share/3ginfo-lite/3ginfo.sh": [ "exec" ],
+ "/usr/share/3ginfo-lite/detect.sh": [ "exec" ],
+ "/usr/share/3ginfo-lite/check.gcom": [ "exec" ],
+ "/usr/share/3ginfo-lite/info.gcom": [ "exec" ],
+ "/etc/modemdefine": [ "read" ],
+ "/etc/3ginfo": [ "read" ],
+ "/sys/kernel/debug/usb/devices": [ "read" ]
+ },
+ "uci": [ "3ginfo", "luci-app-3ginfo-lite" ]
+ },
+ "write": {
+ "file": {
+ "/bin/cat": [ "exec" ],
+ "/bin/sh -x /usr/share/3ginfo-lite/3ginfo.sh": [ "exec" ],
+ "/bin/ls /dev": [ "exec" ],
+ "/etc/modemdefine": [ "write" ],
+ "/tmp/debug_result.txt": [ "write" ],
+ "/etc/3ginfo": [ "write" ]
+ },
+ "uci": [ "3ginfo", "luci-app-3ginfo-lite" ]
+ }
+ }
+}