Giter Club home page Giter Club logo

odotakflow's Introduction

odoTakFlow

Node-Red Flow to forward MQTT payload from odo to ATAK via multicast or TAKServer. (used in conjunction with Ampledatas node-red-contrib-tak)

node red flow

REQUIREMENTS:

-Node-Red Server installed on Pi

-node-red-contrib-tak

-node-red-contrib-gpsd

-GPS Module (USB or UART)

-GPSD Service installed

-Info on odo here: https://github.com/Red-Team-Alliance/Odo


SETUP NODE-RED:

-https://nodered.org/docs/getting-started/

-options include installing node-red on your local PC, a Raspberry Pi or similar single board computer or mini PC, deploying node-red on a cloud server or virtual private server (VPS), Docker Container, or local virtual environment. After installing node-red you should be able to go to the node-red dashboard at http://*nodeRedIPaddress:1880 you may have to open appropriate ports (1880) to allow devices to access the node-red dashboard.

-ensure you install the "node-red-contrib-tak" node. In Node-Red: Menu (3 horizontal lines) > Manage palette > Install > Search "node-red-contrib-tak" > Install > Install

-do the same for: node-red-contrib-gpsd


IMPORT .JSON FLOW TO NODE RED:

-in GitHub: click on "odoTakFlow.json" > click on the download icon "Download raw file" > note where the "odoTakFlow.json" file downloaded to, default is in your Downloads folder

-in Node-Red: click on menu icon (3 horizontal lines top right) > click on "Import" > click on "select a file to import" > go to Downloads folder and click on "odoTakFlow.json" > Upload > Import

ALTERNATIVELY..

-you can just copy the whole "odoTakFlow.json" code from GitHub and paste it into the Node-Red Import Clipboard.


MQTT IN NODE:

-configure the "mqtt in" node of the necessary subscribed topic and the authentication needed (if necessary).


SETUP GPSD:

$ sudo apt install gpsd gpsd-clients

$ ls /dev

-look at what tty device gets added after connecting your GPS Module. to test if gps data is getting sent you can do (replacing with your tty device)..

$ cat /dev/ttyACM0

-once you find the device you can place that device in gpsd config:

$ sudo nano /etc/default/gpsd

-config and add: DEVICES="/dev/ttyACM0" #replacing tty with your device***

-kill any existing gpsd services and manually start gpsd on your gps dev, then check gps status of gpsd

$ sudo killall gpsd

$ sudo gpsd /dev/ttyACM0 -F /var/run/gpsd.sock

$ cgps

-additionally you could restart, stop or start the gpsd service if needed at any point

$ sudo service gpsd restart


CONFIGURE MULTICAST ADDRESS TO INTERFACE:

-we need to add ATAKs multicast group 239.2.3.1 to send traffic to the appropriate network interface that is being used to host our AP

$ sudo ip route replace 239.2.3.1/32 via 192.168.42.1

-replace 192.168.42.1 with the ip address of your raspberry pi on the AP interface, you can check this using

$ ip addr show

-we now check to make sure that our multicast address is getting routed to our specified interface/gateway ip

$ ip route get 239.2.3.1

-should return something like: "multicast 239.2.3.1 dev wlan0 src 192.168.42.1 uid 0 cache " if 239.2.3.1 is getting routed to your AP interface (likely "wlan0") at your pi's AP IP address then we can add this command to start at boot since it will be wiped when the pi powers down.

$ sudo crontab -e

  • scroll down to the very bottom and add:

@reboot sudo ip route replace 239.2.3.1/32 via 192.168.42.1

-making sure to use your pis AP IP address

odotakflow's People

Contributors

jaxprojex avatar

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.