Git Product home page Git Product logo

particle-mesh-broadcast's Introduction

particle-mesh-broadcast

Example of how to broadcast messages received from the local WiFi over the local mesh network of Particle devices (using UDP).

How does it work?

This example consists of two parts:

  • mesh_sender - Sets up a simple UDP server running on port 8888 of your Argon device. It then forwards any incoming packet into the mesh network, broadcasting it to the multicast address ff03::1:1001 on UDP port 31313
  • mesh_listener - Runs on your end devices, and listens for UDP packets on port 31313 of the above multicast address. It prints the contents of any incoming packet to the Serial console

Running the example

You will need one Argon and one (or more) Xenon devices.

Flash mesh_sender to your Argon device, and mesh_listener to your Xenon device(s).

Then, connect one of your Xenon devices to the PC via USB, and monitor its serial port using the Particle CLI:

particle monitor --follow

Make sure your Argon device is connected to WiFi, find its IP address and then use the following command to send a UDP packet to your Argon:

particle udp send 192.168.1.106 8888 "It works!"

Replace 192.168.1.106 above with the actual IP address of your Argon device.

You should see the following message appearing on your Xenon monitoring console:

Got packet: It works!

Congratulations! You have successfully broadcasted a message over your mesh network.

License

Copyright (C) 2018, Uri Shaked. Released under the LGPL license.

Parts of this example are based on code found in the particle-iot firwmare.

particle-mesh-broadcast's People

Contributors

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