Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to initialize LoraWAN US915 band on SX1262 #814

Closed
mischief opened this issue Aug 20, 2023 · 4 comments
Closed

unable to initialize LoraWAN US915 band on SX1262 #814

mischief opened this issue Aug 20, 2023 · 4 comments
Labels
bug Something isn't working resolved Issue was resolved (e.g. bug fixed, or feature implemented)

Comments

@mischief
Copy link

Describe the bug
LoraWAN can't be configured on SX1262 with US915 band because of invalid power parameters.

A clear and concise description of what the bug is. When applicable, please include debug mode output.

To Reproduce

SX1262 radio =
    new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
LoRaWANNode node(&radio, &US915);
...
node.beginOTAA();

we range check power level at

RADIOLIB_CHECK_RANGE(power, -9, 22, RADIOLIB_ERR_INVALID_OUTPUT_POWER);
, but US915 band sets it out of range at .

Expected behavior
initialize LoraWAN

Screenshots
N/A

Additional info (please complete):

@jgromes
Copy link
Owner

jgromes commented Aug 20, 2023

You're right, this is indeed incorrect. The problem is that no off-the-shelf SX126x/7x devices can actually get to the 30 dBm called for in the LoRaWAN specification without external PA. I think this should be fixed by making the module initialize to the maximum power it can support and which is allowed in the band.

However, even with that fix, you will run into a bigger problem in US915 band, which is that channels in this band are defined using CFlist mask, and not yet supported in RadioLib. LoRaWAN support is something I'm actively working on, and it's not ready yet. Also, it's going to be quite challenging for me to test, since the only gateway hardware I have is for the EU868 band.

@jgromes jgromes added the bug Something isn't working label Aug 20, 2023
@jgromes
Copy link
Owner

jgromes commented Aug 20, 2023

@mischief I fixed the original problem, but mask-type CFList remains unimplemented. I will keep this issue open until that changes - though of course, a pull request would be much appreciated (since again - I don't really have a way to test in US915 band).

@mischief
Copy link
Author

@mischief I fixed the original problem, but mask-type CFList remains unimplemented. I will keep this issue open until that changes - though of course, a pull request would be much appreciated (since again - I don't really have a way to test in US915 band).

hi,

thanks for your quick work.

unfortunately i am totally a 👶 when it comes to Lora, so i have zero idea about how this is supposed to work and i don't think i can contribute much... but i would be happy to test anything if i can.

@jgromes
Copy link
Owner

jgromes commented Sep 12, 2023

@mischief so in the end I was able to convince my LoRaWAN gateway to work in the US915 band for testing purposes, and US915 band seems to be working now (in the latest commit). You might have to set LoRaWANNode::startChannel and LoRaWANNode::numChannels to select the frequency channel range - see the updated examples for details.

@jgromes jgromes closed this as completed Sep 12, 2023
@jgromes jgromes added the resolved Issue was resolved (e.g. bug fixed, or feature implemented) label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Issue was resolved (e.g. bug fixed, or feature implemented)
Projects
None yet
Development

No branches or pull requests

2 participants