I’m very happy coding away on the RAK4630 module. The supplied lorawan library works really nice with the eventing.
On my other lora devices, i can set a spreading factor. I’ve notived that the RAK4630 seems to be at SF7.
How can i set the spreading factor on these devices?
Looking at your code, you should be able to set the default DR on config.h. Specifically this int8_t _loraDataRate = DR_0;. However, you said you get SF7 which do not correspond with DR=0. Hmm. I think your code is based on @beegee’s work. So I believe he can give better insights
As you are using my SX126x-Arduino library, the API call to change the datarate is
/**@brief Configure data rate
*
* @param data_rate data rate
* @param enable_adr enable adaptative data rate
*/
void lmh_datarate_set(uint8_t data_rate, bool enable_adr);
As Carl said, SF and BW are combined in LoRaWAN specs into the data rate DR.
Beside of reading the official specs, you can have a quick overview in our Documentation Center where we show for most regions the possible datarate (with SF and BW), max payloads, …