I just noticed your addition of the LMICPP-Arduino library to the Overview of LoRaWAN Libraries topic.
I have some questions that I will post here in this new topic (because they are off-topic for Overview of LoRaWAN Libraries).
Cool!
Several people have noted that adding SX1262 support to the Arduino LMIC libraries (Classic LMIC, MCCI LMIC) may not be simple due to differences in structure between SX1276 and SX1262.
You appear to have added SX1262 support. Can you elaborate on that?
Above info shows that LMICPP-Arduino is based on Matthijs’ Classic LMIC.
Is there any relation between LMICPP-Arduino and Lacuna Space BasicMac which also supports SX1262?
Classic LMIC has recently been retired and deprecated. What does this mean for LMICPP-Arduino?
while being able to use it in ATmega328P
Was this the reason to use Classic LMIC as base for LMICPP-Arduino (instead of MCCI LMIC)?
The aim is to keep it as compliant as possible while being able to use it in ATmega328P.
Does this mean that LMICPP-Arduino is less (LoRaWAN) compliant than Classic LMIC?
If so, what is different?
Can you elaborate on this?
Using configuration parameters for defining radio type and region appear as most simple and most flexible to me (not using #defines). What role does the inheritance play here?
Based on LMICPP-Arduino’s support for SX1262, do you think this could also benefit adding SX1262 support to MCCI LMIC?
@grazy, I’ll look forward to trying this out as I have had some good results with the now retired Classic LMIC.
I’ve taken the liberty of editing this & your original post to change AVR328P to the official name of the MCU exactly as it appears on the Microchip product page, ATmega328P, so that it will come up with the most likely forum & Google searches.
For the SX1262 support, I made it with three source of inspiration : the chip manual, BasicMac (which is like LMIC) and the reference implementation LoraMac-node. But I have removed all the FSK part to do less code and I am using c++ way of doing thinks (class instead of #ifdef) so it not easy to use my code to add SX1262 to MCCI LMIC.
But I think it is possible to add SX1262 support to MCCI LMIC using BasicMac as a model, you will need to write a “radio.c” for SX1262 like the file basicmac/lmic/radio-sx126x.c at master · LacunaSpace/basicmac · GitHub and ajust the detection of end of transmission (the check of the pin DIOx pins) and add a some #ifdef. But I don’t like this C style of code I am not paid to work on this so someone else will have to do it…
It mean nothing because I do not use the library anymore, it is a fork of the code with heavy modification.
At the time I have started to modify code, I did not know MCCI LMIC.
It is less compliant because it do not support FSK, and all the region that MCCI LMIC support, for the rest I think it is equivalent (for 1.0.2).
If I find something I do better, i try to contribute back to MCCI LMIC if it possible (for exemple for the join backoff : Add join back-off by ngraziano · Pull Request #546 · mcci-catena/arduino-lmic · GitHub)
The use of configuration parameter or #define generate a lot of #ifdef in the library code and I find it hard to read and maintain, I don’t like this type of code so I change it. I have a LmicEu868 and an LmicUs915 class which inherit from an Lmic class which contain the common code, the same thing for RadioSx1276 class and Radio class. It is personal preference and a desire to use the c++.
It is better to use BasicMac as a source to add SX1262 to MCCI LMIC this two project are less different, it is possible but it will need some work .
Is there any news on this topic? The number of boards with SX1262 is increasing. Thus, it would be great to have a solution for upgrading LMIC based applications.