lorawan-server icon indicating copy to clipboard operation
lorawan-server copied to clipboard

Many ack_lost, uplinks_missed and some repeated_requests

Open MihaMarkic opened this issue 4 years ago • 12 comments

Hi guys,

I've finally set up a single configuration consisting of a device, gateway and this server. Thanks to guys here. Anyway, while my device works - is able to send data and server receives it, I see plenty of ack_lost and uplinks_missed warnings. My gateway is ESP-1ch-Gateway and my issue there is https://github.com/things4u/ESP-1ch-Gateway/issues/34. From what I read here and in troubleshooting, the problem is with gateway and it's setting push_timeout_ms.

MihaMarkic avatar May 15 '20 09:05 MihaMarkic

Ou, is that a single-channel gateway? Those things aren't very standard-compliant and don't work with the default config. You need to convince both the server and the device to use that single channel the gateway has.

gotthardp avatar May 15 '20 16:05 gotthardp

Yep, single channel. The thing is that the data comes through from the device, it's just those warnings for some reason. Do you happen to know if there is an alternative gateway that would run on a TTGO ESP32 board?

MihaMarkic avatar May 19 '20 13:05 MihaMarkic

Just of out curiosity, could you check the Frames page to see if there are any FCnt gaps? Devices do frequency hoping, so a single channel gateway receives only some uplinks. Could that be a reason for the errors? BTW, I no almost nothing about the gateway market.

gotthardp avatar May 19 '20 17:05 gotthardp

Hello good evening, I implemented a gateway (single channel) with TTGO and it works very well in the uplinks but I couldn't do the downlinks. I use the LMIC library and a node with another TTGO. From now, thank you for you help

michello-zz avatar May 23 '20 01:05 michello-zz

@michello-zz Should be no problems there, what setup do you use? Which variant of LMIC do you run, mcci or kooijman?

altishchenko avatar May 23 '20 17:05 altishchenko

Thank you very much for your answer. I am using an adaptation for my zone "Argentina" AU915 915 MHz to 930 MHz. https://github.com/eMGing/LMIC_Shield_eMGing_LoRa_Node_915_LoRaWAN   * http://www.eclipse.org/legal/epl-v10.html   *   * Contributors:   * IBM Zurich Research Lab - initial API, implementation and documentation Node: TTGO Gateway: Mono Channel TTGO Thank you in advance for your help. Greetings Michello

michello-zz avatar May 25 '20 22:05 michello-zz

@michello-zz Ok, this library is based on this source: https://github.com/matthijskooijman/arduino-lmic, can you share your server configuration and also provide some details on how are you trying to do the downlinks? Are your uplinks confirmed or unconfirmed?

altishchenko avatar May 25 '20 23:05 altishchenko

How do I get the server configuration

michello-zz avatar May 25 '20 23:05 michello-zz

@michello-zz Well, again: How are you trying to send downlinks? What commands do you use for that? Can you show us screenshots of your server's web-admin: particular Handler and Connector configuration panels, the ones used by your device (device's profile)? Can you try sending a downlink message and after waiting for some time (your device should send an uplink towards the server at least) capture the debug.log file from the server and share it too?

P.S.: You can always export complete configuration for your server with dbexport command, found in /your/path/to/installation/bin/ directory. For example, if you installed your server on some sort of debian or ubuntu you will normally find it in /usr/lib/lorawan-server/bin and the debug.log file should be located in the /var/log/lorawan-server/ directory.

altishchenko avatar May 26 '20 00:05 altishchenko

Hello good day. I use MQTT for the "downlinks". Attached configurations and log. Attached captures the frames, where the downlinks are seen. backup-2020-05-22.zip debug.log Frames_Up_Down Mqtt_Downlink mqtt1 Gateway Profile2 Profile1 Connector

michello-zz avatar May 26 '20 12:05 michello-zz

@michello-zz Ok, I had a look around in your logs and screenshots, I didn't look into your configs yet. There are a few things that really worries me:

  1. Your device sends periodic garbage, which means that either there is not enough memory on the stack or your data sending routine pollutes the transmit buffer or your gateway has errors of the same type.
  2. Surprisingly, though I presume the timestamps are correct, I did not see any indication in the server log that data was received via MQTT and was transmitted to your device.

There are two things you can try:

  1. Change the Format field in your connector to from RAW to JSON, from the frames screen shot I can see that the server transmits literally '{"data"..}' string to the device. I think this is not what you want.
  2. To make things easier to debug, create a new Connector with URI http: - just that and 'Received topic' to /down/{devaddr} and attach it to the same Handler/Application. This will enable you to send downlinks with usual curl/http command:
curl -v --digest -uadmin:admin -H "Content-Type: application/json" -X POST http://localhost:8080/down/11223344 -d "{\"data\":\"ABCDEF\"}"

Clear the log, ex. stop the server, delete logs, start the server. Then send a few frames down to the device with the command above, make sure the device sends a few frames up to receive them. And send me the log to [email protected], as this issue is unconnected to your problem absolutely.

altishchenko avatar May 26 '20 17:05 altishchenko