Code Monkey home page Code Monkey logo

slippymesh's Introduction

Slippy Mesh

A lightweight lora mesh network written in c++

Discord GitHub Repo stars

Goals

  • Arduino Mega Compatable
  • Flooded mesh networking
  • Routed mesh networking
  • API for external programs
  • Encryption
  • More to come

Usage

To send a message to everyone open your serial and type

send 0xFFFFFFFF "hello world"

Commands

Help

Gets a list of commands

help

Send

Sends a messsage to the target address

send <address> <message>

Examples

sendex 0x01234567 "hello"

Sends a message to 0x01234567

sendex 0xFFFFFFFF "hello everyone"

Sends a message to everyone

Send Ex

Sends a message to the target address with some extra options

sendex <address> <message> <type> <service> <flags>

Examples

sendex 0x01234567 "hello" 0 0 0b00000000

Sends a message to 0x01234567 (same as 'send 0x01234567 "hello"')

sendex 0x01234567 "ping" 0 1 0b00000000

Sends a remote command to 0x01234567

sendex 0xFFFFFFFF "hello everyone" 0 0 0b00000000

Sends a message to everyone (same as 'send 0xFFFFFFFF "hello everyone"')

sendex 0xFFFFFFFF "hello neighbors" 0 0 0b10000000

Sends a message to neighboring nodes

Send 64

Sends a message to the target address with some extra options and base64

send64 <address> <base64> <type> <service> <flags>

Example

send64 0x01234567 "aGVsbG8=" 0 0 0b00000000

Sends a message to 0x01234567 (this is sendex with base64)


Remote commands

To send a remote command you need to use sendx

sendex <address> "<command> <args>" 0 1 0b00000000

Default commands

ping

Will return "pong"

uptime

Will return the nodes uptime in "HH:MM:SS"


Adding your own remote commands

In src/commands.cpp create a function called rcmd_yourcommandname

void rcmd_yourcommandname(MyRemoteCommandParser::Argument *args, char *res) {
    char* response = "hello world";
    strlcpy(res, response, MyRemoteCommandParser::MAX_RESPONSE_SIZE);
}

Then add this at the bottom of void registerRemoteCommands() {}

remoteParser.registerCommand("yourcommandname", "", &rcmd_yourcommandname);

Lastly add this before #endif in src/commands.h

void rcmd_yourcommandname(MyRemoteCommandParser::Argument *args, char *res);

External Programs

slippymesh's People

Contributors

wattlefoxxo avatar

Stargazers

 avatar  avatar

Watchers

 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.