Using Boron without Cellular

boron
Tags: #<Tag:0x00007fe21a3bab60>

#1

I have 2 borons connected to the same mesh network. They communicate with each other through the mesh, and also send messages to the cloud.

One of them gets its power from a small solar panel, so I’m trying to reduce its power consumption. I figured that I could turn off the cellular module, and keep sending messages to the cloud through the mesh network (the other boron always has its cellular module turned on).

However, I could not connect my boron to the particle cloud using mesh only. It successfully connected to the mesh, but not to the cloud. In comparison, the xenon can connect to the cloud using mesh only.

Is there a way to connect my boron to the cloud with the cellular module turned off? I am trying to use the boron in a similar way as the xenon but I do not want to use a xenon.

Also, I noticed that connecting to the mesh network using Mesh.on(); and Mesh.connect(); will automatically attempt to connect to the cellular (Cellular.connecting() will return true, even though the cellular is still off). The led will also blink green rapidly. Is this intended?


#2

Not sure I fully understand the logic of using an expensive cellular equipped Boron like it was a Xenon? Wouldn’t it make more sense to substitute a Xenon for the solar powered Boron and then it could be a sleepy node with the other Boron (which you say is powered) being the gateway. A Xenon cannot connect to the cloud only using mesh - it uses Mesh to the gateway (only 1 allowed at the moment) that must be Cloud connected.

Also, I noticed that connecting to the mesh network using Mesh.on(); and Mesh.connect(); will automatically attempt to connect to the cellular (Cellular.connecting() will return true

What SYSTEM_MODE() are you using? Should be MANUAL to have full control over radios.


#3

I want to use a Boron instead of a Xenon for several reasons :

  • First, the Boron makes it easier to use a solar panel, whereas the Xenon would require me to buy an adafruit solar charger, which makes the difference in price not that big.
  • Also, I’d like to turn the cellular on every week or so to potentially update the firmware or flash new code. I noticed that it’s almost impossible to flash new code or upgrade the firmware when the mesh connection is not perfect.

I really hope there’s a way to use a Boron in this case, because it will be located in a very remote place and I’d like to make it 100% reliable.

As for the system mode I was using, I tried both SEMI_AUTOMATIC and MANUAL and they both attempted to connect to the cellular, even though the module was still turned off (the power consumption was only 10mA).


#4

We don’t know all the details for your project, but this “may” be easier just letting each Boron perform their duties independently over cellular. If they need to exchange information, use a cloud endpoint verses “real-time” Mesh.

Just a note: The Xenon has a Li-Po charger, and can be used with a Solar Panel. You just need to be careful with the Panel Selection.


#5

I don’t want them to act independently. I only want to turn off my cellular module and still be able to send messages to the cloud through the mesh, using the other Boron’s cellular. This would reduce the power consumption by a lot.

Ideally, I’d also like to make them act independently on command, to allow them to upgrade and flash code reliably. I think this is the default behavior when using two Borons connected to the cloud over Cellular, and that are part of the same mesh network.


#6

I think the constraint you are knocking up against is that there is only one gateway allowed on a Mesh network hence each Boron has to Cloud connect when you mesh connect. I really don’t understand why you can’t use a Xenon - you could power it via VUSB pin from a solar panel with a relatively cheap solar panel 5V supply board and the Xenon can be flashed via the Mesh - I have a specific command that enables OTAFlash and connects to the Cloud via the Mesh. It is slow but reliable.


#7

I haven’t searched yet - could you share this command?


#8

Slightly involved;

  1. There is a Pub:Sub relationship between the gateway and the endnode.
  2. By default all endnodes startup and set OTA disabled. They also only connect to the Mesh and not the Cloud.
  3. The gateway publishes on the Mesh a command event with data “ota”.
  4. The endnode event handler for the command event decodes the command data as starting with “ota” and sets a global bool flag isOTAFlash = true.
  5. In the loop a function is called to check if the isOTAFlash flag has changed.
    if (isOTAFlash && !wasOTAFlash)         //commanded OTAFlash On was Off
    {
        sleepPeriod = 0;                    //stop sleep cycle
        if (!Particle.connected()) Particle.connect();  //connect device to particle cloud
        waitFor(Particle.connected, 8000);  //wait with timeout of 8 seconds until cloud connected
        if (Particle.connected())
        {
            System.enableUpdates();         //once connected enable updates
            if (System.updatesEnabled()) wasOTAFlash = true;
        }
    }

If a console flash was queued then the update will start automatically.