ArduinoCore-stm32l0 icon indicating copy to clipboard operation
ArduinoCore-stm32l0 copied to clipboard

Mixing LoRaRadio and LoRaWan

Open hpssjellis opened this issue 3 years ago • 3 comments

Hi @GrumpyOldPizza. Once again thank you for making this repo. I am having a lot of fun working with the Arduino Portenta LoRa Vision Shield.

Presently making a redundant system where if my p2p LoRaRadio connection is not confirmed I switch to a LoRaWan network, however

    LoRaWAN.begin(US915);

compiles but kills the entire program, even after a call like LoRaRadio.end(); Looks like the 2 libraries can't co-exist. Any suggestions for what part in LoRaWAN.begin(US915); is causing the problem?

hpssjellis avatar May 06 '21 21:05 hpssjellis

Good question. No idea. You cannot interleave them, meaning while LoRaWAN is active you cannot access the radio and the other way around.

GrumpyOldPizza avatar May 08 '21 11:05 GrumpyOldPizza

@GrumpyOldPizza thanks for the reply:

I just want to dump LoRa when it fails and then load LoRaWan permanently until reboot. I see that the root of your LoRa library is from Semtech . Also that you wrote the LoRaWan library is it based on some other Repo?

I will mess around with it. I should be able to fully dump the LoRa settings before loading LoRaWan. Doesn't really matter as I am having much more success with your code than anything I have been able to do with the Arduino MKRWAN library.

I wonder if Arduino has a method to load a separate program from a running program. Probably not.

hpssjellis avatar May 08 '21 15:05 hpssjellis

@GrumpyOldPizza I think I have found the issue, The Portenta only gives a certain amount of memory and I am at 94% upload when memory runs out. Can you think of anything in the LoRa or LoRaWan libraries that could easily be reduced? My examples are fairly basic so not really expecting anything to reduce the memory dramatically. I will bug Arduino and see if they can give your library more space. Also will ask if they can support your library for all the new MBED boards.

hmmmm.

The LoRaWanBands seem to take up a fair bit of memory see map file I think I will just get rid of a few regions and see if that helps.

hpssjellis avatar May 10 '21 17:05 hpssjellis