A LoRaWAN nodes' and network simulator that works with a real LoRaWAN environment (such as Chirpstack) and equipped with a web interface for real-time interaction.
Hi
I tried sending "51282412059f23190000000000000000000000000000000000000000000000000000000000000000" in device payload and i am getting base64 encoded data on chirpstack as
NTEyODI0MTIwNTlmMjMxOTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=
whereas expected encoded data is
USgkEgWfIxkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
i tried finding the issue and in order to get this data correctly i need to do a hex decode , but i am not sure where to do it
Hi I tried sending "51282412059f23190000000000000000000000000000000000000000000000000000000000000000" in device payload and i am getting base64 encoded data on chirpstack as NTEyODI0MTIwNTlmMjMxOTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=
whereas expected encoded data is USgkEgWfIxkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
i tried finding the issue and in order to get this data correctly i need to do a hex decode , but i am not sure where to do it
i am addding the sample sudo code here
package main
import ( "encoding/base64" "encoding/hex" "fmt" )
func main() { fmt.Printf("expected: \n USgkEgWfIxkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==") payload := "51282412059f23190000000000000000000000000000000000000000000000000000000000000000"
}
func decodeHex(input []byte) []byte { db := make([]byte, hex.DecodedLen(len(input))) hex.Decode(db, input) return db }
kindly suggest where this decodeHex needs to be put