matthijskooijman / arduino-lmic

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

I can't see LMIC.dataLen #263

Open jcap3003 opened 4 years ago

jcap3003 commented 4 years ago

I am using an ESP32 HELTEC V1 with the ABP example in the arduino IDE. I have a RAK LoRaWAN Gateway (7258). I can communicate because I can see the data coming in the LoRa Packet Logger and my TTN application. However, I can't read LMIC.dataLen when it shows EV_TXCOMPLETE. In fact, ESP32 does not display any callback messages other than EV_TXCOMPLETE. I am using US915, SX1276 and debug 2.

Here's my setup: os_init(); LMIC_reset(); LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100); LMIC_setSession (0x1, DEVADDR, NWKSKEY, APPSKEY); LMIC_setLinkCheckMode(0); LMIC.dn2Dr = DR_SF9; LMIC_setDrTxpow(DR_SF7,14); do_send(&sendjob);

This is the message on the serial monitor:

Starting RXMODE_RSSI 4253: engineUpdate, opmode=0x808 4270: Uplink data pending 4273: Airtime available at 4270 (channel duty limit) 4278: Ready for uplink 4373: TXMODE, freq=903900000, len=26, SF=7, BW=125, CR=4/5, IH=0 Packet queued 8240: irq: dio: 0x0 flags: 0x8 8250: Scheduled job 0x3ffc147c, cb 0x400d1ba4 ASAP 8255: Running job 0x3ffc147c, cb 0x400d1ba4, deadline 0 8315: Scheduled job 0x3ffc147c, cb 0x400d18c8 at 70013 70013: Running job 0x3ffc147c, cb 0x400d18c8, deadline 70013 70140: RXMODE_SINGLE, freq=923300000, SF=7, BW=500, CR=4/5, IH=0 71475: irq: dio: 0x1 flags: 0x80 71484: Scheduled job 0x3ffc147c, cb 0x400d30dc ASAP 71489: Running job 0x3ffc147c, cb 0x400d30dc, deadline 0 71570: Scheduled job 0x3ffc147c, cb 0x400d1918 at 132345 132345: Running job 0x3ffc147c, cb 0x400d1918, deadline 132345 132472: RXMODE_SINGLE, freq=923300000, SF=9, BW=125, CR=4/5, IH=0 136075: irq: dio: 0x1 flags: 0x80 136084: Scheduled job 0x3ffc147c, cb 0x400d310c ASAP 136090: Running job 0x3ffc147c, cb 0x400d310c, deadline 0 136188: EV_TXCOMPLETE (includes waiting for RX windows) 136495: Scheduled job 0x3ffc00a4, cb 0x400d0e08 at 3886495 136821: engineUpdate, opmode=0x900 Does anyone have any idea how I can get these calbacks working well? I need to know if there is an active gateway nearby. And as it stands, it makes no difference whether or not there is an active gateway nearby. Following are the RAK Logger:

images: image

jcap3003 commented 4 years ago

App TTN: image