I am trying to find where in the mentioned code I can set spreading factor, bandwidth and maybe even specify the exact frequency I want the node to transmit at. I know I am not supposed to do that but it is for testing purposes where I need to control these parameters.
I thought I could do it in RegionEU868.h with setting DR but it doesn’t seem to really do the trick.
HOW TO DO EVERYTHING I WANTED IN I-CUBE-LRWAN V1.1.0:
BW and SF are determined by datarate (DR). Go to RegionEU868.h file and search for:
and set it to your desired value. You can find what each DR value means in Region.h file.
You can also set the node to send data at the exact same frequency each time. Go to RegionEU868.h again and search for:
now change the frequency value in EU868_LC1, LC2, LC3 to the desired value and you are set. Be careful to set frequency to one of the three frequencies already specified in the defines as these are also channel frequencies gateway is listening at. In case you defined more channel frequencies for your gateway you can probably use those too.
If you are not in EU I would assume everything is the same except for the file name you are editing your values in e.g. for US go to RegionUSXXX etc.
Note: I noticed ADR has to be turned on (1) in main.c file in order for custom datarate to work?!
Hope this was/will be of some help to someone!