Hi there,
im currently writing my Bachelor Thesis with the Topic Lora and i have a Question.
I have all sorts of Arduino boards (ESP 32 Lora Heltec, Unos, TheThingsUno) + a lot of Sensors and stuff.
I recently bought the TheThingsUno due to its nice and clear Library (TheThingsNetwork).
So i powered it up and saw, that it cicles all the frequencies for the EU Band.
So i looked into the library and found the Function to Configure the 868 FP.
For my PoC i want to fix the frequency to a specific Frequency so that the node does not cicle thru all but sticks to one.
Is there a way how i can modify the code below to achieve that?
And just another most likely stupid Question. Can i Manuelly tell the node wich spreading Factor (SF) to use?
In the Library it says, that the default is 7 and in all Doc´s it says that Lora will automatically choose the SF due to the Conditions (Enviromental etc)
Thanks in Advance.
void TheThingsNetwork::configureEU868()
{
sendMacSet(MAC_RX2, “3 869525000”);
sendChSet(MAC_CHANNEL_DRRANGE, 1, “0 6”);
char buf[10];
uint32_t freq = 867100000;
uint8_t ch;
for (ch = 0; ch < 8; ch++)
{
sendChSet(MAC_CHANNEL_DCYCLE, ch, “799”);
if (ch > 2)
{
sprintf(buf, “%lu”, freq);
sendChSet(MAC_CHANNEL_FREQ, ch, buf);
sendChSet(MAC_CHANNEL_DRRANGE, ch, “0 5”);
sendChSet(MAC_CHANNEL_STATUS, ch, “on”);
freq = freq + 200000;
}
}
sendMacSet(MAC_PWRIDX, TTN_PWRIDX_EU868);
}