This mini-project is for test using `DEVIO NB-SHIELD I` and AIS NB-IoT network by logging cellular information with the GPS coordinate.
Switch branches/tags
Nothing to show
Clone or download
Latest commit e8e3729 May 11, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
Device_code Split files to easier display on the blog. May 11, 2018
Display Original code May 11, 2018
Server Original code May 11, 2018
.gitignore Original code May 11, 2018
LICENSE Initial commit May 11, 2018 Update May 11, 2018

AIS NB Cellular tower logger

This mini-project is for test using DEVIO NB-SHIELD I and AIS NB-IoT network by logging cellular information with the GPS coordinate.

You can read the full article about this mini-project at Article "รีวิว DEVIO NB-Shield I และ Mini-project: Cellular Tower logger ".


This is a code for programming device to transmite data (including Cellular tower ID and GPS coordinate) to the server.



GPS Arduino
TxD 11 (MOSI)
RxD 12 (MISO)

For DEVIO NB-SHIELD I, you can just stack up with Arduino Uno or Other pin-compatible microcontroller board.

Please avoid using pin 8 and 9, because they were used by DEVIO NB-SHIELD I via AltSoftSerial library to interface with Arduino.

However, if you really want to change TxD and RxD port, please check NeoSWSerial document to check the support pins. And, don't forget pin number in the line #21.


  • Install Arduino
  • Install following library:
    • AIS_NB_BC95. (This is forked version from AIS-DeviceInnovation to enable get Cellular tower information.)
    • NeoSWSerial. (This is for GPS serial interface)
  • Change the following variables in Device_code.ino:
    • <UDP_SERVER_IP> Your UDP Public-accessible server IP address.
    • <UDP_SERVER_PORT> Your UDP Public-accessible server port.
  • Compile and upload the code to your Arduino Uno.

You can monitor/debug via USB Serial at 9600 baud.


For a simeple UDP server, you can use as a server script to receive data from the device and save data to Firebase's firestore. is for process raw data from Firebase's firestore to processed data for displaying on the map.


  • Install Python 3.4+
  • Run the following command:
pip install asyncio firebase_admin


UDP server


Processing to JSON file

python | tee <JSON File name>.json


Just a static file to display a map from the observation. :/


  • Get Google map API key and change YOUR_API_KEY to your API key.
  • Place result.json (JSON file processed with at the same folder that live
  • Just open


This mini-project is an independent project. Neither funded nor cooperate with ADVANCED INFO SERVICE PLC.