Downlink Messages and SF Changes for Elvaco CMI 4160

Dear TTN Community,

I hope this message finds you well.

I have recently installed an Elvaco CMI 4160 device and successfully joined it to The Things Network (TTN). The device operated as expected for the first three weeks, consistently transmitting data. However, I have noticed that TTN has started sending downlink messages to my end device every hour after more than 300 messages with no downlink.

Additionally, I have observed the following issues:

  1. SF Changes: The Over-The-Air (OTA) updates have started to change the Spreading Factor (SF) from 9 to 10, and quickly to 11. Based on the Signal-to-Noise Ratio (SNR), these changes should not have been triggered.
  2. Static ADR Configuration: I attempted to set up the Adaptive Data Rate (ADR) to be static at ADR3, but I am unable to change it back to SF9.

Summary

I am seeking assistance to understand and resolve the following:

  1. Reason for Downlink Messages: Could you help clarify why TTN might be sending these downlink messages every hour? Is this a normal part of the networkā€™s operation, or could it indicate an issue with my device or configuration?
    I really want to have no downlink.
  2. SF Changes and SNR: Why might the SF be changing despite the SNR not indicating a need for such adjustments? Is there a way to prevent unnecessary SF changes?
  3. Configuration Adjustments: Are there specific configuration adjustments or settings I should review or modify to better manage or reduce unnecessary downlink messages and revert to SF9?

Current Device Settings

Here are the current settings configured for my device:

{
  "mac_settings": {
    "supports_32_bit_f_cnt": true,
    "status_time_periodicity": "0s",
    "status_count_periodicity": 0,
    "desired_rx1_delay": 5,
    "desired_rx1_data_rate_offset": 2,
    "desired_rx2_data_rate_index": 0,
    "desired_rx2_frequency": "869525000",
    "desired_max_duty_cycle": "DUTY_CYCLE_1",
    "adr": {
      "dynamic": {
        "margin": 15
      }
    }
  }
}

Best regards,
Patrick

ADR is the mechanism adjusting the SF, not OTA. And for increasing SF the device is in control, not the network.

Can you explain what you mean with ADR3? Is this something vendor specific? Or do you mean DR3?

Not without knowing what is being transmitted to the device. Can you enable verbose messages and check what TTN is sending? (And report back so we know too)

Does the device use unconfirmed or confirmed messages? Does it use a mechanism to check the link? If so that might be why it switches to higher spreading factors over time if it doesnā€™t get the expected response.

Thank you for your quick reply.
sorry for using incorrect terms.
As the device used SF9 for 3 weeks. I try to get why this change occurs.
reading rhe documentation page 13 of the CMI: cmi4160 users manual english.pdf (elvaco.com)
the device is in eco mode and is using standard message format .
I wanted to say Data Rate 3 (DR3)

My objective is to keep the device using SF9 as no messages are lost dans the objective to stay in eco mode for the device (11 years) and having 1 message per hour.

I have to admit I didnā€™t find on the TTN console where I can activate verbose mode to provide the details of the messages.
All messages are marked unconfirmed.

In the live data view at the top of the incoming information. Ctrl/Cmd-F & type ā€œVerā€ ā€¦

1 Like

Maybe something else has changed in the area that occasionally interferes with an uplink - either something else on the ISM band or a physical item - dumper truck coming & going.

Ideally you need to list at least the last 10 or more SNRā€™s of the uplinks for a single device. 20 is good, 30 is plenty. Then we can run the algorithm manually or most likely, see some outlier SNRs that are causing the issue.

Hi @descartes
while waiting for capturing messages with the verbose mode,
I extracted for the last messages the rssi, snr and SF:
The numbers are not excellent but stables.
On the application side, no messages are lost.
The algorithme decided today to increase the SF to 12.
To stay below the 30 seconds limit per day I have now 1 message every 3 hours
From the beginning, with my gateway with bad placement I received messages with rssi -119 and snr around -15

