Mixed LoRaWAN and LoRa with Heltec library

is there a way to send node to node LoRa packets while joined to a LoRaWAN network? Its supported on the SX1262 but not clear how to get it to work through the Heltec library.

This function can be implemented, but we don’t have a ready-made example right now.

Would be helpful. I’ve tried hacking it into the library but I am having trouble getting lorawan to work after a manual radio send.

I would prefer this in LoraWanMinimal. Don’t need a fancy example, just the code to Radio.Send a raw packet between two LoraWan sends. Or to save/restore the join state.

I kind of suspect passthroughMode might control this but I can’t find the referenced PassthroughMode.ino

Another approach that could work is to save/restore the LoraWan join state. This is easy to do with Arduino-LoraWan / lmic but not obvious how to do with your library. This would be useful in general to avoid the long join sequence on reset.

Hello @groth99
to save the join state please follow this guide assuming you are using platoform IO (can be easily done in Arduino as well). it took me a while to understand it, and it works :wink:

  1. you must Enable the AT support in platoformio.ini add board_build.arduino.lorawan.at_support = ON
  2. add to platofromio.ini: board_build.arduino.lorawan.net_reserve = ON
  3. you need this in Setup() LoRaWAN.ifskipjoin(); this is what checks if the join state is saved and use it or perform a join if not so you would call this in your code when you wan to switch between both modes.
  4. now perform your join normally and reset the board and it’ll work.
    when you reboot the board you should see this message in serial:
    Wait 3s for user key to rejoin network and if you press the user key it will rejoin if you don’t it will use the previously saved join state.

as far as the passtroughMode i have no idea what that does as i tried to find it and understand myself but as you indicated it’s not available :frowning:
hope this helps.

cheers,
Jay

Is there any way for my code to pull and restore the state (including frame counters)? The network I am using doesn’t have an easy way to turn off frame counter enforcement and doing so seems like a bad idea.

I have an external SRAM that I can stash this in.

hi @groth99, were you successful in combining lora and lorawan?