Skip to content

Provide a dashboard to view the data obtained from AT command via ModemManager on LTE modem

License

Notifications You must be signed in to change notification settings

wicadmin/LTE-Modem-Dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

** NOTICE **

This branch contains the original dashboard based on Google's now defunct Fusion Tables. Please see the work in progress for the new dashboard here

LTE Modem Dashboard

The following will describe the method used and explain how to setup and use this utility to get a dashboard to view the modem status of an LTE modem installed on a device/system that has ModemManager.

With little customization, it can be adopted to work without ModemManger if you have another way of getting access to the modem via AT commands. (This will not be explained as it is not the focus of this utility)

The utlity is also geared towards a system running OpenWrt/LEDE with LuCI - however it is optional.

The design was focus on not storing data on the device but on cloud storage and not having special utilities locally to graph the data. It utilizes Google Fusion tables to store data and Google Visualization to provide the graphs.

The other focus on the design was to use the fewest number of pieces (files) on the system. Apart from the 3rd party utility used to interact with Google Fusion tables, there are only three files required:

  • getModemData.sh - this queries the modem via ModemManager's mmcli utility to get modem data and insert into your Google Fusion table
  • stopModemData.sh - this is optional. It is used for LuCI custom command to stop the collection of modem data.
  • ms.html - this is used to provide the dashboard. It queries the Google Fusion table and graphs the data. This file can actually be hosted on any system.

Prereqs

  1. If using ModemManager, start it in Debug mode
  2. Have Bash shell installed

Setup

Fusion Table

  1. The first thing you'll want to do is get your Google Fusion table created. If you are not familiar with this, please refer to this video for reference.

YouTube video

  1. Create a schema with these columns:

Schema

  • All columns except DATE are of:

Number Columns

  • DATE column is:

Date Column

  1. Make the table accessible for reading without having to use OAuth by Sharing it with Anyone who has the link can view rights.

  2. Note down your Table ID.

Fusion Table API

  1. Now, we need a utlity to populate the Fusion Table we get from the modem. To do so, we'll use this utility. We only need to get the ftapi folder. Infomation on how to setup the credential and other access can be found in it's README.html file (which you'll want to view in a browser after downloading).
  2. You'll want to also incorporate this PR.
  3. Place the ftapi folder and all its content in /root/

Get Modem Data

  1. Simply place the getModemData.sh file in /root/ftapi/
  2. Make it executable (if required) by issuing chmod +x /root/ftapi/getModemData.sh
  3. Open getModemData.sh and replace <YOUR_TABLEID> with the Table ID of your table noted down in Step 4 of the first setup section.
  4. OPTIONAL - If you want to run this everytime your system starts, put the following line in /etc/rc.local just before exit 0
  • /root/ftapi/getModemData.sh &

Dashboard

  1. Place the file ms.html into /www/
  2. If required, give the file these permission chmod 644 /www/ms.html
  3. Open /www/ms.html and replace (around line 14) <YOUR_TABLEID> with the Table ID of your table noted down in Step 4 of the first setup section.

OPTIONAL - Using LuCI Custom Commands to Start and Stop the collection of data.

  1. First, you'll need to put stopModemData.sh into /root/ftapi/ (Can be placed in another location if so desired)
  2. Make it executable (if required) by issuing chmod +x /root/ftapi/stopModemData.sh
  3. Go to LuCI Custom Commands section of the modem UI, and enter these:
  • To Start:

Start

  • To Stop:

Stop

  1. Press RUN on the Start script

Access Dashboard

The dashboard can be viewed at https://<modem hostname, dns, ip>/ms.html

Dashboard

Issues

  • Google does have API limits that may come into play. I believe they are 25,000 per day and 200 every 100 seconds.

To DOs

  • Display current band
  • Mobile friendly/responsive UI
  • Prune table

About

Provide a dashboard to view the data obtained from AT command via ModemManager on LTE modem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published