{"time":"2024-07-24T00:06:30.807572Z","rssi":-98,"snr":5.8,"spreading_factor":9}
{"time":"2024-07-24T01:06:31.649214Z","rssi":-100,"snr":2.5,"spreading_factor":9}
{"time":"2024-07-24T02:06:30.842266Z","rssi":-102,"snr":5.8,"spreading_factor":9}
{"time":"2024-07-24T03:06:32.163896Z","rssi":-102,"snr":7.8,"spreading_factor":9}
{"time":"2024-07-24T04:06:31.234068Z","rssi":-96,"snr":6.8,"spreading_factor":9}
{"time":"2024-07-24T05:06:31.188309Z","rssi":-98,"snr":11.2,"spreading_factor":9}
{"time":"2024-07-24T06:06:32.934696Z","rssi":-98,"snr":5.2,"spreading_factor":9}
{"time":"2024-07-24T07:06:32.643869Z","rssi":-98,"snr":10,"spreading_factor":9}
{"time":"2024-07-24T08:06:32.093926Z","rssi":-93,"snr":8.5,"spreading_factor":9}
{"time":"2024-07-24T09:06:31.917020Z","rssi":-98,"snr":2.5,"spreading_factor":9}
{"time":"2024-07-24T10:06:32.273628Z","rssi":-102,"snr":5.8,"spreading_factor":9}
{"time":"2024-07-24T11:06:32.204663Z","rssi":-104,"snr":5.8,"spreading_factor":9}
{"time":"2024-07-24T12:06:33.108026Z","rssi":-98,"snr":5.5,"spreading_factor":9}
{"time":"2024-07-24T13:06:32.777508Z","rssi":-99,"snr":-2.8,"spreading_factor":9}
{"time":"2024-07-24T14:06:32.446600Z","rssi":-100,"snr":3,"spreading_factor":9}
{"time":"2024-07-24T15:06:33.691568Z","rssi":-102,"snr":6,"spreading_factor":9}
{"time":"2024-07-27T00:06:39.583930Z","rssi":-104,"snr":4,"spreading_factor":9}
{"time":"2024-07-27T01:06:38.038541Z","rssi":-100,"snr":-6.5,"spreading_factor":9}
{"time":"2024-07-27T02:06:38.680347Z","rssi":-102,"snr":-2,"spreading_factor":9}
{"time":"2024-07-27T03:06:38.647797Z","rssi":-107,"snr":1.8,"spreading_factor":9}
{"time":"2024-07-27T04:06:39.886106Z","rssi":-104,"snr":2,"spreading_factor":9}
{"time":"2024-07-27T05:06:39.952719Z","rssi":-104,"snr":-9.5,"spreading_factor":9}
{"time":"2024-07-27T06:06:39.915023Z","rssi":-102,"snr":-0.8,"spreading_factor":9}
{"time":"2024-07-27T07:06:39.128261Z","rssi":-100,"snr":8,"spreading_factor":9}
{"time":"2024-07-27T08:06:39.348633Z","rssi":-104,"snr":6.5,"spreading_factor":9}
{"time":"2024-07-27T09:06:40.148369Z","rssi":-98,"snr":-1.2,"spreading_factor":9}
{"time":"2024-07-27T10:06:40.225567Z","rssi":-100,"snr":6,"spreading_factor":10}
{"time":"2024-07-27T11:06:40.865618Z","rssi":-98,"snr":7.2,"spreading_factor":10}
{"time":"2024-07-27T12:06:39.672511Z","rssi":-97,"snr":6.2,"spreading_factor":10}
{"time":"2024-07-27T13:06:41.031436Z","rssi":-99,"snr":8.2,"spreading_factor":10}
{"time":"2024-07-27T14:06:40.167792Z","rssi":-99,"snr":3,"spreading_factor":10}
{"time":"2024-07-27T15:06:41.360487Z","rssi":-99,"snr":6.2,"spreading_factor":10}
{"time":"2024-07-27T16:06:41.350117Z","rssi":-99,"snr":5.8,"spreading_factor":10}
{"time":"2024-07-27T17:06:40.304272Z","rssi":-96,"snr":1.5,"spreading_factor":10}
{"time":"2024-07-27T18:06:40.257838Z","rssi":-99,"snr":4.2,"spreading_factor":10}
{"time":"2024-07-27T19:06:41.407742Z","rssi":-98,"snr":7,"spreading_factor":10}
{"time":"2024-07-27T20:06:40.346177Z","rssi":-99,"snr":4.5,"spreading_factor":10}
{"time":"2024-07-27T21:06:41.468961Z","rssi":-97,"snr":8.2,"spreading_factor":10}
{"time":"2024-07-27T22:06:41.193107Z","rssi":-97,"snr":7.2,"spreading_factor":10}
{"time":"2024-07-27T23:06:40.715870Z","rssi":-101,"snr":7.5,"spreading_factor":10}
{"time":"2024-07-28T00:06:41.736821Z","rssi":-98,"snr":6.8,"spreading_factor":10}
{"time":"2024-07-28T01:06:41.153093Z","rssi":-99,"snr":3.2,"spreading_factor":10}
{"time":"2024-07-28T02:06:41.775457Z","rssi":-98,"snr":1.2,"spreading_factor":10}
{"time":"2024-07-28T03:06:41.271104Z","rssi":-98,"snr":7.5,"spreading_factor":10}
{"time":"2024-07-28T04:06:42.225485Z","rssi":-96,"snr":8.2,"spreading_factor":10}
{"time":"2024-07-28T05:06:41.467682Z","rssi":-96,"snr":1.5,"spreading_factor":10}
{"time":"2024-07-28T06:06:42.981051Z","rssi":-95,"snr":5.8,"spreading_factor":10}
{"time":"2024-07-28T07:06:43.331965Z","rssi":-94,"snr":10.2,"spreading_factor":10}
{"time":"2024-07-28T08:06:41.961684Z","rssi":-95,"snr":7.2,"spreading_factor":10}
{"time":"2024-07-28T09:06:43.269362Z","rssi":-101,"snr":7.5,"spreading_factor":10}
{"time":"2024-07-28T10:06:42.905028Z","rssi":-99,"snr":1,"spreading_factor":10}
{"time":"2024-07-28T11:06:42.811768Z","rssi":-100,"snr":6.2,"spreading_factor":10}
{"time":"2024-07-28T12:06:42.627466Z","rssi":-98,"snr":5.8,"spreading_factor":10}
{"time":"2024-07-28T13:06:43.397055Z","rssi":-99,"snr":-0.5,"spreading_factor":10}
{"time":"2024-07-28T14:06:42.595763Z","rssi":-101,"snr":3.8,"spreading_factor":10}
{"time":"2024-07-28T15:06:43.284958Z","rssi":-101,"snr":5.2,"spreading_factor":10}
{"time":"2024-07-28T16:06:42.909071Z","rssi":-99,"snr":6.5,"spreading_factor":10}
{"time":"2024-07-28T17:06:42.626764Z","rssi":-98,"snr":0.8,"spreading_factor":10}
{"time":"2024-07-28T18:06:44.882430Z","rssi":-94,"snr":6.5,"spreading_factor":11}
{"time":"2024-07-28T19:06:45.063274Z","rssi":-100,"snr":6.5,"spreading_factor":11}
{"time":"2024-07-28T21:06:44.659801Z","rssi":-94,"snr":6.5,"spreading_factor":11}
{"time":"2024-07-28T23:06:45.028970Z","rssi":-101,"snr":1.5,"spreading_factor":11}
{"time":"2024-07-29T01:06:45.164977Z","rssi":-99,"snr":3,"spreading_factor":11}
{"time":"2024-07-29T03:06:44.686445Z","rssi":-101,"snr":4.8,"spreading_factor":11}
{"time":"2024-07-29T05:06:45.521636Z","rssi":-106,"snr":-13.2,"spreading_factor":11}
{"time":"2024-07-29T07:06:45.304187Z","rssi":-102,"snr":1,"spreading_factor":11}
{"time":"2024-07-29T09:06:45.502725Z","rssi":-106,"snr":0.2,"spreading_factor":11}
{"time":"2024-07-29T11:06:45.746379Z","rssi":-102,"snr":6,"spreading_factor":11}
{"time":"2024-07-29T13:06:46.960201Z","rssi":-99,"snr":7,"spreading_factor":11}
{"time":"2024-07-29T15:06:45.948363Z","rssi":-101,"snr":1.2,"spreading_factor":11}
{"time":"2024-07-29T01:06:45.164977Z","rssi":-99,"snr":3,"spreading_factor":11}
{"time":"2024-07-29T03:06:44.686445Z","rssi":-101,"snr":4.8,"spreading_factor":11}
{"time":"2024-07-29T05:06:45.521636Z","rssi":-106,"snr":-13.2,"spreading_factor":11}
{"time":"2024-07-29T07:06:45.304187Z","rssi":-102,"snr":1,"spreading_factor":11}
{"time":"2024-07-29T09:06:45.502725Z","rssi":-106,"snr":0.2,"spreading_factor":11}
{"time":"2024-07-29T11:06:45.746379Z","rssi":-102,"snr":6,"spreading_factor":11}
{"time":"2024-07-29T13:06:46.960201Z","rssi":-99,"snr":7,"spreading_factor":11}
{"time":"2024-07-29T15:06:45.948363Z","rssi":-101,"snr":1.2,"spreading_factor":11}
{"time":"2024-07-29T17:06:46.796317Z","rssi":-100,"snr":1.8,"spreading_factor":11}
{"time":"2024-07-29T19:06:46.925281Z","rssi":-101,"snr":7.2,"spreading_factor":11}
{"time":"2024-07-29T21:06:46.341519Z","rssi":-95,"snr":7.8,"spreading_factor":11}
{"time":"2024-07-29T23:06:47.547765Z","rssi":-99,"snr":8.2,"spreading_factor":11}
{"time":"2024-07-30T01:06:46.424057Z","rssi":-99,"snr":6.2,"spreading_factor":11}
{"time":"2024-07-30T03:06:47.940310Z","rssi":-101,"snr":6.8,"spreading_factor":11}
{"time":"2024-07-30T05:06:47.055029Z","rssi":-96,"snr":8,"spreading_factor":11}
{"time":"2024-07-30T07:06:48.859709Z","rssi":-97,"snr":0.5,"spreading_factor":11}
{"time":"2024-07-30T09:06:47.959534Z","rssi":-106,"snr":0.5,"spreading_factor":11}
{"time":"2024-07-30T11:06:49.270964Z","rssi":-100,"snr":8.2,"spreading_factor":11}
{"time":"2024-07-30T13:06:47.783798Z","rssi":-97,"snr":8,"spreading_factor":11}
{"time":"2024-07-30T15:06:47.947987Z","rssi":-98,"snr":4,"spreading_factor":11}
{"time":"2024-07-30T17:06:48.526454Z","rssi":-99,"snr":6,"spreading_factor":11}
{"time":"2024-07-29T01:06:45.164977Z","rssi":-99,"snr":3,"spreading_factor":11}
{"time":"2024-07-29T03:06:44.686445Z","rssi":-101,"snr":4.8,"spreading_factor":11}
{"time":"2024-07-29T05:06:45.521636Z","rssi":-106,"snr":-13.2,"spreading_factor":11}
{"time":"2024-07-29T07:06:45.304187Z","rssi":-102,"snr":1,"spreading_factor":11}
{"time":"2024-07-29T09:06:45.502725Z","rssi":-106,"snr":0.2,"spreading_factor":11}
{"time":"2024-07-29T11:06:45.746379Z","rssi":-102,"snr":6,"spreading_factor":11}
{"time":"2024-07-29T13:06:46.960201Z","rssi":-99,"snr":7,"spreading_factor":11}
{"time":"2024-07-29T15:06:45.948363Z","rssi":-101,"snr":1.2,"spreading_factor":11}
{"time":"2024-07-29T17:06:46.796317Z","rssi":-100,"snr":1.8,"spreading_factor":11}
{"time":"2024-07-29T19:06:46.925281Z","rssi":-101,"snr":7.2,"spreading_factor":11}
{"time":"2024-07-29T21:06:46.341519Z","rssi":-95,"snr":7.8,"spreading_factor":11}
{"time":"2024-07-29T23:06:47.547765Z","rssi":-99,"snr":8.2,"spreading_factor":11}
{"time":"2024-07-30T01:06:46.424057Z","rssi":-99,"snr":6.2,"spreading_factor":11}
{"time":"2024-07-30T03:06:47.940310Z","rssi":-101,"snr":6.8,"spreading_factor":11}
{"time":"2024-07-30T05:06:47.055029Z","rssi":-96,"snr":8,"spreading_factor":11}
{"time":"2024-07-30T07:06:48.859709Z","rssi":-97,"snr":0.5,"spreading_factor":11}
{"time":"2024-07-30T09:06:47.959534Z","rssi":-106,"snr":0.5,"spreading_factor":11}
{"time":"2024-07-30T11:06:49.270964Z","rssi":-100,"snr":8.2,"spreading_factor":11}
{"time":"2024-07-30T13:06:47.783798Z","rssi":-97,"snr":8,"spreading_factor":11}
{"time":"2024-07-30T15:06:47.947987Z","rssi":-98,"snr":4,"spreading_factor":11}
{"time":"2024-07-30T17:06:48.526454Z","rssi":-99,"snr":6,"spreading_factor":11}
{"time":"2024-07-30T19:06:49.131607Z","rssi":-102,"snr":5.8,"spreading_factor":11}
{"time":"2024-07-30T21:06:49.765474Z","rssi":-98,"snr":6.5,"spreading_factor":11}
{"time":"2024-07-30T23:06:50.017024Z","rssi":-100,"snr":8.2,"spreading_factor":11}
{"time":"2024-07-31T01:06:50.665111Z","rssi":-98,"snr":7.5,"spreading_factor":11}
{"time":"2024-07-31T03:06:49.469985Z","rssi":-102,"snr":6.8,"spreading_factor":11}
{"time":"2024-07-31T05:06:49.259478Z","rssi":-94,"snr":7.8,"spreading_factor":11}
{"time":"2024-07-31T07:06:50.857555Z","rssi":-104,"snr":5,"spreading_factor":11}
{"time":"2024-07-31T09:06:52.322597Z","rssi":-104,"snr":-2.2,"spreading_factor":12} 

