matthijskooijman / arduino-lmic

:warning: This library is deprecated, see the README for alternatives.
705 stars 651 forks source link

receiving downlink messages in RXMODE_SCAN #214

Closed IBraheemBaleek closed 5 years ago

IBraheemBaleek commented 5 years ago

Hello,

I'm trying to setup a connection between a node (ESP8266) that runs LoRaWAN using this library and a gateway than tuns LoRa for nodeMCU. I am getting a proper uplink from the endnode to the the gateway without any problems and the data is right (including the MIC). Right now I'm trying to send a message from the gateway to the endnode. My gateway now is only sending messages with LoRa with frequency 433175000, my endnode uses this library with the necessary changes to support 433 frequency, also I set the endnode to send only using the 433175000 freq and to listen only to this frequency, and in the receive mode I'm using RXMODE_SCAN instead of RXMODE_SINGLE. I can see that I'm receiving a message once in a while but I need to receive all the messages in order to complete an appropriate downlink. Do you have any idea why I'm not receiving all the messages?

12:24:28.452 -> 33802: Ready for uplink 12:24:28.452 -> 35432: Updating info for TX at 6720, airtime will be 3856. Setting available time for band 0 to 6720 12:24:28.535 -> 41974: TXMODE, freq=433175000, len=26, SF=7, BW=125, CR=4/5, IH=0 46236: irq: dio: 0x0 flags: 0x8 48324: Scheduled job 0x3ffef528, cb 0x4020144c ASAP 12:24:28.705 -> Packet queued 12:24:28.739 -> 51707: Running job 0x3ffef528, cb 0x4020144c, deadline 0 12:24:28.773 -> 56393: Scheduled job 0x3ffef528, cb 0x402012e4 at 108705 108705: Running job 0x3ffef528, cb 0x402012e4, deadline 108705 12:24:29.668 -> 112724: RXMODE_SCAN, freq=433175000, SF=7, BW=125, CR=4/5, IH=0 211483: irq: dio: 0x0 flags: 0x40 12:24:31.310 -> 213593: Scheduled job 0x3ffef528, cb 0x4020278c ASAP 12:24:31.345 -> 217046: Running job 0x3ffef528, cb 0x4020278c, deadline 0 12:24:31.412 -> 220809: Invalid downlink, window=RX1 12:24:31.445 -> 223216: Scheduled job 0x3ffef528, cb 0x40201360 at 171205 12:24:31.530 -> 227003: Running job 0x3ffef528, cb 0x40201360, deadline 171205 12:24:31.598 -> 231115: RXMODE_SCAN, freq=433175000, SF=7, BW=125, CR=4/5, IH=0

Thank you.

IBraheemBaleek commented 5 years ago

Update:

In the end I used this library at both sides of the communication (end node+ GW) and it worked properly, I think there was a difference in the parameters related to the connection.