Huawei-Router-Tool
Huawei-Router-Tool copied to clipboard
Force Cell ID
I have an issue, where one of my routers appears to be cell hoping. Is there a command to force it to a particular cell?
https://community.teltonika-networks.com/4431/how-can-i-lock-a-cell
https://blog.hqcodeshop.fi/archives/206-Running-AT-commands-on-your-B593.html
Could you implement such a function in your amazing tool?
Sorry for late reply. I'm little bit busy now with life and currently doing a project which redesign Huawei Router Tool with some improved things. I will consider all the suggestion once I think the project is nearly done.
@pearlxcore I am amazed at the new software. Really great improvement 👍
Maybe these firmwares are helpful in analysing or implementing additional features in your great tool:
Huawei 5G CPE Pro (H112-372)
Here is a firmware file for the Huawei 5G CPE Pro (H112-372) as a download, I'm looking forward to lock the Cell ID:
https://we.tl/t-Og2mlokJ37
@pearlxcore I am amazed at the new software. Really great improvement 👍
Here is a firmware file for the Huawei 5G CPE Pro (H112-372) as a download, I'm looking forward to lock the Cell ID:
https://we.tl/t-Og2mlokJ37
In the firmware you linked I found 2 api related to cell lock ; api/ntwk/celllock and api/net/cell-info
If you send GET request to api/net/cell-info it will reply this :
<response>
<cellinfo>00894668</cellinfo>
<lac>A980</lac>
</response>
But sending POST request resulting error "root element missing".
For another api if you send GET request to api/ntwk/celllock it will reply empty response. But if you send POST request (I don't know the correct parameter) to the api it reply with "error wrong parameter". That mean I just need the correct parameter to apply new cell lock but we lack of api documentation. I don't know if 5G router has the cell id lock options in webui. But if they do, someone with 5G router need to sniff the connection to see request parameter.
So the API could work if the right parameters are known, right? I will search if I can find out or do you know how I could sniff the connection to see the request parameter? Is the API better than these AT commands or better asked, are AT commands even possible with your software?
https://rdtk.net/network/how-you-can-lock-your-modem/#Locking_EARFCN_/_Frequency_in_Huawei_Modem_/_Pocket_WiFi
https://translate.google.com/translate?sl=de&tl=en&u=https%3A%2F%2Fwww.lteforum.at%2Fmobilfunk%2Fat-command-execution-fuer-huawei-sticks.2235%2F
https://github.com/pixelspark/tymodem
https://whrl.pl/Rf4Fv9
https://gist.github.com/phalski/2bb38d2e12a0fadfa1f4d9dc0ee7d51d
But sending POST request resulting error "root element missing".
https://blog.hqcodeshop.fi/archives/259-Huawei-E5186-AJAX-API.html
Well I actually found a way to lock cell id but that require external tool (adb.exe). Yes I able to include it in the program but I also interested with what i found here, the api which might let us lock the cell id with just a POST request to router. This is more easier and no external tools needed. But like I said before I don't have idea what is the correct parameter.
I'm not sure if Huawei 5G CPE Pro (H112-372) webui contain features to lock cell id, but someone with could do some research on that. Some features on webui might hidden from users but they can use web dev tool and modify the html to unhidden those feature.
But sending POST request resulting error "root element missing".
https://blog.hqcodeshop.fi/archives/259-Huawei-E5186-AJAX-API.html
My tool always have
For cell locking I still looking for api solution. But if I get boring with that I will try implement the adb method. xD
I own a Huawei 5G CPE Pro (H112-372) physically. How can I achieve to see the hidden features?
I'm not saying it does exist in the webui, but why api/ntwk/celllock is exists tho. What I know is not all features in the router are displayed in the webui. The devs may set it hidden from webpage.
You can try the developer tool in google chrome. To view webpage source file, open 'Elements' tab.
To view what js code was running, open the network tab -> JS filter -> open any page in the webui that you feel is related to network stuff. If you are lucky you will find something interesting. The list of js file displayed is the code runs while you are browsing the webui page. Analyze each js code and find terms or api related to cell locking such as 'cell', 'cell_locking' etc.
To view what js code was running, open the network tab -> JS filter -> open any page in the webui that you feel is related to network stuff. If you are lucky you will find something interesting. The list of js file displayed is the code runs while you are browsing the webui page. Analyze each js code and find terms or api related to cell locking such as 'cell', 'cell_locking' etc.
_Search "celllock" or "cellock"
https://we.tl/t-ByMfn7LhHl
\menu.js 'celllock_enabled': 'celllock',
\redirect.js CELLLOCK_STATUS_LOCKED: '2', DIS_CELLLOCK: "#celllock", var apiCelllockStatus = {}; getAjaxData('api/ntwk/celllock', cellockGetDate, {sync: true}); apiCelllockStatus = ret.response;
if ( GLOBAL.modules.celllock_enabled === '1' ) { if ( CONST.CELLLOCK_STATUS_LOCKED === apiCelllockStatus.celllockStatus && monitoringStatus === '901') { return DISCONNECT_TYPE.DIS_CELLLOCK; } }
\guide.js $('#autoUpgBtnOpen').attr('lang-id','celllock.enable_1'); $('#autoUpgBtnOpen').text(publicLang['celllock.enable_1']);
@pearlxcore could you flash this firmware and check the js file that may have been included in the modified firmware?
https://www.youtube.com/watch?v=OJzISBn7w8s
https://www.mediafire.com/file/ameuju87txu65vm/B525_Cell_ID_Firmware.rar/file
https://www.youtube.com/watch?v=WZC2EqMuqMo
@pearlxcore mails have been sent to you.
For cell locking I still looking for api solution. But if I get boring with that I will try implement the adb method. xD
Could you please describe the ADB method how to do it? What are the ADB commands to send to the router... (1) https://usermanual.wiki/Huawei/HUAWEIME909sSeriesLTEModuleATCommandInterfaceSpecificationV100R00103Englishpdf.267489792/view#page=367 (2) https://usermanual.wiki/Huawei/HUAWEIME909sSeriesLTEModuleATCommandInterfaceSpecificationV100R00103Englishpdf.267489792/view#page=93 (3) https://forum.huawei.com/enterprise/en/tau-frequency-lock-guide/thread/465287-100305
CELL ID CALCULATOR AND APPLICATION: (updated) https://www.youtube.com/watch?v=_U2zB_II0SU Can the ADB commands be extracted from the .exe: https://www.mediafire.com/file/zudw60dtvv42qz2
GUI Cell ID locking https://www.youtube.com/watch?v=afN_Pokrs1c Link to download : https://up-load.io/4932sktoog4o password for install : LoveTacome
Hello I also own a h112-372. Are you success in finding a solution for cell I'd locking for Huawei h112-372
@pearlxcore @mucke5 kindly help
@pearlxcore below is the code from network element from chrome.. I see there is a API api/ntwk/celllock but while i sue to GET response in your tool. I get the Firmware not supported.
var CONST = {
MACRO_SAVE_PIN_ENABLED: '1',
MACRO_SAVE_PIN_DISABLED: '0',
SIM_PIN_TIMES_DEFAULT: '3',
SIM_SAVE_PIN_SCID: '0',
SIM_SAVE_PIN_DEFAULT: '0',
SIM_PUK_TIMES_DEFAULT: '10',
MACRO_SIM_LOCK_ENABLE: '1',
MACRO_SIM_REMAIN_TIMES: '10',
MACRO_SIM_PLOCK_ENABLE: '0',
MACRO_NETOWRK_SERVICE_AVAILABILITY: '2',
ETHERNET_LAN_MODE: '5',
MACRO_NO_SIM_CARD: '255',
MACRO_CPIN_FAIL: '256',
MACRO_PIN_REQUIRED: '260',
MACRO_PUK_REQUIRED: '261',
CELLLOCK_STATUS_LOCKED: '2',
SIMLOCK_REMAINTIMES: '0'
};
var DISCONNECT_TYPE = {
DIS_ETHACCONT_ERR: '#cradleDisconnected',
DIS_NOCARD: '#nocard',
DIS_SIMLOCK: '#simlock',
DIS_PINLOCK: '#pinlock',
DIS_PUKLOCK: '#puklock',
DIS_PROFILE_ERR: '#profileErr',
DIS_NETWORK_UNVISIBLE: '#networkUnvisiable',
DIS_SINGLE_POOR: '#singlePoor',
DIS_DATASWITCH_DISABLE: '#dataSwtichDisable',
DIS_ROAM_NETWORK: '#roamNetwork',
DIS_ROAMDIAL_DISABLE: '#roamdialdisable',
DIS_ROAM_AUTODIAL_DISABLE: '#roamdialautodisable',
DIS_CELLLOCK: "#celllock",
DIS_MANNAL_DIAL: "#mannalDial",
DIS_STATISTIC_OVER: "#statisticOver",
DIS_NO_SERVER: "#noServer",
DIS_OTHER: '#other',
DIS_ETHDIALUPERRONE: "#ethdialuperrone",
DIS_ETHDIALUPERRTWO: "#ethdialuperrtwo",
DIS_ETHDIALUPERRTHREE: "#ethdialuperrthree",
DIS_ETHDIALUPERRFOUR: "#ethdialuperrfour",
DIS_ETHDIALUPERRFIVE: "#ethdialuperrfive",
DIS_ETHDIALUPERRSIX: "#ethdialuperrsix",
DIS_ETHDIALUPERRSEVEN: "#ethdialuperrseven"
};
var apiPinStatus = {};
var apiSimLockStauts = {};
var apiCradleStatus = {};
var apiCelllockStatus = {};
var apiMonitoringStauts = {};
var apiDualwaninfoStatus = {};
var apiwanpathinfoStatus = {};
function loadData() {
getAjaxData('api/pin/status', statusGetDate, {sync: true});
getAjaxData('api/cradle/status-info', statusInfoGetDate, {sync: true});
getAjaxData('api/pin/simlock', simlockGetDate, {sync: true});
getAjaxData('api/ntwk/celllock', cellockGetDate, {sync: true});
getAjaxData('api/ntwk/dualwaninfo', dualwaninfoGetDate, {sync: true});
getAjaxData('api/staticroute/wanpath', wanpathinfoGetDate, {sync: true});
}
function statusGetDate(ret){
apiPinStatus = ret.response;
}
function statusInfoGetDate(ret) {
apiCradleStatus = ret.response;
}
function simlockGetDate(ret) {
apiSimLockStauts = ret.response;
}
function cellockGetDate(ret) {
apiCelllockStatus = ret.response;
}
function dualwaninfoGetDate(ret) {
apiDualwaninfoStatus = ret.response;
}
function wanpathinfoGetDate(ret) {
apiwanpathinfoStatus = ret.response;
}
function getEthPage() {
if ( typeof GLOBAL.modules.cradle_enabled !== 'undefined'
&& GLOBAL.modules.cradle_enabled === '1'
&& apiCradleStatus.cradlestatus === '1'
&& GLOBAL.deviceInfo.restore_default_status !== '1'
&& (window.location.href.indexOf('redirectdisconnect.html') === -1 || window.location.hash === DISCONNECT_TYPE.DIS_ETHACCONT_ERR)) {
if ( apiCradleStatus.connectstatus === '905'
|| apiCradleStatus.connectstatus === '906') {
return DISCONNECT_TYPE.DIS_ETHACCONT_ERR;
}
}
return null;
}
function getSimPage() {
if (CONST.MACRO_NO_SIM_CARD === apiPinStatus.SimState) {
return null;
}
if ( GLOBAL.modules.pinlock_Enabled === '1' ) {
if (CONST.MACRO_PIN_REQUIRED === apiPinStatus.SimState) {
return DISCONNECT_TYPE.DIS_PINLOCK;
} else if (CONST.MACRO_PUK_REQUIRED === apiPinStatus.SimState) {
return DISCONNECT_TYPE.DIS_PUKLOCK;
}
}
if (CONST.MACRO_SIM_LOCK_ENABLE === apiSimLockStauts.SimLockEnable) {
return DISCONNECT_TYPE.DIS_SIMLOCK;
}
return null;
}
function getOtherPage() {
var monitoringStatus = {};
var connectMode = '0';
getAjaxData('api/monitoring/status',
function ( ret ) {
monitoringStatus = ret.response;
},
{ sync: true});
getAjaxData('api/dialup/connection',
function ( ret ) {
if (ret.type === 'response') {
connectMode = ret.response.ConnectMode;
}
},
{ sync: true});
if ( GLOBAL.modules.celllock_enabled === '1' ) {
if ( CONST.CELLLOCK_STATUS_LOCKED === apiCelllockStatus.celllockStatus
&& monitoringStatus === '901') {
return DISCONNECT_TYPE.DIS_CELLLOCK;
}
}
if ( monitoringStatus['ConnectionStatus'] === '901') {
return null;
}
if (CONST.MACRO_NO_SIM_CARD === apiPinStatus.SimState) {
return DISCONNECT_TYPE.DIS_NOCARD;
}
if (connectMode === '1') {
return DISCONNECT_TYPE.DIS_MANNAL_DIAL;
}
if ( typeof GLOBAL.modules['dataswitch_enabled'] !== 'undefined' ) {
var connectstatus = parseInt(monitoringStatus['ConnectionStatus'], 10);
var errCodeParaErr = [2, 3, 5, 8, 20, 21, 23, 27, 28, 29, 30, 31, 32, 33, 65538, 65539, 65567, 65568, 131073, 131074, 131076, 131078];
if ( $.inArray(connectstatus, errCodeParaErr) !== -1 ) {
return DISCONNECT_TYPE.DIS_PROFILE_ERR;
}
var errCodeNetWorkUnvisiable = [7, 11, 14, 37, 131079, 131080, 131081, 131082, 131083, 131084, 131085, 131086, 131087, 131088, 131089 ];
if ( $.inArray(connectstatus, errCodeNetWorkUnvisiable) !== -1 ) {
return DISCONNECT_TYPE.DIS_NETWORK_UNVISIBLE;
}
var errCodeSingalPoor = [905];
if ( $.inArray(connectstatus, errCodeSingalPoor) !== -1 ) {
return DISCONNECT_TYPE.DIS_SINGLE_POOR;
}
var errCodeTrafficExceed = [201];
if ( $.inArray(connectstatus, errCodeTrafficExceed) !== -1 ) {
return DISCONNECT_TYPE.DIS_STATISTIC_OVER;
}
var errCodeRoam = [12, 13];
if ( $.inArray(connectstatus, errCodeRoam) !== -1 ) {
return DISCONNECT_TYPE.DIS_ROAM_NETWORK;
}
var errCodeRoamDialDisable = [113, 114];
if ( $.inArray(connectstatus, errCodeRoamDialDisable) !== -1 ) {
if ( parseInt( monitoringStatus['RoamingStatus'], 10) === 1 ) {
return DISCONNECT_TYPE.DIS_ROAMDIAL_DISABLE;
}
}
}
var connectType;
if (typeof monitoringStatus.CurrentNetworkTypeEx !== 'undefined' && monitoringStatus.CurrentNetworkTypeEx !== '') {
connectType = monitoringStatus.CurrentNetworkTypeEx;
} else {
connectType = monitoringStatus.CurrentNetworkType;
}
if ( connectType === '0'
|| monitoringStatus.CurrentServiceDomain === '0'
|| monitoringStatus.ServiceStatus !== '2' ) {
return DISCONNECT_TYPE.DIS_NO_SERVER;
}
return DISCONNECT_TYPE.DIS_OTHER;
}
function redirectOnCondition(prefix, postfix, savePage, isOrigin) {
loadData();
var post = '';
if ( postfix ) {
post = '?' + xss(postfix);
}
if ( GLOBAL.config.special_redirect === '0' ) {
return false;
}
if ( window.location.search.indexOf('noredirect') !== -1 ) {
return false;
}
var hasSim = (apiPinStatus.SimState !== CONST.MACRO_NO_SIM_CARD) ? true : false;
var hasCradle = (GLOBAL.modules.cradle_enabled === '1' && apiCradleStatus.cradlestatus === '1') ? true : false;
if (isOrigin && typeof GLOBAL.modules.dualwan_enable !== 'undefined' && GLOBAL.modules.dualwan_enable === '1' && hasSim && hasCradle) {
var dualConnectRes = dualConnectResFun();
var isconnectUmts = dualConnectRes.isconnectUmts;
var isconnectEth = dualConnectRes.isconnectEth;
if (isconnectUmts || isconnectEth) {
EMUI.LoginStateController.load(null, false);
if (GLOBAL.deviceInfo.restore_default_status === '1') {
gotoPageWithoutHistory('guide.html?noredirect');
} else {
if (EMUI.LoginStateController.loginState !== '0') {
gotoPageWithoutHistory(GLOBAL.INDEX_NO_SIMREDIRECT_PAGE_URL);
} else {
gotoPageWithoutHistory(GLOBAL.HOME_PAGE_URL);
}
}
return true;
}
}
var ethPage = getEthPage();
if (savePage !== 'eth' && ethPage !== null) {
gotoPageWithoutHistory('redirectdisconnect.html' + post + ethPage);
return true;
}
var simPage = getSimPage();
if ( simPage !== null ) {
var needReload = window.location.href.indexOf('redirectdisconnect.html') !== -1;
gotoPageWithoutHistory('redirectdisconnect.html' + post + simPage);
if ( needReload ) {
location.reload();
}
return true;
}
return false;
}
function getOnekeyEthErr(){
var onekeyethinfo = {};
getAjaxData('api/monitoring/onekey_diag',
function ( ret ) {
onekeyethinfo = ret.response;
},
{ sync: true});
if(onekeyethinfo.ethdialup_err === '1'){
return DISCONNECT_TYPE.DIS_ETHDIALUPERRONE;
}
if(onekeyethinfo.ethdialup_err === '2'){
return DISCONNECT_TYPE.DIS_ETHDIALUPERRTWO;
}
if(onekeyethinfo.ethdialup_err === '3'){
return DISCONNECT_TYPE.DIS_ETHDIALUPERRTHREE;
}
if(onekeyethinfo.ethdialup_err === '4'){
return DISCONNECT_TYPE.DIS_ETHDIALUPERRFOUR;
}
if(onekeyethinfo.ethdialup_err === '5'){
return DISCONNECT_TYPE.DIS_ETHDIALUPERRFIVE;
}
if(onekeyethinfo.ethdialup_err === '6'){
return DISCONNECT_TYPE.DIS_ETHDIALUPERRSIX;
}
if(onekeyethinfo.ethdialup_err === '7'){
return DISCONNECT_TYPE.DIS_ETHDIALUPERRSEVEN;
}
}
function dualConnectResFun() {
var dualConnectRes = {};
var ethaccesstypeEth = [];
var ethaccesstypeUmts = [];
for (var i = 0; i < apiwanpathinfoStatus.wanpaths.wanpath.length; i++) {
if (apiwanpathinfoStatus.wanpaths.wanpath[i].AccessType === 'umts') {
ethaccesstypeUmts.push(apiwanpathinfoStatus.wanpaths.wanpath[i].WanPathStatusV4);
ethaccesstypeUmts.push(apiwanpathinfoStatus.wanpaths.wanpath[i].WanPathStatusV6);
} else {
ethaccesstypeEth.push(apiwanpathinfoStatus.wanpaths.wanpath[i].WanPathStatusV4);
ethaccesstypeEth.push(apiwanpathinfoStatus.wanpaths.wanpath[i].WanPathStatusV6);
}
}
dualConnectRes.isconnectUmts = (ethaccesstypeUmts.indexOf('connected') !== -1) ? true : false;
dualConnectRes.isconnectEth = (ethaccesstypeEth.indexOf('connected') !== -1) ? true : false;
return dualConnectRes
}
function dualConnectResPage(hasSim, hasCradle, dualConnectRes) {
var isconnectUmts = dualConnectRes.isconnectUmts;
var isconnectEth = dualConnectRes.isconnectEth;
if (!hasSim && hasCradle) {
if (!isconnectEth) {
redirectPage = getEthPage();
if (redirectPage !== null) {
return redirectPage;
}
redirectPage = getOnekeyEthErr();
if (redirectPage !== null) {
return redirectPage;
}
}
} else if ((hasSim && !hasCradle && !isconnectUmts) || (!hasSim && !hasCradle)) {
redirectPage = getSimPage();
if (redirectPage !== null) {
return redirectPage;
}
redirectPage = getOtherPage();
if (redirectPage !== null) {
return redirectPage;
}
} else {}
return null;
}
function disconnectRedirect() {
loadData();
var hasSim = (apiPinStatus.SimState !== CONST.MACRO_NO_SIM_CARD) ? true : false;
var hasCradle = (GLOBAL.modules.cradle_enabled === '1' && apiCradleStatus.cradlestatus === '1') ? true : false;
if (typeof GLOBAL.modules.dualwan_enable !== 'undefined' && GLOBAL.modules.dualwan_enable === '1' && (!hasSim || !hasCradle)) {
var dualConnectRes = dualConnectResFun();
var redirectPage = dualConnectResPage(hasSim, hasCradle, dualConnectRes);
if (redirectPage !== null) {
return redirectPage;
}
return null;
} else {
var redirectPage = getEthPage();
if ( redirectPage !== null ) {
return redirectPage;
}
redirectPage = getSimPage();
if ( redirectPage !== null ) {
return redirectPage;
}
redirectPage = getOtherPage();
if ( redirectPage !== null ) {
return redirectPage;
}
}
return null;
}
function checkRedirectHash( hash ) {
for (i in DISCONNECT_TYPE) {
var temphash = DISCONNECT_TYPE[i];
var hashbegin = DISCONNECT_TYPE[i].indexOf('#');
if ( hashbegin !== -1 ) {
temphash = temphash.substr(hashbegin);
}
if ( temphash === hash) {
return true;
}
}
return false;
}
function simRedirect(prefix, postfix){
loadData();
var redirectpage = '';
var url_prefix = "";
var pageName = "#" + postfix + "_page ";
if ("string" == typeof(prefix)) {
url_prefix = prefix;
}
if("string" == typeof(postfix)) {
postfix = "?" + postfix;
} else {
postfix="";
}
$(".pin_unuseable").empty();
if ((CONST.MACRO_NO_SIM_CARD === apiPinStatus.SimState) || (CONST.MACRO_CPIN_FAIL === apiPinStatus.SimState)) {
$(".pin_unuseable").show();
$(".pin_unuseable").secureHtml('
@abhi093 do you have adb and telnet active on the firmware?
@abhi093 do you have adb and telnet active on the firmware?
@moshriq how to activate it in H112-373 firmware ??
@abhi093 did you check if they are already active?
if not your best option is using a mod firmware it will have telnet & adb active by default
I have tried this https://www.youtube.com/watch?v=_U2zB_II0SU (as @mucke5 mentioned) and it did work but I have tested it on a different model than H112-373
@moshriq I tried telnet on Putty to H112-372 . It didn't work.
@moshriq I will try the steps given in youtube in your post
@abhi093 the script in the video will not work for you you first need to figure how to activate telnet and adb
telnet maybe can be activated using API (hope @pearlxcore could give some insight) but your best bet is to use mod firmware it will work with the adb script on the video
@pearlxcore @moshriq yes, telnet is not enabled for me. Please help to enable telnet in the firmware
@moshriq do you know where to download mod firmware for h112-372 ??
Just to add here, there actually exists a celllock.js when you browse http://192.168.8.1/js/celllock.js, though haven't figured out how to use it.
@ariscruz for me the output is below
100003
@abhi093 , I think you have to login to your router first

@pearlxcore I am amazed at the new software. Really great improvement +1
Maybe these firmwares are helpful in analysing or implementing additional features in your great tool: Huawei 5G CPE Pro (H112-372) Here is a firmware file for the Huawei 5G CPE Pro (H112-372) as a download, I'm looking forward to lock the Cell ID:
https://we.tl/t-Og2mlokJ37
The link for the fimrware download has expired. Please could you re-post a new link to download the firmware file for the Huawei 5G CPE Pro (H112-372). Thank you