Those number all look fine and healthy even with occasional noise spikeā€¦

More concerning would be:-

Looking for 15db safety margin is huge even a 105dbm signal would poss be cause for concern depending on SF and SNR, no wonder ADR ratchets up the SF over time. You should leave for TTN network set margin (Margin is usually set at a Network level for consistent behaviour - each operator choosing to set their own limits) or set a smaller value say 5 or 6dbm IMHO.

Thank you @Jeff-UK from the TTN doc I though 15 db margin was the default

Adaptive Data Rate | The Things Stack for LoRaWAN (thethingsindustries.com)

The default ADR margin value in The Things Stack is 15,

I can try lower it to 10 for the next couple of days if it make sens.

Hi again @descartes
I just recorded last messages with verbose toggled on.
Do I have to mask the uplink token or something help to avoid compromise the security of my setup before sharing the exported json file ?

The only two things to hide are your password, any API keys and the AppKey.

All the rest is either sent plain text at some point or requires one of the above to be useful.

Now weā€™ve got a snapshot of the varying SNRā€™s, I think we only need to see some of these downlinks.

Sorry, my bad - not looked at this for years (BC!) possibly back to TTN V2! In my now feeble mind I was mixing ā€˜Marginā€™ and ā€˜SNR Marginā€™ typical values for action. The other factor to look at is GW Diversity - I .e. is node seen by more GWā€™s - a single GW in an area/reception range leads to more cautious apporach vs a higher density GW deployment where e.g. Nicks

