Neither the ‘periodic’ Example, nor the ‘hello’ Example is working. The Error Message i get is the following:
000000000 HAL: Initializing … HAL: There is an issue with the SPI communication to the radio module. HAL: Make sure that HAL: * The radio module is attached to your Raspberry Pi HAL: * The power supply provides enough power HAL: * SPI is enabled on your Raspberry Pi. Use the tool “raspi-config” to enable it. 000000003 HAL: Failed. Aborting.
SPI is enabled and WiringPi is installed.
I’ve tried to get it working with a Raspberry Pi 4B and a Raspberry Pi 3B+. There is no difference.
Does anybody know where the problem could be?
Besides that, would you recommend to use an Arduino with the LoRa Shield instead of the RPi Hat?
You are using a steam-powered version of the software that is so old that it should be in a museum by now.
Very few people have a Pi driving the SX1276 radio chip because of the precise timing requirements of LoRaWAN. But you could take some of the directions from the Dragino archive and use the latest LMIC (which is mostly targeted at Arduino):
What are you trying to build? For a gateway there is plenty of choice, a TTIG probably the cheapest one. For an end device you could just try to wire another controller, for instance an ESP32, to your board.
There are no recommendations for the Pi that controls a radio directly unless you compile a realtime kernel for your distribution so that it can react in a timely fashion. This has always been the case.
There are modules like the Pi Supply RAK811 module that provide an AT interface to an MCU with radio. More up to date modules like the Seeed LoRa-E5 come with a AT out of the box, you could look for an implementation for Pi.
Fundamentally LoRaWAN is tiny tiny tiny packets of data, so typically anything you can do on a Pi isn’t a great fit to get the data home. Apart from ANPR, that works nicely.
I am testing out Lorawan as an option for a farm based tracking application. I am using the RAK 7243 as the gateway and wanted to build a prototype end device to test the wireless range that I can achieve. Can you elaborate more on the ESP32 option?
Both me & Jac can use what ever fits the best use case. More information from you will help us find a good match for your use case.
Yes, no, but not until you cover the Learn section linked at the top of the page - you are currently fishing and ending up with all sorts on your hook. You’ve found a gateway hat when you needed a RAK811, The LoRa-E5 has its own MCU on it so it depends on which model of LoRa-E5 you pick, you could just use the Grove version with an Arduino over a serial line or you could link it to the Pi & use Python. If you go with an ESP32 and LMIC-node you will be coding the LoRaWAN stack directly.
Your objectives are going to be spelled out in considerable detail as it’s not clear what you hope for by “channel level detail, packet details” - we don’t tend to get too wound up with which channel a device uses for an uplink and packet details are available in various forms. So this sounds like a research project, it would be appropriate to say so if that is the case.
It would also be useful if you can tell us what you normally code with - Python, C, C++, Haskell, Go etc etc so the hardware can match up with skill set.
Yes, it is a research project in analyzing the practical use case for Lorawan. You are right that at this moment, I am fishing for the right hardware/software to work with. I had a tough time with the adafruit board that I referred to earlier in getting a packet to the gateway (gateway did not detect any packets send by the Python code running on the Pi), so it would be nice to know what channel the node is transmitting at for debugging purposes - same with packet level details.
I am comfortable with Python and C. I appreciate your input to finding the right match. Thank you!
I’m 100% sure there is a practical use case for LoRaWAN, so again, your objectives are still unclear.
As the issue with an out-of-the-box linux kernel is timing - that is the kernel or a process may cause other software, like the LoRaWAN stack, to miss the moment it needs to tell the radio to start listening - there is nothing stopping your Pi from sending ABP uplinks or Join-Requests - which should then be seen on the gateway. So something is wrong with the setup you have. But we don’t know what library you are using or instructions you have followed so it’s very hard to comment and that makes my crystal ball cry because it only works when it has some hints.
LMIC-node lists all the boards that it supports and is the closest thing to no-brainer that has been produced and is likely to be produced for a DIY device. Due to the complexities of all the different MCUs that are available, it doesn’t do sleep / low-power mode but on the forum & GitHub you will find people that have done adaptions for various boards to support sleep. Once you have LMIC-node working you can progress to using LMIC in the raw, having found an MCU that does what you need and has easy access to sleep, assuming that’s a requirement.
For starting out I’d recommend the Adafruit Feather M0 with RFM95. It requires a link to be soldered for it to work with LoRaWAN (full instructions on the Adafruit Learn site) and is supported by LMIC-node and LMIC. It costs more than some of the potential combos that may catch your eye, if it has less than 48K Flash & less than 3K of RAM you will have a fight on your hands squeezing it on to the MCU, so just don’t try. The ESP32 boards do not do sleep without some experienced configuration.
You need to read the Learn section linked at the top of the page.
I will look into the Learn section. I am not new to Lorawan but not too familiar with the hardware side of things. A quick look at the section shows me topics on Lorawan but not on articles on hardware selection or guides to setting things up. I remember TTN used to have how-to guides but I can’t seem to find them anymore.