LoRa + Boron or B-Series. Is anyone else testing/developing? What's on the particle RoadMap?

During this Particle Mesh Deprecation announcement from almost a year ago https://blog.particle.io/mesh-deprecation/ as well as during Spectra 2020 there was quite a bit of Chatter regarding LoRa. I personally was hoping the new product introduced at Spectra 2020 was for LoRa integration rather than Tracker One but I can see the benefit of that too.

  • “…most customers would be better off using Bluetooth Low Energy (which we will continue to invest in) or a sub-GHz radio like LoRa (which can be added to Particle through third-party accessories).”

  • “Use LoRa or another sub-GHz radio to connect wireless sensors that are further apart or are separated by obstacles and barriers (walls, floors, etc).”

  • “…But in practice what we found is that our customers would be better served by BLE or LoRa

  • “…2.4GHz radios just don’t have the necessary range and LoRa would be a better fit.”

How many others out there are integrating LoRa with a Particle Boron? I’ve been playing and testing with quite a bit of success and hopes of being able to continue to build upon it. It seems like a great fit for many applications (as outlined even by Particle). I.e. locate a single Partible Boron in the region of interest at a particular location that has good power or Solar as well as good cellular signal strength. It can then act as a Pseudo gateway to individual LoRa nodes. The individual LoRa nodes are less power hungry and can be in locations that don’t have cellular signal strength and even 1/2 mile - 1 mile away from the Boron pseudo gateway. I’d have to think others out there are doing something similar or have very similar strong use cases given the frequent mentioning it in that mesh deprecation announcement as well as Spectra.

So my question… is anything “In the Works” at Particle for accommodating built in LoRa? Yes, it can be fairly easy to add with third party accessories, but my understanding is once you introduce another radio to a device it invalidates the FCC listing. This introduces a big barrier if a person wanted to sell a product with Boron + LoRa. In addition, Particle does such a fantastic job integrating things into their platform to make it so easy to do without having to learn the entire stack in detail. I know if Particle had something in the works here, I’d be the first on the list as a beta tester.

Otherwise, I wonder if others have a similar need and going down this road of Boron + LoRa and if so, has anyone taken this or anything like this as far as FCC listed product? I wonder if others in the community could benefit from a LoRa carrier board for the Boron or B-Series that was also FCC listed?

I’m torn between going down the LoRaWAN route with The Things Network or maintaining a Particle Boron. In my initial investigation into LoRaWAN, this requires a more expensive gateway, power hungry (always on) gateway, as well as a much higher monthly cost for the Cellular data backhaul. I assume this would also be more complexity for a user to setup without support.

Would love to learn what others are doing with LoRa + Boron/B-Series. Feel free to post here or if you prefer send me a private message. Thanks!

There is no plan for Particle to build LoRa support into any Particle device at this time.

So I’ve actually just been trying to get a Boron connected to a LoRa radio and just noticed you said you’ve had lots of success. I unforntunately haven’t had as much luck. I’m pretty new to the whole Particle world of devices and thought it was great when the sample apps/examples worked pretty much out of the box once I figured out a bit of how Workbench works via some tutorials. But as soon as I tried my hand at interfacing the Boron with the RFM95W (Adafruit Lora Breakout module) using the RadioHead library port I found mentioned in the Particle forums, all I got was a red SOS LED on the Boron and that has me a little worried. From reading the post I saw that the RadioHead port was targeting the Photon board so I’m not sure if it would even work with the Boron. Would you perhaps be able to share how you managed to get yours working with an external Lora device? Any help would be greatly appreciated!

Hi @plaferriere - Welcome to the particle community! You’ll find a lot of great information here and lots of other particle users willing to help out.

I would strongly recommend starting with Rickkas7 tutorial on Github including examples. https://github.com/rickkas7/RF9X-RK

I started with his tutorial step by step and never ran into a flashing red SOS error. I original was using a Particle Boron + RFM95 radio feather only talking via LoRa to multiple Adafruit M0 RFM95 LoRa feathers. That said, I am now contemplating using all Boron + LoRa radios to maintain OTA capability in the remote LoRa nodes.

