Skip to content
pearlxcore edited this page Feb 16, 2020 · 8 revisions

HiLink API

Table of Contents

  1. General instructions
  2. API pages - Requests and Responses
  3. API usage
  4. Error numbers
  5. Other
    • Modification of WebUI files on the example of unlocking Polish in a configuration file
    • Automatic PIN administration - modification of the autorun.sh script
    • List of configuration pages on the HiLink device
    • List of JavaScript files
  6. Sources of Knowledge

1. General instructions

The HiLink API can be divided into two variants:

  1. Information option: This variant usually requires downloading ( GET ) the appropriate page from the modem ( http://hi.link or http://192.168.8.1 ). That is, getting a response right away.
  2. Control / configuration variant: It requires sending ( POST ) the request with the address of the appropriate page to the modem. In response to a successful response, we usually receive - OK .

The information variant and control variant usually have the same addresses.

Some versions of the software may require a valid token to verify the session (I did not find any information when the token changes, the token can be disabled by editing configuration files)

As far as I was able to determine this HiLink software is unified. This means that, for example, the HiLink modem contains the same WebUI files as the HiLink router and vice versa. Of course, this does not mean that we turn on, for example, WiFi. Some API pages are blocked by hardware or configuration files.

The following list of API addresses is based on JavaScript files contained in the modified WebUI for the E3372s-153 modem. From the same files are specified requests and responses. The answers below are supplemented in a few cases based on the responses of the E3372s-153 modem.

The list has been sorted alphabetically by module name to which the API data refers.

2. API pages - Requests and Responses

Cradle module

Getting basic information about cradle (?)

<response>
<connectionmode></connectionmode>
<pppoeuser></pppoeuser>
<pppoepwd></pppoepwd>
<dialmode></dialmode>
<maxidletime></maxidletime>
<pppoemtu></pppoemtu>
<dynamicipmtu></dynamicipmtu>
<ipaddress></ipaddress>
<netmask></netmask>
<gateway></gateway>
<primarydns></primarydns>
<secondarydns></secondarydns>
<staticipmtu></staticipmtu>
<dynamicsetdnsmanual></dynamicsetdnsmanual>
<dynamicprimarydns></dynamicprimarydns>
<dynamicsecondarydns></dynamicsecondarydns>
</response>
  • Comments:
    • pppoeuser , pppoepwd cannot contain some characters, so you must replace them by the formula:
      • ' & ' - ' & amp; '
      • " ' " -' & apos; '
      • ' " ' - ' & quot; '
      • ' < ' - ' & lt; '
      • ' > ' - ' & gt; '
    • connectionmode:
      • 0 - automatic
      • 1 - PPPoE + Dynamic IP address
      • 2 - PPPoE
      • 3 - Dynamic IP address
      • 4 - Static IP address
      • 5 - LAN only
    • dialmode:
      • 0 - automatic
      • 1 - On request

Cradle network settings (?)

    <request>
    <connectionmode></connectionmode>
    <pppoeuser></pppoeuser>
    <pppoepwd></pppoepwd>
    <dialmode></dialmode>
    <maxidletime></maxidletime>
    <pppoemtu></pppoemtu>
    <dynamicipmtu></dynamicipmtu>
    <ipaddress></ipaddress>
    <netmask></netmask>
    <gateway></gateway>
    <primarydns></primarydns>
    <secondarydns></secondarydns>
    <staticipmtu></staticipmtu>
    <dynamicsetdnsmanual></dynamicsetdnsmanual>
    <dynamicprimarydns></dynamicprimarydns>
    <dynamicsecondarydns></dynamicsecondarydns>
    </request>
  • reply:
    <response>OK</response>
  • Comments:
    • pppoeuser , pppoepwd cannot contain some characters, so you must replace them by the formula:
      • ' & ' - ' & amp; '
      • " ' " -' & apos; '
      • ' " ' - ' & quot; ',
      • ' < ' - ' & lt; '
      • ' > ' - ' & gt; '
    • connectionmode:
      • 0 - automatic
      • 1 - PPPoE + Dynamic IP address
      • 2 - PPPoE
      • 3 - Dynamic IP address
      • 4 - Static IP address
      • 5 - LAN only
    • dialmode:
      • 0 - automatic
      • 1 - On request

Set the device's MAC address

    <request>
    <currentmac>00:00:00:00:00:00</currentmac>
    </request>
  • reply:
    <response>OK</response>
  • Notes: none

Get information about the factory MAC address of the device

    <response>
    <factorymac></factorymac>
    </response>
  • Notes: none

Getting information about MAC addresses

    <response>
    <currentmac></currentmac>
    <hostmac></hostmac>
    </response>
  • Notes: none

Get cradle status information (?)

    <response>
    <cradlestatus></cradlestatus>
    <connectstatus></connectstatus>
    <connectionmode></connectionmode>
    <currenttime></currenttime>
    <ipaddress></ipaddress>
    <netmask></netmask>
    <gateway></gateway>
    <primarydns></primarydns>
    <secondarydns></secondarydns>
    </response>
  • Comments:
    • connectstatus:
      • 900 - connecting
      • 901 - connected
      • 902 - disconnected
      • 903 - disconnection
      • 904 - connection error
      • 905 - no PPPoE account
      • 906 - incorrect PPPoE account
    • connectionmode:
      • 0 - automatic
      • 1 - PPPoE + Dynamic IP address
      • 2 - PPPoE
      • 3 - Dynamic IP address
      • 4 - Static IP address
      • 5 - LAN only

DDNS module

Download DNS list download

    <response>
    <ddnss>
    <ddns>
    <index></index>
    <provider></provider>
    <status></status>
    <domainname></domainname>
    <username></username>
    <password></password>
    </ddns>
    <ddns>
    ...
    </ddns>
    ...
    </ddnss>
    </response>
  • Notes: none

DNS setup

    <request>
    <ddnss>
    <ddns>
    <index></index>
    <provider></provider>
    <status></status>
    <domainname></domainname>
    <username></username>
    <password></password>
    </ddns>
    <ddns>
    ...
    </ddns>
    ...
    </ddnss>
    </request>
  • reply:
    <response>OK</response>
  • Notes: none

Device module

Checking for new version availability?

    <response>
    <Version>22.001.25.00.03</Version>
    </response>
    Notes: none 

Basic information

    <response>
    <productfamily>LTE</productfamily>
    <classify>hilink</classify>
    <multimode>0</multimode>
    </response>
  • Comments:
    • productfamily:
      • 1 or CDMA - CDMA mode
      • 2 or WCDMA or LTE - WCDMA / LTE mode
    • multimode:
      • 1 - single mode?
      • 2 - multi mode?

Retrieve the path of the event logging file

    <response>
    <LogPath>http://192.168.8.1/FS:/app/webroot/data/userdata/device/WebApp.zip</LogPath>
    </response>
  • Notes: none

Modem restart, configuration restore, configuration backup, device shutdown

    <request>
    <Control></Control>
    </request>
  • reply:
    <response>OK</response>
  • Comments:
    • Control:
    • 1 - device restart
    • 1 2 - configuration restoration (no information on how to provide the file with the saved configuration. Maybe it uses the file http://192.168.8.1/nvram.bak )
    • 1 3 - configuration backup (configuration is available at http://192.168.8.1/nvram.bak . File is with base64 encoding)
    • 1 4 - turning off the device

Checking the status of the device quick start mode

    <response>
    <fastbootswitch></fastbootswitch>
    </response>
  • Notes: none

Set the device's quick start status

    <request>
    <fastbootswitch></fastbootswitch>
    </request>
  • reply:
    <response>OK</response>
  • Notes: none

Device Information

    <response>
    <DeviceName>E3372</DeviceName>
    <SerialNumber>L8FBY14926014416</SerialNumber>
    <Imei>866133021233764</Imei>
    <Imsi>260060064970338</Imsi>
    <Iccid>89480610500149703380</Iccid>
    <Msisdn></Msisdn>
    <HardwareVersion>CL1E3372SM Ver.A</HardwareVersion>
    <SoftwareVersion>22.286.53.01.161</SoftwareVersion>
    <WebUIVersion>16.100.05.00.03</WebUIVersion>
    <MacAddress1>00:0D:87:8E:4B:AC</MacAddress1>
    <MacAddress2></MacAddress2>
    <ProductFamily>LTE</ProductFamily>
    <Classify>hilink</Classify>
    <supportmode>LTE|WCDMA|GSM</supportmode>
    <workmode>LTE</workmode>
    </response>
  • Notes: none

Switching the modem into debug / NDIS mode

    <request>
    <mode>1</mode>
    </request>
  • reply:
    <response>OK</response>
  • Notes: With the modem plugged into the router, the internet connection will disappear when you turn on debug mode.
    • mode:
      • 0 - project mode (normal operation?)
      • 1 - debug / NDIS mode (access to serial ports)

Download event logging file settings

    <response>
    <Where>2</Where>
    <Size>1000</Size>
    <Modules>
    <Module>
    <name>ats</name>
    <desc>AT Server</desc>
    <mask>0</mask>
    <file></file>
    </Module>
    <Module>
    ...
    </Module>
    ...
    </Modules>
    </response>
  • Notes: none

Event logging file settings

    <request>
    <Where>2</Where>
    <Size>1000</Size>
    <Modules>
    <Module>
    <name>ats</name>
    <desc>AT Server</desc>
    <mask>0</mask>
    <file></file>
    </Module>
    <Module>
    ...
    </Module>
    ...
    </Modules>
    </request>
  • reply:
    <response>OK</response>
  • Notes: none

Checking the status of the energy saving mode

    <response>
    <powersaveswitch></powersaveswitch>
    </response>
  • Notes: none

Setting the power saving mode status

    <request>
    <powersaveswitch></powersaveswitch>
    </request>
  • reply:
    <response>OK</response>
  • Notes: none

Signal parameters

    <response>
    <pci>40</pci>
    <sc></sc>
    <cell_id>2123610</cell_id>
    <rsrq>-6dB</rsrq>
    <rsrp>-91dBm</rsrp>
    <rssi>-71dBm</rssi>
    <sinr>14dB</sinr>
    <rscp></rscp>
    <ecio></ecio>
    <mode>7</mode>
    </response>
  • Notes: none

Checking the USB tethering module status

    <response>
    <tetheringswitch></tetheringswitch>
    </response>
  • Notes: none

Checking USB tethering status

    <response>
    <tethering></tethering>
    </response>
  • Notes: none

Set USB tethering status

    <request>
    <tethering></tethering>
    </request>
  • reply:
    <response>OK</response>
  • Notes: none

DHCP module

Get DHCP settings

    <response>
    <DhcpIPAddress>192.168.8.1</DhcpIPAddress>
    <DhcpLanNetmask>255.255.255.0</DhcpLanNetmask>
    <DhcpStatus>1</DhcpStatus>
    <DhcpStartIPAddress>192.168.8.100</DhcpStartIPAddress>
    <DhcpEndIPAddress>192.168.8.200</DhcpEndIPAddress>
    <DhcpLeaseTime>86400</DhcpLeaseTime>
    <DnsStatus>1</DnsStatus>
    <PrimaryDns>192.168.8.1</PrimaryDns>
    <SecondaryDns>192.168.8.1</SecondaryDns>
    </response>
  • Comments:
    • DhcpStatus:
      • 0 - DHCP server off
      • 1 - DHCP server enabled
      • DhcpLeaseTime: release time must be between 86400 and 604800 . The default is 86400 .

DHCP setting

    <request>
    <DhcpIPAddress></DhcpIPAddress>
    <DhcpLanNetmask></DhcpLanNetmask>
    <DhcpStatus></DhcpStatus>
    <DhcpStartIPAddress></DhcpStartIPAddress>
    <DhcpEndIPAddress></DhcpEndIPAddress>
    <DhcpLeaseTime></DhcpLeaseTime>
    <PrimaryDns></PrimaryDns>
    <SecondaryDns></SecondaryDns>
    </request>
  • reply:
    <response>OK</response>
  • Comments:
    • DhcpStatus:
      • 0 - DHCP server off
      • 1 - DHCP server enabled
      • DhcpLeaseTime: release time must be between 86400 and 604800 . The default is 86400 .