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

Empty lora payload sent on port 0 #177

Open
jpmeijers opened this issue Mar 3, 2021 · 1 comment
Open

Empty lora payload sent on port 0 #177

jpmeijers opened this issue Mar 3, 2021 · 1 comment

Comments

@jpmeijers
Copy link

If I send a lorawan message with an empty payload, even if I specify a port, the message is sent on port 0. This is invalid, as port 0 is reserved for mac commands.

Screenshot from 2021-03-03 08-47-07

@jpmeijers
Copy link
Author

I believe the issue is related to this block of code:

if( ( payload != NULL ) && ( LoRaMacTxPayloadLen > 0 ) )
{
LoRaMacBuffer[pktHeaderLen++] = framePort;

The port is only added to the payload if the payload is > 0, but that should be >=0.

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

No branches or pull requests

1 participant