leroyle / docupdates

0 stars 1 forks source link

Specific setting for US or Europe #1

Open hpssjellis opened 3 years ago

hpssjellis commented 3 years ago

I am setting up Arduinos as sensors and knowing specific LoRaWan settings for US915 as different from EU868 would be helpful.

Here are some LoRa settings:

    LoRaRadio.setFrequency(915000000);
    LoRaRadio.setTxPower(14);
    LoRaRadio.setBandwidth(LoRaRadio.BW_125);
    LoRaRadio.setSpreadingFactor(LoRaRadio.SF_7);
    LoRaRadio.setCodingRate(LoRaRadio.CR_4_5);
    LoRaRadio.setLnaBoost(true);

and here are some LoRaWan settings

    LoRaWAN.begin(US915);
    // LoRaWAN.setSubBand(2);
    // LoRaWAN.setDutyCycle(false);
    // LoRaWAN.setAntennaGain(2.0);
    LoRaWAN.joinOTAA(appEui, appKey, devEui);

and here are the standard ones:

Explanations about endedness would also be helpful.

const char *appEui = "0101010101010101";
const char *appKey = "01010101010101010101010101010101";
const char *devEui = "0101010101010101";

Most of my information comes from this github

https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0

although I have connected to Helium using my own arduino portenta sketch at

https://github.com/hpssjellis/my-examples-for-the-arduino-portentaH7/blob/master/research/LoRaWan/helium-connected03.ino

Thanks and Good luck. On discord I am @jerteach

leroyle commented 3 years ago

Thanks for the comments I don't think we want to get into LoRa settings (vs LoRaWan) as that may tend to confuse.

There are plans afoot to write some sort of LoRaWan intro that the diagram I made will go into. Perhaps more into the purpose of the various LoRaWan params can go there as well.

I'll see about adding a link to an Endian-ness wiki page as well as a link to the LoRaWan frequencies supported by Helium. I think that may be the only LoRaWan param that may vary from region to region.

If there is something already in the doc set that mentions the other LoRaWan params I'll see about adding a link.

re: your portenta sketch, I'm not the keeper of the docs but I believe they may be open to adding more examples. I know they do want to try to add a bunch more of the off the self sensors to the docs. If you want to include yours post a query in the documentation channel on discord.

hpssjellis commented 3 years ago

Thanks for the reply @leroyle, my code is too raw presently, but I have just found some true LoRaWan examples that should work on the Portenta so I may have something running soon. If anyone at Helium can help with best basic connection settings for North America US915 that would really help. I can now set the sub band, which before I was not able to.

LoRaWAN.setSubBand(2);