brocaar / chirpstack-network-server

ChirpStack Network Server is an open-source LoRaWAN network-server.
https://www.chirpstack.io
MIT License
1.48k stars 545 forks source link

No answer to mac command LinkCheckReq when uplink use LR-FHSS #578

Open Achichig opened 2 years ago

Achichig commented 2 years ago

What happened?

When I ask my device, configured to use LR-FHSS modulation only, to send a LinkCheckReq, Chirpstack network server does not generate a LinkCheckAns.

What did you expect?

I am expecting chirpstack ns to generate a LinkCheckAns when we are using LR-FHSS modulation for sending LinkCheckReq, the same way as when using the lora modulation.

Steps to reproduce this issue

Steps:

  1. Configure the device to use LR-FHSS modulation
  2. Send a LinkCheckReq

Could you share your log output?

image

gateway/…/event/up topic: gateway/acacacacacacac11/event/up {"phyPayload":"QBBKrAAAHQAAfnyRIzE=","txInfo":{"frequency":904600000,"modulation":"LR_FHSS","lrFHSSModulationInfo":{"operatingChannelWidth":1523000,"codeRate":"1/3","gridSteps":52}},"rxInfo":{"gatewayID":"rKysrKysrBE=","time":null,"timeSinceGPSEpoch":null,"rssi":-38,"loRaSNR":0,"channel":1,"rfChain":0,"board":0,"antenna":0,"location":null,"fineTimestampType":"NONE","context":"h1tAAA==","uplinkID":"9Eda8C97RYGP5zvuVO/qsA==","crcStatus":"CRC_OK"}}

Nothing shows up on the gateway/…/command/down and gateway/…/event/ack topics

Your Environment

Component Version
Application Server v3.17.6
Network Server v3.16.1
Gateway Bridge v3.13.2
Chirpstack API X
Geolocation X
Concentratord X
IoTThinks commented 2 years ago

Hi @Achichig, I'm keen to test the LR-FHSS too. How should we set the gateway-profile to support LR-FHSS? We need to add bandwidth 137kHz, 336kHz and 1.523MHz in the gateway-profile?

image

Achichig commented 2 years ago

Hello IoTThinks,

I did not configure a gateway-profile in my case. I force the end-device to use LR-FHSS modulation by configuring a mobile ADR profile with all DR5 and I have configured the packet forwarder of my gateway to use LR-FHSS modulation (US915 frequency plan):

        "lr_fhss_conf": {
            "enable": true,
            "rf_chain": 0,
            "center_freq": 904600000,
            "syncword": "2C0F7995",
            "chan_cfg": [ 
                { "freq_hz": 903000000, "ocw": 1523000 }, 
                { "freq_hz": 904600000, "ocw": 1523000 }, 
                { "freq_hz": 906200000, "ocw": 1523000 }, 
                { "freq_hz": 907800000, "ocw": 1523000 }, 
                { "freq_hz": 909400000, "ocw": 1523000 }, 
                { "freq_hz": 911000000, "ocw": 1523000 }, 
                { "freq_hz": 912600000, "ocw": 1523000 },
                { "freq_hz": 914200000, "ocw": 1523000}
            ]
        },

For EU868, the configuration should be:

    "lr_fhss_conf": { 
            "enable": true, 
            "rf_chain": 0, 
            "center_freq": 868000000, 
            "syncword": "2C0F7995", 
            "chan_cfg": [ /* 16 virtual channels maximum */ 
                { "freq_hz": 867200000, "ocw": 137000 }, /* 200kHz channel */ 
                { "freq_hz": 867400000, "ocw": 137000 }, /* 200kHz channel */ 
                { "freq_hz": 867600000, "ocw": 137000 }, /* 200kHz channel */ 
                { "freq_hz": 867800000, "ocw": 137000 }, /* 200kHz channel */ 
                { "freq_hz": 868000000, "ocw": 137000 }, /* 200kHz channel */ 
                { "freq_hz": 868200000, "ocw": 137000 }, /* 200kHz channel */ 
                { "freq_hz": 868600000, "ocw": 336000 }  /* 400kHz channel */ 
            ] 
        }, 
IoTThinks commented 2 years ago

@Achichig Thanks a lot. I will see how to do with my gateway and my node.

brocaar commented 2 years ago

I believe the issue is since the NS can't return the margin for LR-FHSS:

image

For LoRa uplinks, ChirpStack uses the SNR reported by the gateway to derive the margin above demodulation floor. Unfortunately, gateways don't report any SNR (yet?) for the LR-FHSS modulation.

IoTThinks commented 2 years ago

@brocaar So the issue is at gateway?

I'm keen to test lf-fhss with ChirpStack. Is there any hint how to implement a node to use lr-fhss? Thanks a lot.

brocaar commented 2 years ago

@IoTThinks I think we are mixing two things in this discussion, what is needed to test LR-FHSS and the LinkCheckReq issue. My answer was related to the latter as the current LR-FHSS implementation does not report any SNR for a received uplink (as far as I'm aware). I think this is not related to a a specific gateway but to the LR-FHSS implementation itself.

If you want to test out LR-FHSS, see https://github.com/Lora-net/LoRaMac-node. According to the README it supports LR-FHSS. Please note you also need a LR-FHSS capable gateway.

IoTThinks commented 2 years ago

@brocaar Thanks a lot for your detail explanation.

Appreciate it.