0
\$\begingroup\$

I need to connect a Raspberry Pi (as the server) to some different Arduino devices as clients. Some of the clients need to connect using Lora SX1278 modules, and others use NRF24L01+ (or any similar low cost radio). They will form a local network and not going to be connected to LoraWan. My SX1278 modules are from AiThinker.

  1. Can I use the SX1278 module on RasPi to connect to both types of clients?

  2. I could not find any stand-alone SX1278 library for RasPi, most of them are for building a LoraWan Gateway by RasPi.

  3. The most commonly used Lora library for Arduino is SandeepMistry's. Is there any more feature rich library having AES encryption?


Edit:

Till now I found out two mistakes on my side:

  1. I was wrong about NRF24, its frequency range doesn't match. I just need to use a cheap radio module, so my client devices' price remain low. Something like SI4432 seems to be good and supports FSK, GFSK, and OOK.

  2. The client devices need to do simple sensor reading and relay switching tasks, and I need to keep client devices' cost as low as possible. So I need to find the cheapest micro-controller capable of AES encryption; Arduino or not.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ While the SX1278 can be operated in legacy FSK modes, the details may be different, and more importantly it does not overlap the frequency range of the NRF24 series. So it seems like you'll at minimum need two radios. Also consider that practical LoRa networks generally use multi-channel radios on the infrastructure end - using a single node-class radio will mean you need tight coordination in time of frequency hopping to meet frequency usage regulations. \$\endgroup\$ Commented Jul 25, 2018 at 17:06
  • \$\begingroup\$ @ChrisStratton You are right about the frequency range of NRF24. I will edit my question. \$\endgroup\$
    – Sohail
    Commented Jul 26, 2018 at 16:28

1 Answer 1

0
\$\begingroup\$

The SX1278, as the first page of the datasheet tells us, is an SPI device.

The Pi has GPIO pins that can be configured to be SPI pins. Based on the SPI interface the Linux kernel then offers to userland programs, you can write your own software that talks to the SX1278. That'll require a bit of understanding of how SPI works, reading the datasheet and basic programming knowledge.

If you're more for actually integrating that module in the Linux 802.15.4 infrastructure, https://github.com/starnight/LoRa might be an interesting project. This goes more in the direction of LoRaWAN; I personally think that you've got similar problems to what LoRaWAN solves, so your easiest course of action might actually be using that for your LoRa devices.

AES encryption on a Arduino is very likely not happening - "arduino" is but a family of devices running a family of firmwares, based on very different microcontrollers, but even the most capable ones among these microcontrollers are very limited in RAM: If you find an AES library running on the microcontrollers, it's very likely you'd want to abandon the Arduino layer and just directly work with that, as you'll have to deal very efficiently with the limited resources you have. Arduino's sketches and libraries are certainly not the way to go there.

Overall, you don't seem to have a very firm grasp on what the capabilities of the devices you're considering are; for example, the NRF24L01 is a deprecated device, but there are plenty of similar controllers that both integrated the modem as well as a microcontroller. Maybe that solves your issues with lower component count.

\$\endgroup\$
1
  • \$\begingroup\$ Worth noting that the SX1276/SX1278 are generally only used for node roles and not for infrastructure or gateway roles, as they lack the ability to monitor multiple frequencies at the same time, without which it's challenging to meet legal requirements for frequency agility. \$\endgroup\$ Commented Jul 25, 2018 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.