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.
- Arduino Uno
- DEVIO NB-SHIELD I
- GlobalTop FGPMMOPA6C GPS Standalone Module or GPS Standalone Module with NMEA sentence Serial interface.
DEVIO NB-SHIELD I, you can just stack up with Arduino Uno or Other pin-compatible microcontroller board.
Please avoid using pin
9, because they were used by
DEVIO NB-SHIELD I via AltSoftSerial library to interface with Arduino.
However, if you really want to change
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:
- Change the following variables in
<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
UDPserver.py as a server script to receive data from the device and save data to Firebase's firestore.
processFile.py 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
- Get Firebase's firestore credential JSON file. and rename to
firebase-credential.jsonand place at the same folder that
- If you don't want to use port 8005 as your UDP port, set
Processing to JSON file
python processFile.py | 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_KEYto your API key.
result.json(JSON file processed with
processFile.py) at the same folder that
- Just open
This mini-project is an independent project. Neither funded nor cooperate with ADVANCED INFO SERVICE PLC.