Regarding your SOS flashing red. I’d start with a minimized version of the example and keep building up from there to identify where the problem is. Honestly though, if you assemble/solder it per that GitHub tutorial you should just about be able to take the example, load it and be sending basic Hello messages between the two. If there is anything else you need guidance on feel free to post or message back and be sure to check out other forums here. For example, here is another decent one that was the last few weeks discussing long range IoT (i.e. LoRa and other methods). Long Range IoT Network

I’d be curious to hear more about your use case is.

Hi @jgskarda, thanks for the lightning fast response! I’ll definitely be looking at the other thread you suggested. In the meantime, the github link you provided is actually where I got the library from.

Now when you say tutorial, you mean just go through the main github page correct? Should I be using this code as my main project for starters? If so which example is the simplest to start with? I think what I tried using was the example code found on the Adafruit website here (the Transmitter example):
https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module/using-the-rfm-9x-radio

If I recall correctly, setup was rather similar, needing to specify SPI connection pins and whatnot. I’d probably have to go back and check again to be 100% sure but I think my issue was with the line:that tried to init the rf95 object. I tried commenting everything out and the red blinking lights only showed up when I uncommented that line. I started wondering if I had wired up something wrong, but from my understanding, the red status LED was indicative of a crash or bad memory access or something of the sorts. Just to be clear, I only had the one Boron and Lora radio connected at the time without any receivers, but I assumed that this would only affect the behavior of the application and that I wouldn’t get any response, I don’t think this would be the cause of the red LED.

However, just looking at the RHReliableDatagram example from the RadioHead library, I’m seeing something which I believe may be a major source of issues, namely the SYSTEM_TRHEAD call. I read about this in the documentation but wasn’t sure what it did exactly. Similarly with SYSYEM_MODE. I’m starting to wonder how much behind the scenes magic is happening in Particle’s code that makes us program these boards in an “arduino” style and whether or not this is somewhat akin to trying to print debug info in an interrupt service routine which took me a year to figure out was not a good idea after finding some obscure mention of it in forums.

As for my use case, it’s mostly just for fun but the idea was to see if it was possible to set up a long term mobile remote sensing station of sorts (sensors TBD hehe). My thoughts were to use Lora whenever possible during long term intervals for checking on sensors but in the event gateways aren’t in range, make use of the Cellular service to get an “emergency” reading if need be. I’ve been out of the embedded/microcontroller scene since I finished my studies and now I’m just looking to get back into it and this seemed like a fun way to learn about a bunch of things I’ve never worked with, namely Cellular, Wifi, Lora, and all things network related.

@plaferriere, yeah now that you mention it, I think used the rickkas7 library/github but combined that with some learnings/trials with Adafruit. I am sure this is not complete by any means but here is a few snippets of my code. Maybe it’ll help you out. I did start without the encrypted piece but recently added that. It’s not required but a good practice.

At the beginning:

#include <RH_RF95.h>
#include <RHEncryptedDriver.h>
#include <Speck.h>

Before Setup:

//Define pins for the RFM9x:
#define RFM95_CS D6
#define RFM95_RST D3
#define RFM95_INT D2
#define RF95_FREQ 915.0

// Establish instance of the radio driver
RH_RF95 rf95(RFM95_CS, RFM95_INT);

Speck myCipher;   // Instanciate a Speck block ciphering
RHEncryptedDriver myDriver(rf95, myCipher); // Instantiate the driver with those two
unsigned char encryptkey[16] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; // The very secret key (not actually my key)

