GrumpyOldPizza / ArduinoCore-stm32l0

Arduino Core for STM32L0
125 stars 67 forks source link

LoRaWAN payload limited to 11 bytes for any DataRate. #8

Closed ghost closed 6 years ago

ghost commented 6 years ago

It appears that the LoRa payload size is limited to 11 bytes for all data rates. Tested specifically for data rates 2 and 3.

GrumpyOldPizza commented 6 years ago

Do you have ADR enabled ? If so, then the stack will start off with DR_0 (i.e. 11 bytes for US915), or whatever you had set via LoRaWAN.setDataRate() and then wait for the gateway to switch different data rates that would allow more payload.

If you disable ADR, then you can set explicitly the data rate and hence get larger payloads.

On Tue, May 1, 2018 at 10:07 AM, SELT notifications@github.com wrote:

It appears that the LoRa payload size is limited to 11 bytes for all data rates. Tested specifically for data rates 2 and 3.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AG4QfLP53NisVi84HUBjrs5Bo8az-ho2ks5tuIhbgaJpZM4TuIe0 .

ghost commented 6 years ago

Thomas:

I have ADR disabled and am setting the DataRates explicitly. I can see from the server that the SF and BW are as expected, but The Tx fails for payload sizes > 11.

Jon

On May 1, 2018, at 11:16 AM, Thomas Roell notifications@github.com wrote:

Do you have ADR enabled ? If so, then the stack will start off with DR_0 (i.e. 11 bytes for US915), or whatever you had set via LoRaWAN.setDataRate() and then wait for the gateway to switch different data rates that would allow more payload.

If you disable ADR, then you can set explicitly the data rate and hence get larger payloads.

  • Thomas

On Tue, May 1, 2018 at 10:07 AM, SELT notifications@github.com wrote:

It appears that the LoRa payload size is limited to 11 bytes for all data rates. Tested specifically for data rates 2 and 3.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AG4QfLP53NisVi84HUBjrs5Bo8az-ho2ks5tuIhbgaJpZM4TuIe0 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385712596, or mute the thread https://github.com/notifications/unsubscribe-auth/ADVIKwRqfx7spWMDS9-bNi3_8JqFpwkSks5tuIpFgaJpZM4TuIe0.

GrumpyOldPizza commented 6 years ago

Ack. With OTAA join, the stack forces the data rate to DR_0 for join, and overrides the user selection. It was supposed to revert back to the default (i.e. your override), but doesn't.

On Tue, May 1, 2018 at 10:21 AM, SELT notifications@github.com wrote:

Thomas:

I have ADR disabled and am setting the DataRates explicitly. I can see from the server that the SF and BW are as expected, but The Tx fails for payload sizes > 11.

Jon

On May 1, 2018, at 11:16 AM, Thomas Roell notifications@github.com wrote:

Do you have ADR enabled ? If so, then the stack will start off with DR_0 (i.e. 11 bytes for US915), or whatever you had set via LoRaWAN.setDataRate() and then wait for the gateway to switch different data rates that would allow more payload.

If you disable ADR, then you can set explicitly the data rate and hence get larger payloads.

  • Thomas

On Tue, May 1, 2018 at 10:07 AM, SELT notifications@github.com wrote:

It appears that the LoRa payload size is limited to 11 bytes for all data rates. Tested specifically for data rates 2 and 3.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/ AG4QfLP53NisVi84HUBjrs5Bo8az-ho2ks5tuIhbgaJpZM4TuIe0 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385712596, or mute the thread https://github.com/notifications/unsubscribe- auth/ADVIKwRqfx7spWMDS9-bNi3_8JqFpwkSks5tuIpFgaJpZM4TuIe0.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385713922, or mute the thread https://github.com/notifications/unsubscribe-auth/AG4QfKM-k9P4O1kVfVHLWK926BzpLfsCks5tuItvgaJpZM4TuIe0 .

ghost commented 6 years ago

Thomas:

Looks like the DataRate reverts back OK, just not the ma payload size.

Jon

On May 1, 2018, at 11:55 AM, Thomas Roell notifications@github.com wrote:

Ack. With OTAA join, the stack forces the data rate to DR_0 for join, and overrides the user selection. It was supposed to revert back to the default (i.e. your override), but doesn't.

