We’re trying to use gRPC to get Device data formatted like on the Device Data tab
We tried using StreamFrameLogsForDevice but the returned data appears like the Lorawan Frames data on the Device page.
{
"downlinkFrame": {
"phyPayload": "YOFqfgCgmQAItCTR",
"txInfo": {
"gatewayId": "",
"frequency": 868100000,
"power": 14,
"modulation": "LORA",
"board": 261,
"antenna": 0,
"timing": "DELAY",
"context": "1cRqNA==",
"loraModulationInfo": {
"bandwidth": 125,
"spreadingFactor": 7,
"codeRate": "4/5",
"polarizationInversion": true
},
"modulationInfo": "loraModulationInfo",
"delayTimingInfo": {
"delay": {
"seconds": "1",
"nanos": 0
}
},
"timingInfo": "delayTimingInfo"
},
"token": 41745,
"downlinkId": "oxE/hO90SQi6/xQgnznRRA==",
"gatewayId": "cnb/ADkECKk=",
"mType": "UnconfirmedDataDown",
"devAddr": "AH5q4Q==",
"devEui": "",
"publishedAt": {
"seconds": "1674828945",
"nanos": 132321407
}
},
"frame": "downlinkFrame"
}
Yet the device data looks more like
[
{
"type": "up",
"payload": {
"applicationID": "1",
"applicationName": "test-app",
"deviceName": "lacuna-test-01",
"devEUI": "c+TNV/mNM/Q=",
"rxInfo": [],
"txInfo": {
"frequency": 868100000,
"modulation": "LORA",
"loRaModulationInfo": {
"bandwidth": 125,
"spreadingFactor": 12,
"codeRate": "4/5",
"polarizationInversion": true
}
},
"adr": false,
"dr": 0,
"fCnt": 1,
"fPort": 1,
"data": "AQIDBA==",
"objectJSON": "",
"tags": {},
"confirmedUplink": false,
"devAddr": "/AF9BQ==",
"publishedAt": "2023-02-24T13:40:53.695962210Z",
"deviceProfileID": "5073fa60-045d-40c5-a635-f44af2641095",
"deviceProfileName": "test-abp-device-profile"
}
},
{
"type": "up",
"payload": {
"applicationID": "1",
"applicationName": "test-app",
"deviceName": "lacuna-test-01",
"devEUI": "c+TNV/mNM/Q=",
"rxInfo": [],
"txInfo": {
"frequency": 868100000,
"modulation": "LORA",
"loRaModulationInfo": {
"bandwidth": 125,
"spreadingFactor": 12,
"codeRate": "4/5",
"polarizationInversion": true
}
},
"adr": false,
"dr": 0,
"fCnt": 0,
"fPort": 1,
"data": "ECAwQFA=",
"objectJSON": "",
"tags": {},
"confirmedUplink": false,
"devAddr": "/AF9BQ==",
"publishedAt": "2023-02-14T12:56:51.548681538Z",
"deviceProfileID": "5073fa60-045d-40c5-a635-f44af2641095",
"deviceProfileName": "test-abp-device-profile"
}
}
Can someone steer us in the right direction, please?