diff --git a/luci-app-3ginfo-lite/Makefile b/luci-app-3ginfo-lite/Makefile
index e300a8a0..10742773 100644
--- a/luci-app-3ginfo-lite/Makefile
+++ b/luci-app-3ginfo-lite/Makefile
@@ -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.21-20220817
+PKG_VERSION:=1.0.22-20220821
include $(TOPDIR)/feeds/luci/luci.mk
diff --git a/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gconfig.js b/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gconfig.js
index a6b2958b..61e3bd3d 100644
--- a/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gconfig.js
+++ b/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gconfig.js
@@ -55,20 +55,16 @@ return view.extend({
o = s.taboption('bts1', form.DummyValue, '_dummy');
o.rawhtml = true;
o.default = '
' +
- _('Hint: To set up the BTS search engine, simply fill in the required fields.') +
+ _('Hint: To set up a BTS search engine, all you have to do is select the dedicated website for your location.') +
'
';
- o = s.taboption('bts1',form.Value, 'bstart', _('Beginning of the web address'),
- _('Paste the entire site address into the Cell ID value.')
+ o = s.taboption('bts1',form.ListValue, 'website', _('Website to search for BTS'),
+ _('Select a website for searching.')
);
- //o.default = 'http://www.btsearch.pl/szukaj.php?mode=std&search=';
- o.rmempty = true;
-
- o = s.taboption('bts1',form.Value, 'bend', _('End of search address'),
- _('Paste the string occurring after the Cell ID value.')
- );
- //o.default = '';
- o.rmempty = true;
+ 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;
return m.render();
}
diff --git a/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdetail.js b/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdetail.js
index 5730f65d..f80f1c29 100644
--- a/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdetail.js
+++ b/luci-app-3ginfo-lite/htdocs/luci-static/resources/view/modem/3gdetail.js
@@ -498,12 +498,12 @@ return view.extend({
if (document.getElementById('lac')) {
var view = document.getElementById("lac");
if (json.lac_dec == '' || json.lac_hex == '') {
- var lc = json.lac_hex + ' ' + json.lac_dec;
+ var lc = json.lac_dec + ' ' + json.lac_hex;
var ld = lc.split(' ').join('');
view.textContent = ld;
}
else {
- view.textContent = json.lac_hex + ' (' + json.lac_dec + ')' ;
+ view.textContent = json.lac_dec + ' (' + json.lac_hex + ')';
}
}
@@ -514,31 +514,25 @@ return view.extend({
view.textContent = '-';
}
else {
- if (json.tac_hex == json.lac_hex) {
- view.textContent = json.tac_hex + ' (' + json.lac_dec + ')' ;
- }
- else {
- view.textContent = json.tac_hex + ' (' + json.tac_dec + ')' ;
- }
- if (json.tac_dec == '' || json.tac_hex == '') {
- view.textContent = json.lac_hex + ' (' + json.lac_dec + ')' ;
- }
- else {
- view.textContent = json.tac + ' (' + json.tac_dec + ')' ;
+ if (json.tac_hex == null || json.tac_hex == '' || json.tac_hex == '-') {
+ view.textContent = json.tac_d + ' (' + json.tac_h + ')';
}
+ else {
+ view.textContent = json.tac_dec + ' (' + json.lac_hex + ')';
+ }
}
}
if (document.getElementById('cid')) {
var view = document.getElementById("cid");
if (json.cid_dec == '' || json.cid_hex == '') {
- var cc = json.cid_hex + ' ' + json.cid_dec;
+ var cc = json.cid_dec + ' ' + json.cid_hex;
var cd = cc.split(' ').join('');
view.textContent = cd;
}
else {
- view.textContent = json.cid_hex + ' (' + json.cid_dec + ')' ;
+ view.textContent = json.cid_dec + ' (' + json.cid_hex + ')' ;
}
}
@@ -777,13 +771,39 @@ return view.extend({
o.onclick = function() {
return uci.load('3ginfo').then(function() {
- var wstart = (uci.get('3ginfo', '@3ginfo[0]', 'bstart'));
- var wend = (uci.get('3ginfo', '@3ginfo[0]', 'bend'));
- if ( wend == '' || wend == null ) {
- window.open(wstart + json.cid_dec);
- } else {
- window.open(wstart + json.cid_dec + wend);
- };
+ var searchsite = (uci.get('3ginfo', '@3ginfo[0]', 'website'));
+
+ if (searchsite.includes('btsearch')) {
+ //http://www.btsearch.pl/szukaj.php?mode=std&search=CellID
+
+ window.open(searchsite + json.cid_dec);
+ }
+
+ if (searchsite.includes('lteitaly')) {
+ //https://lteitaly.it/internal/map.php#bts=MCCMNC.CellID
+
+ var zzmnc = json.operator_mnc;
+ var zzcid = Math.round(json.cid_dec/256);
+ if ( zzmnc.length == 3 ) {
+ var first = zzmnc.slice(0, 1);
+ var second = zzmnc.slice(1, 2);
+ if (first.includes('0') && second.includes('0')) {
+ var cutmnc = zzmnc.slice(2, 3);
+ }
+ }
+ if ( zzmnc.length == 2 ) {
+ var first = zzmnc.slice(0, 1);
+ if (first.includes('0')) {
+ var cutmnc = zzmnc.slice(1, 2);
+ }
+ }
+ if ( zzmnc.length < 2 ) {
+ var cutmnc = zzmnc;
+ }
+
+ window.open(searchsite + json.operator_mcc + cutmnc + '.' + zzcid);
+ }
+
});
};
@@ -795,3 +815,4 @@ return view.extend({
handleSave: null,
handleReset: null
});
+
diff --git a/luci-app-3ginfo-lite/po/pl/3ginfo.po b/luci-app-3ginfo-lite/po/pl/3ginfo.po
index 5cad07ab..0e343e86 100644
--- a/luci-app-3ginfo-lite/po/pl/3ginfo.po
+++ b/luci-app-3ginfo-lite/po/pl/3ginfo.po
@@ -141,20 +141,15 @@ msgstr "Szukaj"
msgid "Search BTS using Cell ID"
msgstr "Wyszukaj BTS po Cell ID"
-msgid "Hint: To set up the BTS search engine, simply fill in the required fields."
-msgstr "Podpowiedź: Aby skonfigurować wyszukiwarkę BTS wystarczy uzupełnić wymagane pola."
+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 "Beginning of the web address"
-msgstr "Początek adresu strony www"
+msgid "Website to search for BTS"
+msgstr "Strona do wyszukiwania BTS"
-msgid "End of search address"
-msgstr "Koniec adresu wyszukiwania"
+msgid "Select a website for searching."
+msgstr "Wybierz stronę internetową służącą do wyszukiwania."
-msgid "Paste the entire site address into the Cell ID value."
-msgstr "Wklej cały adres strony do wartości Cell ID."
-
-msgid "Paste the string occurring after the Cell ID value."
-msgstr "Wklej ciąg znaków występujący za wartością Cell ID."
diff --git a/luci-app-3ginfo-lite/root/etc/config/3ginfo b/luci-app-3ginfo-lite/root/etc/config/3ginfo
index a35316d2..f47d3851 100644
--- a/luci-app-3ginfo-lite/root/etc/config/3ginfo
+++ b/luci-app-3ginfo-lite/root/etc/config/3ginfo
@@ -1,5 +1,4 @@
config 3ginfo
option device ''
- option bstart 'http://www.btsearch.pl/szukaj.php?mode=std&search='
- option bend ''
+ option website 'http://www.btsearch.pl/szukaj.php?mode=std&search='
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/19d21485 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/19d21485
index 5d8a7da7..a2bfb3d0 100644
--- a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/19d21485
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/19d21485
@@ -65,6 +65,7 @@ case "$MODE_NUM" in
if [ -n "$T" ]; then
[ -n "$ADDON" ] && ADDON="$ADDON,"
T_HEX=$(printf "%X" $T)
+ T_DEC=$T
ADDON="$ADDON"'{"TAC":"'$T' ('$T_HEX')"}'
fi
diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/19d21489 b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/19d21489
index ba5996f0..f7ab8fcf 100644
--- a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/19d21489
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/19d21489
@@ -32,6 +32,7 @@ case "$MODE_NUM" in
if [ -n "$T" ] && [ "x$T" != "x0" ]; then
[ -n "$ADDON" ] && ADDON="$ADDON,"
T_HEX=$(printf "%X" $T)
+ T_DEC=$T
fi
T=$(echo "$O" | awk -F[,:] '/^\+ZRSSI/ {print $4}' | xargs)
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
index 015c7d47..36a455cf 100644
--- a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh
+++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh
@@ -255,7 +255,8 @@ cat <