I have successfuly implemented HTTP integration, but I am having trouble decoding the devEUI and gatewayID.
The applicationID, applicationName, deviceName are sent over as expected (exactly as they are set in server settings). However devEUI and gatewayID seems to be encoded and I can’t find a way to decode them.
i.e. the devEUI is 0018b200000229e6, but on the server endpoint I receive ABiyAAACKeY=
I have a custom codec (payload decoder funcion) for the actual data, bu even if I remove it - the result is the same!
The documentation is stating that:
“The Protocol Buffers [JSON Mapping] defines that bytes must be encoded as base64 strings. This also affects the
gatewayID field. When re-encoding this filed to HEX encoding, you will find the expected gateway ID string.”
Nothing I do returns the ID…
Please advise - how to get the actual devEUI and gatewayID from the HTTP endpoint?
that’s base64. Dont know which language you are using, you might want to convert that to bytes and string it when you need it. Don’t forget there is an official API package.
Did you solved? I’ve STUCK too. That can’t decode base64. How can I fix that?
If you use MQTT as the integration you do not get this, if you want to use HTTP, you will need to encode/decode base64 to HEX in YOUR application…
Folks, you got to state which programming language and OS you’re using…
Python, Golang, PHP: Base64 in every programming language | Base64 Encode And Decode
PHP: how to convert from base64 to hexadecimal in php? - Stack Overflow
Pascal: DecodeStringBase64() - could not understand output
C#: c# - Conversion between Base64String and Hexadecimal - Stack Overflow
C/C++: open source - Library to convert between Base64 & hex for c++ - Software Recommendations Stack Exchange
VBScript/Basic: VBScript read/write binary, encode/decode Base64 | GHads mind
Standalone CLI: decode base64 or hex data on the command line: sfk decode
Ruby: Module: Base64 (Ruby 2.5.3)
Your language is missing? replace BLAH with your language in this link.
I also had similar kind of issue on HTTP integration. I resolved it by decoding base64 to HEX in application.
I am using python and resolved using following snippets: