Giter Site home page Giter Site logo

itpcc / nb-iot-cellular-logger Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 15 KB

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

License: MIT License

C++ 36.11% HTML 33.15% Python 28.11% C 2.63%
arduino python nb-iot cellular-network gps

nb-iot-cellular-logger's Introduction

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 ".

Device_code

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

Hardware

Pinout

GPS Arduino
GND GND
VCC 5V
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.

Setup

  • 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.

Server

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.

Installation

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

Usage

UDP server

python UDPServer.py

Processing to JSON file

python processFile.py | tee <JSON File name>.json

Display

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

Installation

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

Disclaimer

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

nb-iot-cellular-logger's People

Contributors

itpcc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kteerin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.