Skip to content

Commit

Permalink
Up to 1.0.24-20220910
Browse files Browse the repository at this point in the history
Update for EM12 / EM160R-GL
Added RG502Q (5G-NSA)
  • Loading branch information
4IceG authored Sep 10, 2022
1 parent 9d1f1fc commit 559557f
Show file tree
Hide file tree
Showing 11 changed files with 1,497 additions and 345 deletions.
2 changes: 1 addition & 1 deletion luci-app-3ginfo-lite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PKG_NAME:=luci-app-3ginfo-lite
LUCI_TITLE:=LuCI panel for 3ginfo-lite
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+sms-tool
PKG_VERSION:=1.0.23-20220821
PKG_VERSION:=1.0.24-20220910

include $(TOPDIR)/feeds/luci/luci.mk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ return view.extend({
o = s.taboption('bts1',form.ListValue, 'website', _('Website to search for BTS'),
_('Select a website for searching.')
);
o.value('http://www.btsearch.pl/szukaj.php?mode=std&search=', _('BTSearch.pl'));
o.value('http://www.btsearch.pl/szukaj.php?mode=std&search=', _('btsearch.pl'));
o.value('https://lteitaly.it/internal/map.php#bts=', _('lteitaly.it'));
o.default = 'http://www.btsearch.pl/szukaj.php?mode=std&search=';
o.modalonly = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
/*
Copyright 2021-2022 Rafał Wabik - IceG - From eko.one.pl forum
rssi/rsrp/rsrq/sinnr formulas for percentages taken from
https://github.com/koshev-msk/luci-app-modeminfo
Thanks to https://github.com/koshev-msk for the initial progress bar calculation for rssi/rsrp/rsrq/sinnr.
*/

Expand Down Expand Up @@ -293,15 +292,27 @@ return view.extend({
view.textContent = json.registration;
if (json.registration == '0') {
view.textContent = _('Not registered');
if (json.simslot.length > 0) {
view.textContent =_('SIM') + ':' + json.simslot + ' | ' + _('Not registered');
}
}
if (json.registration == '1') {
view.textContent = _('Registered');
if (json.simslot.length > 0) {
view.textContent =_('SIM') + ':' + json.simslot + ' | ' + _('Registered');
}
}
if (json.registration == '2') {
view.textContent = _('Searching..');
if (json.simslot.length > 0) {
view.textContent =_('SIM') + ':' + json.simslot + ' | ' + _('Searching..');
}
}
if (json.registration == '3') {
view.textContent = _('Registering denied');
if (json.simslot.length > 0) {
view.textContent =_('SIM') + ':' + json.simslot + ' | ' + _('Registering denied');
}
}
}
}
Expand Down Expand Up @@ -497,30 +508,34 @@ return view.extend({

if (document.getElementById('lac')) {
var view = document.getElementById("lac");
var subDEC="DEC";
var subHEX="HEX";
if (json.lac_dec == '' || json.lac_hex == '') {
var lc = json.lac_dec + ' ' + json.lac_hex;
var ld = lc.split(' ').join('');
view.textContent = ld;
}
else {
view.textContent = json.lac_dec + ' (' + json.lac_hex + ')';
view.innerHTML = json.lac_dec + subDEC.sub() + ' (' + json.lac_hex + ')'+ subHEX.sub();
}

}

if (document.getElementById('tac')) {
var view = document.getElementById("tac");
var subDEC="DEC";
var subHEX="HEX";
if (json.signal == 0 || json.signal == '') {
view.textContent = '-';
}
else {
if (json.tac_hex == null || json.tac_hex == '' || json.tac_hex == '-') {
view.textContent = json.tac_d + ' (' + json.tac_h + ')';
view.innerHTML = json.tac_d + subDEC.sub() + ' (' + json.tac_h + ')'+ subHEX.sub();
}
else {
view.textContent = json.tac_dec + ' (' + json.tac_hex + ')';
view.innerHTML = json.tac_dec + subDEC.sub() + ' (' + json.tac_hex + ')+ subHEX.sub()';
if (json.tac_hex == json.lac_hex && json.tac_dec == '') {
view.textContent = json.lac_dec + ' (' + json.tac_hex + ')';
view.innerHTML = json.lac_dec + subDEC.sub() + ' (' + json.tac_hex + ')'+ subHEX.sub();
}

}
Expand All @@ -529,14 +544,15 @@ return view.extend({

if (document.getElementById('cid')) {
var view = document.getElementById("cid");
var subDEC="DEC";
var subHEX="HEX";
if (json.cid_dec == '' || json.cid_hex == '') {
var cc = json.cid_dec + ' ' + json.cid_hex;
var cc = json.cid_hex + ' ' + json.cid_dec;
var cd = cc.split(' ').join('');
view.textContent = cd;
}
else {

view.textContent = json.cid_dec + ' (' + json.cid_hex + ')' ;
view.innerHTML = json.cid_dec + subDEC.sub() + ' (' + json.cid_hex + ')'+ subHEX.sub();
}
}

Expand Down Expand Up @@ -612,73 +628,73 @@ return view.extend({
E('h4', {}, [ _('General Information') ]),
E('table', { 'class': 'table' }, [
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Signal strength:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Signal strength')]),
E('td', { 'class': 'td left', 'id': 'signal' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Operator:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Operator')]),
E('td', { 'class': 'td left', 'id': 'operator' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('SIM status:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('SIM status')]),
E('td', { 'class': 'td left', 'id': 'sim' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Connection statistics:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Connection statistics')]),
E('td', { 'class': 'td left', 'id': 'connst' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Technology:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Technology')]),
E('td', { 'class': 'td left', 'id': 'mode' }, [ '-' ]),
]),
]),

E('h4', {}, [ _('Modem Information') ]),
E('table', { 'class': 'table' }, [
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Modem type:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Modem type')]),
E('td', { 'class': 'td left', 'id': 'modem' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Revision / Firmware:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Revision / Firmware')]),
E('td', { 'class': 'td left', 'id': 'fw' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('IP adress / Communication Port:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('IP adress / Communication Port')]),
E('td', { 'class': 'td left', 'id': 'cport' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Protocol:')]),
E('td', { 'class': 'td left', 'id': 'protocol' }, [ '-' ]),
]),
E('tr', { 'id': 'tempn', 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Chip Temperature:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Chip Temperature')]),
E('td', { 'class': 'td left', 'id': 'temp' }, [ '-' ]),
]),
]),

E('h4', {}, [ _('Cell / Signal Information') ]),
E('table', { 'class': 'table' }, [
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('MCC MNC:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('MCC MNC')]),
E('td', { 'class': 'td left', 'id': 'mccmnc' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Cell ID:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Cell ID')]),
E('td', { 'class': 'td left', 'id': 'cid' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('TAC:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('TAC')]),
E('td', { 'class': 'td left', 'id': 'tac' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('LAC:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('LAC')]),
E('td', { 'class': 'td left', 'id': 'lac' }, [ '-' ]),
]),

E('tr', { 'id': 'csqn', 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [
_('CSQ:'),
_('CSQ'),
E('div', { 'style': 'text-align:left;font-size:66%' }, [ _('(Signal Strength)') ]),
]),
E('td', { 'class': 'td' }, E('div', {
Expand All @@ -690,7 +706,7 @@ return view.extend({
]),
E('tr', { 'id': 'rssin', 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [
_('RSSI:'),
_('RSSI'),
E('div', { 'style': 'text-align:left;font-size:66%' }, [ _('(Received Signal Strength Indicator)') ]),
]),
E('td', { 'class': 'td' }, E('div', {
Expand All @@ -702,7 +718,7 @@ return view.extend({
]),
E('tr', { 'id': 'rsrpn', 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [
_('RSRP:'),
_('RSRP'),
E('div', { 'style': 'text-align:left;font-size:66%' }, [ _('(Reference Signal Receive Power)') ]),
]),
E('td', { 'class': 'td' }, E('div', {
Expand All @@ -714,7 +730,7 @@ return view.extend({
]),
E('tr', { 'id': 'sinrn', 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [
_('SINR:'),
_('SINR'),
E('div', { 'style': 'text-align:left;font-size:66%' }, [ _('(Signal to Interference plus Noise Ratio)') ]),
]),
E('td', { 'class': 'td' }, E('div', {
Expand All @@ -726,7 +742,7 @@ return view.extend({
]),
E('tr', { 'id': 'rsrqn', 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [
_('RSRQ:'),
_('RSRQ'),
E('div', { 'style': 'text-align:left;font-size:66%' }, [ _('(Reference Signal Received Quality)') ]),
]),
E('td', { 'class': 'td' }, E('div', {
Expand All @@ -738,23 +754,23 @@ return view.extend({
]),

E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Primary band | PCI & EARFCN:')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('Primary band | PCI & EARFCN')]),
E('td', { 'class': 'td left', 'id': 'pband' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('CA band (S1):')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('CA band (S1)')]),
E('td', { 'class': 'td left', 'id': 's1band' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('CA band (S2):')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('CA band (S2)')]),
E('td', { 'class': 'td left', 'id': 's2band' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('CA band (S3):')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('CA band (S3)')]),
E('td', { 'class': 'td left', 'id': 's3band' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('td', { 'class': 'td left', 'width': '33%' }, [ _('CA band (S4):')]),
E('td', { 'class': 'td left', 'width': '33%' }, [ _('CA band (S4)')]),
E('td', { 'class': 'td left', 'id': 's4band' }, [ '-' ]),
]),

Expand Down Expand Up @@ -800,10 +816,13 @@ return view.extend({
}
if ( zzmnc.length == 2 ) {
var first = zzmnc.slice(0, 1);
if (first.includes('0')) {
var cutmnc = zzmnc.slice(1, 2);
}
}
if (first.includes('0')) {
var cutmnc = zzmnc.slice(1, 2);
}
else {
var cutmnc = zzmnc;
}
}
if ( zzmnc.length < 2 || !first.includes('0') && !second.includes('0')) {
var cutmnc = zzmnc;
}
Expand All @@ -822,4 +841,3 @@ return view.extend({
handleSave: null,
handleReset: null
});

52 changes: 23 additions & 29 deletions luci-app-3ginfo-lite/po/pl/3ginfo.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"

msgid "Information about 3G/4G connection"
msgstr "Informacja o statusie połączenia 3G/4G"
msgid "Information about 3G/4G/5G connection"
msgstr "Informacja o statusie połączenia 3G/4G/5G"

msgid "More information about the 3ginfo on the"
msgstr "Więcej informacji o 3ginfo na"
Expand All @@ -28,32 +28,32 @@ msgstr "Informacje o modemie"
msgid "Cell / Signal Information"
msgstr "Informacje o sieci / sygnale"

msgid "Technology:"
msgstr "Technologia:"
msgid "Technology"
msgstr "Technologia"

msgid "Operator:"
msgstr "Operator:"
msgid "Operator"
msgstr "Operator"

msgid "Signal strength:"
msgstr "Siła sygnału:"
msgid "Signal strength"
msgstr "Siła sygnału"

msgid "Connection statistics:"
msgstr "Statystyki połączenia:"
msgid "Connection statistics"
msgstr "Statystyki połączenia"

msgid "Modem type:"
msgstr "Typ modemu:"
msgid "Modem type"
msgstr "Typ modemu"

msgid "Additional information"
msgstr "Informacje dodatkowe"

msgid "Revision / Firmware:"
msgstr "Rewizja / Wersja firmware:"
msgid "Revision / Firmware"
msgstr "Rewizja / Wersja firmware"

msgid "IP adress / Communication Port:"
msgstr "Adres IP / Port do komunikacji:"
msgid "IP adress / Communication Port"
msgstr "Adres IP / Port do komunikacji"

msgid "Chip Temperature:"
msgstr "Temperatura układu:"
msgid "Chip Temperature"
msgstr "Temperatura układu"

msgid "Configuration 3ginfo-lite"
msgstr "Konfiguracja 3ginfo-lite"
Expand All @@ -67,6 +67,9 @@ 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. <br /> <br />Traditional "
"modem. <br /> Select one of the available ttyUSBX "
Expand All @@ -78,9 +81,6 @@ msgstr ""
"ttyUSBX.<br /> <br />Modem typu HiLink. <br /> Wprowadź adres IP "
"192.168.X.X pod którym dostępny jest modem."

msgid "Protocol:"
msgstr "Protokół:"

msgid "Very good"
msgstr "Bardzo dobry"

Expand All @@ -105,14 +105,8 @@ msgstr "Średni zasięg"
msgid "Cell edge"
msgstr "Na krawędzi zasięgu"

msgid "Primary band: "
msgstr "Pasmo podstawowe: "

msgid "(S) band: "
msgstr "Pasmo (S): "

msgid "SIM status:"
msgstr "Status karty SIM:"
msgid "SIM status"
msgstr "Status karty SIM"

msgid "Not registered"
msgstr "Nie zalogowana do sieci"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,3 @@ fi
#if [ -n "$T" ] && [ -z "$FORCE_PLMN" ]; then
# COPS="$T"
#fi

Loading

0 comments on commit 559557f

Please sign in to comment.