On Tue, May 1, 2018 at 10:21 AM, SELT notifications@github.com wrote:

Thomas:

I have ADR disabled and am setting the DataRates explicitly. I can see from the server that the SF and BW are as expected, but The Tx fails for payload sizes > 11.

Jon

On May 1, 2018, at 11:16 AM, Thomas Roell notifications@github.com wrote:

Do you have ADR enabled ? If so, then the stack will start off with DR_0 (i.e. 11 bytes for US915), or whatever you had set via LoRaWAN.setDataRate() and then wait for the gateway to switch different data rates that would allow more payload.

If you disable ADR, then you can set explicitly the data rate and hence get larger payloads.

  • Thomas

On Tue, May 1, 2018 at 10:07 AM, SELT notifications@github.com wrote:

It appears that the LoRa payload size is limited to 11 bytes for all data rates. Tested specifically for data rates 2 and 3.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/ AG4QfLP53NisVi84HUBjrs5Bo8az-ho2ks5tuIhbgaJpZM4TuIe0 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385712596, or mute the thread https://github.com/notifications/unsubscribe- auth/ADVIKwRqfx7spWMDS9-bNi3_8JqFpwkSks5tuIpFgaJpZM4TuIe0.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385713922, or mute the thread https://github.com/notifications/unsubscribe-auth/AG4QfKM-k9P4O1kVfVHLWK926BzpLfsCks5tuItvgaJpZM4TuIe0 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385722890, or mute the thread https://github.com/notifications/unsubscribe-auth/ADVIK8pZvP-RSNQQhE3MRippT4LOmDw_ks5tuJN4gaJpZM4TuIe0.

GrumpyOldPizza commented 6 years ago

Not quite. There is a pre-check as to whether the size of the packet will fit. And that one fails because the data rate does not come back in time.

On Tue, May 1, 2018 at 10:59 AM, SELT notifications@github.com wrote:

Thomas:

Looks like the DataRate reverts back OK, just not the ma payload size.

Jon

On May 1, 2018, at 11:55 AM, Thomas Roell notifications@github.com wrote:

Ack. With OTAA join, the stack forces the data rate to DR_0 for join, and overrides the user selection. It was supposed to revert back to the default (i.e. your override), but doesn't.

On Tue, May 1, 2018 at 10:21 AM, SELT notifications@github.com wrote:

Thomas:

I have ADR disabled and am setting the DataRates explicitly. I can see from the server that the SF and BW are as expected, but The Tx fails for payload sizes > 11.

Jon

On May 1, 2018, at 11:16 AM, Thomas Roell notifications@github.com wrote:

Do you have ADR enabled ? If so, then the stack will start off with DR_0 (i.e. 11 bytes for US915), or whatever you had set via LoRaWAN.setDataRate() and then wait for the gateway to switch different data rates that would allow more payload.

If you disable ADR, then you can set explicitly the data rate and hence get larger payloads.

  • Thomas

On Tue, May 1, 2018 at 10:07 AM, SELT notifications@github.com wrote:

It appears that the LoRa payload size is limited to 11 bytes for all data rates. Tested specifically for data rates 2 and 3.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/ AG4QfLP53NisVi84HUBjrs5Bo8az-ho2ks5tuIhbgaJpZM4TuIe0 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385712596, or mute the thread https://github.com/notifications/unsubscribe- auth/ADVIKwRqfx7spWMDS9-bNi3_8JqFpwkSks5tuIpFgaJpZM4TuIe0.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore- stm32l0/issues/8#issuecomment-385713922, or mute the thread https://github.com/notifications/unsubscribe-auth/AG4QfKM- k9P4O1kVfVHLWK926BzpLfsCks5tuItvgaJpZM4TuIe0 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385722890, or mute the thread https://github.com/notifications/unsubscribe- auth/ADVIK8pZvP-RSNQQhE3MRippT4LOmDw_ks5tuJN4gaJpZM4TuIe0.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/8#issuecomment-385724063, or mute the thread https://github.com/notifications/unsubscribe-auth/AG4QfKZ53lTZykgGfQwAX1cMinfhT4gYks5tuJRggaJpZM4TuIe0 .

GrumpyOldPizza commented 6 years ago

Fixed. Issue was at the end of that day that LoRaMacQueryTxPossible() had no way to consider a user supplied datarate.