How to communicate with three argon boards

Hi,

I have three argon boards. I am trying to make one as receiver and two as transmitters. The code for BLE communication between two boards works well.

I found for three, I need some functions that can disconnect one BLE communication and set up another one to accomplish the goal of communicating with two argon boards.

But after reading through the reference, https://docs.particle.io/reference/device-os/firmware/argon/

I didnt find any relevant classes and methods.

Any suggestions would be appreciated.

@RuiyingWu, you can configure one argon as the “edge router” (the one connected to the wifi) and the other two as mesh nodes. You have to add them using the CLI. I figure that’s an easier way of connecting them together using Mesh instead…

If you don’t want to use mesh, you can disconnect using BLE.disconnect(). Or if you want to disconnect from a specific device they have BLE.disconnect(const BlePeerDevice& peripheral) Documentation is here.

1 Like

Thanks, jaredwolff.

Can I ask some questions about mesh network.
I would like to set a network with two transmitter and one receiver. Sometime, I want only one node is transmitter, one is receiver and one is in ‘sleep’ mode.

Question:

  1. is it possible to let a node be transmitter or receiver based on some decisions made by the data collected?

  2. is it possible to set up such a network by using mesh? It seems that if it is a receiver, it will always be the receiver. Or just need one always be edge router?

  3. If I use mesh, I dont need the ble communication anymore, right? What is the communication for mesh, wifi right?

Thank you for your help.

@RuiyingWu

  1. is it possible to let a node be transmitter or receiver based on some decisions made by the data collected?

I’m not quite sure what you mean here. By nature there is bidirectional communication whether it be bluetooth, mesh, etc. If you are referring to the direction of the data based on certain conditions that is possible.

Say you have two sensors A & B. You can chose which sensor readings to use based on outside conditions.

  1. is it possible to set up such a network by using mesh? It seems that if it is a receiver, it will always be the receiver. Or just need one always be edge router?

Always needs one edge router if you want to be connected to the internet.

  1. If I use mesh, I dont need the ble communication anymore, right? What is the communication for mesh, wifi right?

Mesh is based on OpenThread. It’s similar to Zigbee in nature (same underlying protocol). You wouldn’t need BLE if you used Mesh, correct. I highly recommend you check out the documentation on these devices:


1 Like

Thanks so much jaredwolff.

I am still curious about the benefit of using mesh. I just want to build up a local sensor network. I thought BLE is enough to do so. And I dont need the internet to process the data. I want data can be locally transferred from one node to another.

So in my case, would the BLE sound good enough?

Thank you for your help.

Yup BLE is doable for local. Slightly more setup is required there.

Technically mesh is too. The way Particle configures mesh requires the Internet though. Offline may or may not work. If I have time to play I’ll report back.

1 Like

You only “need” an internet connection for the initial setup, after that you can cut the connection and have a fully offline mesh. You can even remove the gateway device from the mesh and let the nodes keep the mesh running (as long at least one device is awake).

2 Likes

Thanks, ScruffR.

What you are saying about mesh really interests me. I will take some time to read the links that jaredwolff shared.

By the way, in terms of communication speed, will an offline mesh network always do better than BLE communication? For BLE, it can only involve a pair, so it needs the process of disconnection and connection all the time.

Thank you for your help.

Connecting and disconnecting will take just about the same amount of time. You are limited to the number of connections with Bluetooth. (in your example of 3 devices, it’s not a worry here) There is a limit on the number of BLE connections in the current firmware. In a mesh network, you can have many more “connections.”

Personally, Mesh is setup to be easier to work with. I would likely go that route. You should play with it and see what works best. :slight_smile:

2 Likes