Skip to content

zayigo/FastMileScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastMileScraper

Scraper for Nokia FastMile 4G Modems/Routers
Report Bug · Request Feature


Table of Contents
  1. About
  2. Getting Started
  3. Usage
  4. Examples
  5. Roadmap
  6. License

About

FastMile 4G mounted on a pole

This library is meant to be used with the Nokia FastMile 4G line of outdoor modems/routers.

It can parse the data provided from the status.php page, no credentials required.

You can choose to use the example code provided in the main.py file to get a JSON-formatted output with all the information currently available or import the fastmile.py library in your own project.

Disclaimer

At the moment no credentials are needed for this library to work but that might change in the future, do not ask for them if you own an isp-locked modem. Google is your friend.

Getting Started

Prerequisites

To install the required libraries you can use pipenv or pip.

  • with pipenv
    pipenv install
  • with pip
    pip install -r requirements.txt

A working connection to the modem's management interface (by default https://192.168.0.1/status.php) it's needed.

Status page

If you use bridge mode, you will need to create an APN in "router mode" on a different VLAN.

Compatibility

At this time this library has been tested with the following models and software versions:

  • Nokia Fastmile 4G17-A
    • FASTMILE2_D020111B90T0101M01E0130S

Feel free to open an issue or contact me at info@nlab.pw to expand this list.

Manual and FCC Reports

If you would like to dive deeper in the FastMile 4G lineup of products, the FFC published the user manual and datasheets:

you can also read the full reports:

Usage

You can use the provided example (main.py) to get all the available information.

python3 main.py -h
usage: main.py [-h] [-H HOST] [-t TIMEOUT]

Nokia FastMile API

optional arguments:
  -h, --help            show this help message and exit
  -H HOST, --host HOST  Modem hostname or IP address (default: 192.168.0.1)
  -t TIMEOUT, --timeout TIMEOUT
                        Connection timeout (default: 30)

Alternatively you can use the provided library in your own projects.

from fastmile import FMScraper

scraper = FMScraper(host="192.168.0.1", timeout=30)

scraper.download()

print(scraper.get_apns())

Examples

Hardware and software info

"info": {
  "model": "ODU - Multiband - 4G17-A", // Model
  "sw_version": "FASTMILE2_D020111B90T0101M01E0130S", // Software version
  "serial_number": "FSHxxxxxxxxx", // Serial numberi
  "imei": "xxxxxxxxxxxxxxx", // IMEI 
  "imsi": "xxxxxxxxxxxxxx", // IMSI
  "mac": "0C:7C:28:xx:xx:xx", // MAC Address of the ethernet interface
  "lock_status": "Normal" // Unknown, maybe related to SIM PIN code?
}

APNs and IP

If you are behind CG-NAT the IP will be "internal" one.

"apns": [
  {
    "name": "internet.wind.mnc088.mcc222.gprs", // APN hostname
    "ipv4": "10.16.231.61", // IPv4 provided by the APN
    "ipv6": null // IPv6 provided by the APN
  },
  {
    "name": "internet.it.mnc088.mcc222.gprs",
    "ipv4": "10.10.95.146",
    "ipv6": null
  }
]

Traffic on LTE and Ethernet interfaces

"data": {
  "eth": {  // Traffic since the last boot
    "download": {
      "val": 12.73,
      "unit": "GB",
      "val_gb": 12.73 // initially the traffic is displayed in MB
    },
    "upload": {
      "val": 451.2,
      "unit": "MB",
      "val_gb": 0.4512
    }
  },
  "lte": {  // Should be the same of the ethernet interface, just reversed
    "download": {
      "val": 451.2,
      "unit": "MB",
      "val_gb": 0.4512
    },
    "upload": {
      "val": 12.7,
      "unit": "GB",
      "val_gb": 12.7
    }
  }
}

Carrier aggregation status

"ca": {
  "enb": xxxxx, // Current eNodeB 
  "cid": xx, // CID of the primary band
  "dl_bands": [ // Bands used for download, first one is primary
    1,
    7,
    3
  ],
  "ul_bands": [ // Bands used for upload, first one is primary
    1,
    7
  ]
}

Active cells signal

"active": [
  {
    "pci": 197, // Physical Cell Id
    "earfcn": 3350, // E-UTRA Absolute Radio Frequency Channel Number
    "rsrp": -65, // Reference Signal Received Power
    "rsrq": -9, // Reference Signal Received Quality
    "rssi": -31, // Received Signal Strength Indicator
    "sinr": 30, // Signal to Noise Ration
    "type": "secondary" // Primary or secondary in case of carrier-aggregation
  },
  ...
]

Available cells signal

Note: this is updated only when you press "Trigger Measurement" on the status page and temporarily stops internet connectivity

"available": [
  {
    "pci": 470,
    "earfcn": 150,
    "rsrp": -56,
    "rsqr": -14,
    "rssi": -31,
    "sinr": 30
  },
  ...
]

Roadmap

  • Test with different models and software versions
  • Test with carrier aggregation disabled
  • Estimate band from EARFCN
  • Add "Trigger Measurement" command
  • Add login and login-protected functions
    • Bands selection
    • PCI Lock
    • APN edit/add
    • Reboot

License

Distributed under the GNU General Public License v3.0. See LICENSE for more information.