[riot-notifications] [RIOT-OS/RIOT] net/gnrc_lorawan: implement unconfirmed uplink redundancy (#15946)

José Alamos notifications at github.com
Tue Jul 13 22:49:41 CEST 2021


Test results:
```
2021-07-13 22:41:29,264 # reboot
2021-07-13 22:41:29,308 # NETOPT_RX_END_IRQ not implemented by driver
2021-07-13 22:41:29,317 # main(): This is RIOT! (Version: 2021.10-devel-144-gac94f-pr/gnrc_lorawan_redundancy)
2021-07-13 22:41:29,321 # Initialization successful - starting the shell now
ifconfig 3 set dr 5
2021-07-13 22:41:32,417 # ifconfig 3 set dr 5
2021-07-13 22:41:32,421 # success: set datarate on interface 3 to 5
> ifconfig 3 -ack_req
2021-07-13 22:41:36,809 # ifconfig 3 -ack_req
2021-07-13 22:41:36,811 # success: unset option
> ifconfig 3 up
2021-07-13 22:41:39,359 # ifconfig 3 up
> ifconfig
2021-07-13 22:41:58,838 # ifconfig
2021-07-13 22:41:58,848 # Iface  3  HWaddr: 01:26:96:73  Frequency: 868299987Hz  RSSI: 99  BW: 125kHz  SF: 7  CR: 4/5  Link: up 
2021-07-13 22:41:58,856 #            TX-Power: 14dBm  State: SLEEP  Demod margin.: 0  Num gateways.: 0 
2021-07-13 22:41:58,858 #           IQ_INVERT  
2021-07-13 22:41:58,862 #           RX_SINGLE  OTAA  L2-PDU:767  
2021-07-13 22:41:58,863 #           
> txtsnd 3 01 RIOT
2021-07-13 22:42:06,649 # txtsnd 3 01 RIOT
> txtsnd 3 01 RIOT
2021-07-13 22:42:30,223 # txtsnd 3 01 RIOT
> 

```

I configured the redundancy to 2. With that, every uplink is sent 3 times.

Here's the output of the network server. As expected, the Unconfirmed uplinks are sent 3 times.

<details>

```
[
    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "gatewayID": "uCfr//4apBU=",
                    "time": null,
                    "timeSinceGPSEpoch": null,
                    "rssi": -51,
                    "loRaSNR": 8,
                    "channel": 5,
                    "rfChain": 0,
                    "board": 0,
                    "antenna": 0,
                    "location": {
                        "latitude": 0,
                        "longitude": 0,
                        "altitude": 0,
                        "source": "UNKNOWN",
                        "accuracy": 0
                    },
                    "fineTimestampType": "NONE",
                    "context": "W/FeRA==",
                    "uplinkID": "kGd83sM4QNm2mBbdhxEkiA==",
                    "crcStatus": "CRC_OK"
                }
            ],
            "txInfo": {
                "frequency": 867500000,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 7,
                    "codeRate": "4/5",
                    "polarizationInversion": false
                }
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "UnconfirmedDataUp",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "fhdr": {
                    "devAddr": "01269673",
                    "fCtrl": {
                        "adr": false,
                        "adrAckReq": false,
                        "ack": false,
                        "fPending": false,
                        "classB": false
                    },
                    "fCnt": 1,
                    "fOpts": null
                },
                "fPort": 1,
                "frmPayload": [
                    {
                        "bytes": "Dhawmg=="
                    }
                ]
            },
            "mic": "9523250d"
        }
    },
    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "gatewayID": "uCfr//4apBU=",
                    "time": null,
                    "timeSinceGPSEpoch": null,
                    "rssi": -54,
                    "loRaSNR": 9.5,
                    "channel": 1,
                    "rfChain": 1,
                    "board": 0,
                    "antenna": 0,
                    "location": {
                        "latitude": 0,
                        "longitude": 0,
                        "altitude": 0,
                        "source": "UNKNOWN",
                        "accuracy": 0
                    },
                    "fineTimestampType": "NONE",
                    "context": "W7IZEw==",
                    "uplinkID": "BiMIKdkLSuKf1oWAvla2wA==",
                    "crcStatus": "CRC_OK"
                }
            ],
            "txInfo": {
                "frequency": 868300000,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 7,
                    "codeRate": "4/5",
                    "polarizationInversion": false
                }
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "UnconfirmedDataUp",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "fhdr": {
                    "devAddr": "01269673",
                    "fCtrl": {
                        "adr": false,
                        "adrAckReq": false,
                        "ack": false,
                        "fPending": false,
                        "classB": false
                    },
                    "fCnt": 1,
                    "fOpts": null
                },
                "fPort": 1,
                "frmPayload": [
                    {
                        "bytes": "Dhawmg=="
                    }
                ]
            },
            "mic": "9523250d"
        }
    },
    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "gatewayID": "uCfr//4apBU=",
                    "time": null,
                    "timeSinceGPSEpoch": null,
                    "rssi": -51,
                    "loRaSNR": 8,
                    "channel": 5,
                    "rfChain": 0,
                    "board": 0,
                    "antenna": 0,
                    "location": {
                        "latitude": 0,
                        "longitude": 0,
                        "altitude": 0,
                        "source": "UNKNOWN",
                        "accuracy": 0
                    },
                    "fineTimestampType": "NONE",
                    "context": "W2IaXA==",
                    "uplinkID": "YwfxnxotTZ6khaREOfZ/aw==",
                    "crcStatus": "CRC_OK"
                }
            ],
            "txInfo": {
                "frequency": 867500000,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 7,
                    "codeRate": "4/5",
                    "polarizationInversion": false
                }
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "UnconfirmedDataUp",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "fhdr": {
                    "devAddr": "01269673",
                    "fCtrl": {
                        "adr": false,
                        "adrAckReq": false,
                        "ack": false,
                        "fPending": false,
                        "classB": false
                    },
                    "fCnt": 1,
                    "fOpts": null
                },
                "fPort": 1,
                "frmPayload": [
                    {
                        "bytes": "Dhawmg=="
                    }
                ]
            },
            "mic": "9523250d"
        }
    },
    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "gatewayID": "uCfr//4apBU=",
                    "time": null,
                    "timeSinceGPSEpoch": null,
                    "rssi": -51,
                    "loRaSNR": 7,
                    "channel": 5,
                    "rfChain": 0,
                    "board": 0,
                    "antenna": 0,
                    "location": {
                        "latitude": 0,
                        "longitude": 0,
                        "altitude": 0,
                        "source": "UNKNOWN",
                        "accuracy": 0
                    },
                    "fineTimestampType": "NONE",
                    "context": "Woi7xA==",
                    "uplinkID": "D+3Hc2MMTVKAXReusmkDaw==",
                    "crcStatus": "CRC_OK"
                }
            ],
            "txInfo": {
                "frequency": 867500000,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 7,
                    "codeRate": "4/5",
                    "polarizationInversion": false
                }
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "UnconfirmedDataUp",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "fhdr": {
                    "devAddr": "01269673",
                    "fCtrl": {
                        "adr": false,
                        "adrAckReq": false,
                        "ack": false,
                        "fPending": false,
                        "classB": false
                    },
                    "fCnt": 0,
                    "fOpts": null
                },
                "fPort": 1,
                "frmPayload": [
                    {
                        "bytes": "8+adQA=="
                    }
                ]
            },
            "mic": "02113e77"
        }
    },
    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "gatewayID": "uCfr//4apBU=",
                    "time": null,
                    "timeSinceGPSEpoch": null,
                    "rssi": -57,
                    "loRaSNR": 7,
                    "channel": 2,
                    "rfChain": 1,
                    "board": 0,
                    "antenna": 0,
                    "location": {
                        "latitude": 0,
                        "longitude": 0,
                        "altitude": 0,
                        "source": "UNKNOWN",
                        "accuracy": 0
                    },
                    "fineTimestampType": "NONE",
                    "context": "WjqWEw==",
                    "uplinkID": "cPnNyigAQEqWa7orlG2Beg==",
                    "crcStatus": "CRC_OK"
                }
            ],
            "txInfo": {
                "frequency": 868500000,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 7,
                    "codeRate": "4/5",
                    "polarizationInversion": false
                }
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "UnconfirmedDataUp",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "fhdr": {
                    "devAddr": "01269673",
                    "fCtrl": {
                        "adr": false,
                        "adrAckReq": false,
                        "ack": false,
                        "fPending": false,
                        "classB": false
                    },
                    "fCnt": 0,
                    "fOpts": null
                },
                "fPort": 1,
                "frmPayload": [
                    {
                        "bytes": "8+adQA=="
                    }
                ]
            },
            "mic": "02113e77"
        }
    },
    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "gatewayID": "uCfr//4apBU=",
                    "time": null,
                    "timeSinceGPSEpoch": null,
                    "rssi": -53,
                    "loRaSNR": 9,
                    "channel": 6,
                    "rfChain": 0,
                    "board": 0,
                    "antenna": 0,
                    "location": {
                        "latitude": 0,
                        "longitude": 0,
                        "altitude": 0,
                        "source": "UNKNOWN",
                        "accuracy": 0
                    },
                    "fineTimestampType": "NONE",
                    "context": "WfpmhA==",
                    "uplinkID": "HKsZMNwZTsioZya/f8E5ww==",
                    "crcStatus": "CRC_OK"
                }
            ],
            "txInfo": {
                "frequency": 867700000,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 7,
                    "codeRate": "4/5",
                    "polarizationInversion": false
                }
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "UnconfirmedDataUp",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "fhdr": {
                    "devAddr": "01269673",
                    "fCtrl": {
                        "adr": false,
                        "adrAckReq": false,
                        "ack": false,
                        "fPending": false,
                        "classB": false
                    },
                    "fCnt": 0,
                    "fOpts": null
                },
                "fPort": 1,
                "frmPayload": [
                    {
                        "bytes": "8+adQA=="
                    }
                ]
            },
            "mic": "02113e77"
        }
    },
    {
        "downlinkMetaData": {
            "gatewayID": "b827ebfffe1aa415",
            "txInfo": {
                "frequency": 868300000,
                "power": 14,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 7,
                    "codeRate": "4/5",
                    "polarizationInversion": true
                },
                "board": 0,
                "antenna": 0,
                "timing": "DELAY",
                "delayTimingInfo": {
                    "delay": "5s"
                },
                "context": "WGtvEw=="
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "JoinAccept",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "bytes": "IXEaSLwUYEJxEpJCDZ1luLNZpnkX4BIdqWclRw=="
            },
            "mic": "8c7fb5ca"
        }
    },
    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "gatewayID": "uCfr//4apBU=",
                    "time": null,
                    "timeSinceGPSEpoch": null,
                    "rssi": -57,
                    "loRaSNR": 9.75,
                    "channel": 1,
                    "rfChain": 1,
                    "board": 0,
                    "antenna": 0,
                    "location": {
                        "latitude": 0,
                        "longitude": 0,
                        "altitude": 0,
                        "source": "UNKNOWN",
                        "accuracy": 0
                    },
                    "fineTimestampType": "NONE",
                    "context": "WGtvEw==",
                    "uplinkID": "dL4QJacTTuW2MxhgVNF33Q==",
                    "crcStatus": "CRC_OK"
                }
            ],
            "txInfo": {
                "frequency": 868300000,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 7,
                    "codeRate": "4/5",
                    "polarizationInversion": false
                }
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "JoinRequest",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "joinEUI": "0000000000000000",
                "devEUI": "488038d49a5a156b",
                "devNonce": 14402
            },
            "mic": "7a69ba7b"
        }
    }
]
```

</details>

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15946#issuecomment-879392680
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210713/db1333fa/attachment-0001.htm>


More information about the notifications mailing list