Decoding base64 devEUI, gatewayID no valid base64

Hi,

I’m trying to decode some of the data I get returned from the HTTP endpoint.
For some reason it fails to decode the encoded fields (except the payload, this works).
I test the decoding on different sites such as Base64 Decode - Online Tools
If you insert the GatewayID (AIAAAKAAAhg=) it says invalid format.

HTTP POST:
> {

“applicationID”:“2”,
“applicationName”:“pilot-app-v1”,
“deviceName”:“pilot-module-b5-aa”,
“devEUI”:“AIAAAAQBtao=”,
“rxInfo”:[
{
“gatewayID”:“AIAAAKAAAhg=”,
“time”:null,
“timeSinceGPSEpoch”:null,
“rssi”:-83,
“loRaSNR”:7,
“channel”:0,
“rfChain”:1,
“board”:0,
“antenna”:0,
“location”:{
“latitude”:39.95701,
“longitude”:-105.16032,
“altitude”:1664,
“source”:“UNKNOWN”,
“accuracy”:0
},
“fineTimestampType”:“NONE”,
“context”:“G+nPRA==”,
“uplinkID”:“Y6W2psl1SA+yP2cfd6x7hg==”,
“crcStatus”:“CRC_OK”
}
],
“txInfo”:{
“frequency”:868100000,
“modulation”:“LORA”,
“loRaModulationInfo”:{
“bandwidth”:125,
“spreadingFactor”:12,
“codeRate”:“4/5”,
“polarizationInversion”:false
}
},
“adr”:false,
“dr”:0,
“fCnt”:12,
“fPort”:1,
“data”:“MCwwLDAsMCwwLDA=”,
“objectJSON”:“”,
“tags”:{

},
“confirmedUplink”:false,
“devAddr”:“AT8eFg==”,
“publishedAt”:“2021-10-14T14:20:11.865119228Z”
}

Thanks,
Roel.

Hmm, both decoded just fine on https://base64.guru/converter/decode/hex:
(devEUI) AIAAAAQBtao= to 008000000401b5aa
(gatewayID) AIAAAKAAAhg= to 00800000a0000218

Whether that’s right, only you know :slight_smile:

1 Like

Thanks, I did not convert it to hex, forgot that the ID’s are in HEX…