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

Decrypted LoRa data appears corrupted? #66

Closed
wedgie32 opened this issue Jun 26, 2023 · 3 comments
Closed

Decrypted LoRa data appears corrupted? #66

wedgie32 opened this issue Jun 26, 2023 · 3 comments

Comments

@wedgie32
Copy link

Hi,

I'm using this sketch to push data to Chirpstack v4. It seems the data is getting corrupted on the way through? The payload looks okay:

data:"AQfoFWoAAXMuAABExw=="

but when I try and parse it, I get:

data:"��è�j�s.DÇ"

Not sure how to troubleshoot this?

@beegee-tokyo
Copy link
Collaborator

beegee-tokyo commented Jun 29, 2023

What do you mean with decrypt? The payload AQfoFWoAAXMuAABExw== is Base64 format and already decrypted.
Decoding it from Base64 into a byte array results in {0x01, 0x07, 0xe8, 0x15, 0x6a, 0x00, 0x01, 0x73, 0x2e, 0x00, 0x00, 0x44, 0xc7} and depending on which example you use (I am guessing it is the Environment Monitoring) this results into (following the payload description):

0x01 ==> Environment data
0x07 0xe8 ==> temperature = 2024 ==> 20.24 degree C
0x15 0x6a ==> humidity = 5486 ==> 54.86 % RH
0x00 0x01 0x73 0x2e ==> barometric pressure = 95022 ==> 950.22 hPa
0x00 0x00 0x44 0xc7 ==> gas resistance = 17607 = 17607 Ohm

@beegee-tokyo
Copy link
Collaborator

Answered in forum

@wedgie32
Copy link
Author

My apologies and thank you for the clear explanation. I've been struggling with some of the LoRa concepts, and the encoding/decoding part was the trickiest. Your explanation has helped me hugely. 👍

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

2 participants