Located within Setup():

 //Initialize RFM radio: 
  if (!rf95.init())
  {
   Serial.println("Lora radio init failed");
   Serial.println("Uncomment '#define SERIAL_DEBUG' in RH_RF95.cpp for detailed debug info");
   LoRaStatus = 0;
   //REPLACE ME - Will need to do something here to indicate failure to the user. Blink a light 5 times, etc.
  } else {
     Serial.println("Lora radio init OK!");
     LoRaStatus = 1;
  }
 

  // Set Frequency to 915 Mhz, modulation GFSK_Rb250Fd250, +13dbM
  if (!rf95.setFrequency(RF95_FREQ)) {
    Serial.println("setFrequency failed");
    //REPLACE ME - Will need to do something here to indicate failure to the user. Blink a light 5 times, etc. 
  }
  Serial.print("Freq Set to: "); Serial.println(RF95_FREQ);

  /*
  Bw125Cr45Sf128 	Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC on. Default medium range.
  Bw500Cr45Sf128 	Bw = 500 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC on. Fast+short range.
  Bw31_25Cr48Sf512 Bw = 31.25 kHz, Cr = 4/8, Sf = 512chips/symbol, CRC on. Slow+long range. - Functional - No noticable improvement
  Bw125Cr48Sf4096 Bw = 125 kHz, Cr = 4/8, Sf = 4096chips/symbol, low data rate, CRC on. Slow+long range.
  Bw125Cr45Sf2048 Bw = 125 kHz, Cr = 4/5, Sf = 2048chips/symbol, CRC on. Slow+long range. - Not available in library
  */

  if (!rf95.setModemConfig(RH_RF95::Bw125Cr45Sf128));
    Serial.println("Invalid setModemConfig() option");

  //Question - Feels like this should be initalized to 23 but can be set via config command but could be dangerous...
  //if a user set it too low, then it may not be able to establish a connection? Just leave at 23? 
  // Set transmit power. This can be set between 5 to 23 dBm:
  rf95.setTxPower(23, false);

Maybe this will atleast get you to “LoRa Radio init OK”. From here it’s identical to Adafruit I thought as far as sending/receiving messages.

Here is what the red flashing red SOS means. Depending on what SOS flash you are getting it might help you understand what could be happening.
https://docs.particle.io/tutorials/device-os/led/boron/#red-flash-sos

  • I got to say… it’s been a fun journey for me learning as well along the way. I don’t have much to compare as I didn’t even dabble much with Arduino even before Particle. But I’ve been very impressed and happy with the Particle Platform so far.

@jgskarda, I just wanted to say thanks for the help in pointing me in the right direction. I finally got it working. Not sure exactly what was the cause of my issues but once I had updated the Device OS to 2.0, changed the pins I was using to interface with the LoRa radio, and disabled cellular connectivity everything just clicked. I’m trying to remember which pins I used initially, I believe I was using the pins recommended in the Adafruit example code thinking the Boron was pin compatible with the Feather M0 that has the LoRa radio integrated into the board. I’ll definitely have to play around with it a bit more and see where things start to break down. Thanks again!

2 Likes

Good to hear! We are in this learning process together! I’m sure you can share back some tips/tricks with me and others in this community as you learn. Glad you got up and running with LoRa! Lots of continued fun is in front of you!

1 Like

@jgskarda it sounds like you have a lora network up and working. I’ve been trying for quite some time now to get something working but haven’t had any luck yet. My main problem is I need to go learn how to use libraries. I’ve been using the web IDE as it’s so simple, but I’m a bit stuck now as @rickkas7 github repo to make this work has quite a few files. The only way I’ve found to add them to the web IDE is by using the little + button on the right. I’ve tried searching the libraries within the web IDE, but I can’t seem to find them. So I’ve got this now finally:


But I’m still getting this:

There’s got to be an easier way to do this. Do I need to learn Visual Studio or something down that line? What are you using @jgskarda? Or maybe there is a better way to get githubs into web IDE?
Here’s a link to the complete code I’ve got so far. This looks much simpler, but it says it doesn’t support the latest OS.

Yes, there is definitely an easier way to do this. VS Code and the Particle Workbench extension. If you are familiar at all with VS Code, you’ll be up and running in no time. If that is also brand new to you, it may take some time to learn the steps to get up and running but you’ll be very glad you did in the end. Don’t be afraid of it if it’s new. It was brand new to me 2 years ago and was able to pick it up fairly quickly.

A fantastic starting point is from @bsatrom:

One thing I very much appreciate with VS Code is being able to link it right to GitHub for good version control. If this is also new to you, maybe don’t start with it but it’s definitely worth learning.

In my experience learning VS Code along is well worth it! My project with Particle got me to try it and now I use it all the time for lots of things even now for things as part of my day job. It’s worth the investment to learn it IMO.

Visual Studio is pretty easy to get up and running with.

I was afraid of it at first but I love it now. Never used it before Particle switched to it and forced me to start using it after the Dev IDE dropped for VS.

1 Like