Would have less of an impact on ability to get message through

This are the 2 messages tagged as downlink from the console
H Success downlink.json (1.1 KB)
G Schedule data downlink.json (2.2 KB)

Adding also this message Link ADR request. at the same timestamp:
I Link ADR Request.json (1.2 KB)

Can you show a screenshot of the console from the downlink + LinkAdr enqueued until and including everything from the next uplink (in an hour, Iā€™d expect)?

This is the First screenshot
The update is for updating the margin from 15 to 10 db per previous replies


As I am now in SF12 next message is planned a 16:06 CET

1 Like

Whilst we all wait for the next uplink, can you tell us how long that payload is please.

And do you have any other devices - make & model - that are being heard by that gateway?

And what is the make & model of the gateway?

These will just help paint a picture of the situation, so whilst not essential, will help.

Oh, and what version of LW have you got the device set to?

The next uplink is here:
Adding the full json export + a screenshot below
eui-94193a0103003e6b_live_data_1722436001222.json (42.2 KB)

The payload from the elvaco documentation is 51 bytes
Per the documentation I have to use LW 1.0.2
My gateway can receive other devices but I donā€™t have any information on them
The gateway is a kerlink Wirnet iFemtoCell using latest 5.X OS KerOS firmware v5.11.0

Thanks for the info. Unfortunately, I think the firmware on your device is not LoRaWAN-compliant and actually very bad. Your second screenshot shows that there is a MAC command missing, indicating that either no downlink is received by your device, or, more likely, the device does not respond to the MAC command, effectively creating a Denial of Service on any nearby gateway.
The firmware in turn apparently decides to increase the SF, but without setting the required Ack bit in the uplink that should make the Network Server think twice.

This is an issue caused by the manufacturer of the device and not your fault, but it is best to turn off your device so that it does not continue the DoS to other users.

Slight note that it may be the case that your device is just very very very poor at hearing downlinks (catastrophically bad antenna), but given that everything else is all good, that is highly unlikely.

LW v1.0.2 is pretty old and whilst in theory a compliant device would be OK, to be a good ISM citizen, LW v1.0.3 would be regarded as a minimum these days. Even a maker/hobbyist with an Arduino can do v1.0.3 so no real excuses for a commercial product.

It does seem strange that it started after three weeks. Can you send a reboot command to it to force a rejoin and then monitor the activity.

If you need an endpoint to dump all traffic as raw data so nothing gets missed, let me know and I can set one up.