Skip to content

Conversation

@gonzabrusco
Copy link

When selecting the channel to transmit, the library is omitting that not all channels can use all SF. That is the case for AU915-928 and US902-928. I noticed that TTN was forcing a SF7 (with ADR) but something my device was transmitting at SF8BW500 (channel 65). Immediately after that TX, TTN was sending a new ADR command to use SF7 again.

After debugging the library, I've found out that the selectChannel function was selecting any available channel, regardless if the desired data rate was obtainable or not (the function requiredRate was approximating the closest data rate, which I'm not sure if it's valid, at least TTN didn't like it). I've added a new parameter (desired_rate) to the function isAvailable to check if the required channel index is compatible with the desired SF. Probably the selectChannel function needs a refactoring. But for now I think this works fine.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant