Pygate does not receive after downlink
-
Hi Pycom team,
I am testing the Pygate with Gpy over LTE-M.
Pygate will not receive LoRa message after a downlink message is sent. This issue is not related to LTE-M, but more likely on LoRa gateway side.
Power cycle the Pygate will fix this problem.
Here is the log:
- 2021-05-17 04:34:15 GMT: a LoRa message is received and pushed to my LORA_GATEWAY_BRIDGE_DOMAIN
- 2021-05-17 04:35:15 GMT: another LoRa message is received and pushed to my LORA_GATEWAY_BRIDGE_DOMAIN
- 2021-05-17 04:35:20 GMT: downlink message is sent to end device
- 2021-05-17 04:36:15 GMT: no message received by Pygate, but I can confirm the end device has sent out a message
It feels like the Pygate is locked that no more rx and tx.
Starting LoRaWAN concentrator Resetting LTE modem ... OK Configuring LTE . OK Attaching to LTE network .. OK Connecting on LTE network OK Syncing RTC via ntp.... OK [2023331453] LORAPF_INFO_:lora_gw_init() start fh=313848 high=9444 LORA_GW_STACK_SIZE=15000 [2023331455] LORAPF_INFO_:lora_gw_init() done fh=298844 high=9444 Pycom MicroPython 1.20.2.r4 [v1.20.1.r2-363-ga37510c09-dirty] on 2021-03-29; GPy with ESP32 Type "help()" for more information. >>> [2023331468] LORAPF_INFO_:*** Packet Forwarder for Lora PicoCell Gateway *** Version: undefined [2023331477] LORAPF_INFO_:lorapf *** Lora concentrator HAL library version info *** Version: " 0.2.3 "; [2023331486] LORAPF_INFO_:[main] Little endian host [2023331535] LORAPF_INFO_:[main] lorawan_public 0, clksrc 1 lgw_board_setconf:593: Note: board configuration; lorawan_public:0, clksrc:1 [2023331536] LORAPF_INFO_:[main] antenna_gain 0 dBi [2023331544] LORAPF_INFO_:[main] Configuring TX LUT with 16 indexes [2023331547] LORAPF_INFO_:[main] radio 0 enabled (type SX1257), center frequency 922800000, RSSI offset -163.999996, tx enabled 1 lgw_rxrf_setconf:627: Note: rf_chain 0 configuration; en:1 freq:922800000 rssi_offset:-164.000000 radio_type:2 tx_enable:1 [2023331569] LORAPF_INFO_:[main] radio 1 enabled (type SX1257), center frequency 921800000, RSSI offset -163.999996, tx enabled 0 lgw_rxrf_setconf:627: Note: rf_chain 1 configuration; en:1 freq:921800000 rssi_offset:-164.000000 radio_type:2 tx_enable:0 [2023331591] LORAPF_INFO_:[main] Lora multi-SF channel 0> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12 lgw_rxif_setconf:746: Note: LoRa 'multi' if_chain 0 configuration; en:1 freq:-200000 SF_mask:0x7e [2023331609] LORAPF_INFO_:[main] Lora multi-SF channel 1> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12 lgw_rxif_setconf:746: Note: LoRa 'multi' if_chain 1 configuration; en:1 freq:0 SF_mask:0x7e [2023331626] LORAPF_INFO_:[main] Lora multi-SF channel 2> radio 1, IF 200000 Hz, 125 kHz bw, SF 7 to 12 lgw_rxif_setconf:746: Note: LoRa 'multi' if_chain 2 configuration; en:1 freq:200000 SF_mask:0x7e [2023331643] LORAPF_INFO_:[main] Lora multi-SF channel 3> radio 1, IF 400000 Hz, 125 kHz bw, SF 7 to 12 lgw_rxif_setconf:746: Note: LoRa 'multi' if_chain 3 configuration; en:1 freq:400000 SF_mask:0x7e [2023331661] LORAPF_INFO_:[main] Lora multi-SF channel 4> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12 lgw_rxif_setconf:746: Note: LoRa 'multi' if_chain 4 configuration; en:1 freq:-400000 SF_mask:0x7e [2023331679] LORAPF_INFO_:[main] Lora multi-SF channel 5> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12 lgw_rxif_setconf:746: Note: LoRa 'multi' if_chain 5 configuration; en:1 freq:-200000 SF_mask:0x7e [2023331697] LORAPF_INFO_:[main] Lora multi-SF channel 6> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12 lgw_rxif_setconf:746: Note: LoRa 'multi' if_chain 6 configuration; en:1 freq:0 SF_mask:0x7e [2023331714] LORAPF_INFO_:[main] Lora multi-SF channel 7> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12 lgw_rxif_setconf:746: Note: LoRa 'multi' if_chain 7 configuration; en:1 freq:200000 SF_mask:0x7e [2023331731] LORAPF_INFO_:[main] Lora std channel> radio 1, IF -400000 Hz, 125000 Hz bw, SF 9 lgw_rxif_setconf:720: Note: LoRa 'std' if_chain 8 configuration; en:1 freq:-400000 bw:3 dr:8 [2023331748] LORAPF_INFO_:[main] FSK channel 8 disabled lgw_rxif_setconf:655: Note: if_chain 9 disabled [2023331805] LORAPF_INFO_:[main] gateway MAC address is configured to lX [2023331806] LORAPF_INFO_:[main] server hostname or IP address is configured to "LORA_GATEWAY_BRIDGE_DOMAIN" [2023331810] LORAPF_INFO_:[main] upstream port is configured to "1700" [2023331816] LORAPF_INFO_:[main] downstream port is configured to "1700" [2023331823] LORAPF_INFO_:[main] downstream keep-alive interval is configured to 10 seconds [2023331831] LORAPF_INFO_:[main] statistics display interval is configured to 30 seconds [2023331839] LORAPF_INFO_:[main] upstream PUSH_DATA time-out is configured to 3000 ms [2023331846] LORAPF_INFO_:[main] packets received with a valid CRC will be forwarded [2023331854] LORAPF_INFO_:[main] packets received with a CRC error will NOT be forwarded [2023331861] LORAPF_INFO_:[main] packets received with no CRC will NOT be forwarded [2023331872] LORAPF_INFO_:[main] found global configuration file and parsed correctly lgw_calibrate_sx125x:512: Note: calibration started (time: 2300 ms) lgw_calibrate_sx125x:533: Note: calibration finished (status = 0xBF) lgw_calibrate_sx125x:570: calibration a_i = 61 lgw_calibrate_sx125x:570: calibration a_i = 48 lgw_calibrate_sx125x:570: calibration a_i = 37 lgw_calibrate_sx125x:570: calibration a_i = 33 lgw_calibrate_sx125x:570: calibration a_i = 25 lgw_calibrate_sx125x:570: calibration a_i = 20 lgw_calibrate_sx125x:570: calibration a_i = 16 lgw_calibrate_sx125x:570: calibration a_i = 13 lgw_calibrate_sx125x:512: Note: calibration started (time: 2300 ms) lgw_calibrate_sx125x:533: Note: calibration finished (status = 0xBF) lgw_calibrate_sx125x:570: calibration a_i = 32 lgw_calibrate_sx125x:570: calibration a_i = 25 lgw_calibrate_sx125x:570: calibration a_i = 20 lgw_calibrate_sx125x:570: calibration a_i = 16 lgw_calibrate_sx125x:570: calibration a_i = 13 lgw_calibrate_sx125x:570: calibration a_i = 10 lgw_calibrate_sx125x:570: calibration a_i = 8 lgw_calibrate_sx125x:570: calibration a_i = 7 Info: Initialising AGC firmware... Info: putting back original RADIO_SELECT value [2023339140] LORAPF_INFO_:[main] concentrator started, packet can now be received [2023339142] LORAPF_INFOLoRa GW _star[2ed 202333914[:[up ] sta3] LORAPF_I023339143] 2023339145] rt NFO_:[dLORAPF_INFO_LORAPF_INFOown] start :[jit ] sta_:[ts ] start rt [2023369144] LORAPF_INFO_:[main] report ##### 2021-05-17 04:33:59 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 0 # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00% # RF packets forwarded: 0 (0 bytes) # PUSH_DATA datagrams sent: 0 (0 bytes) # PUSH_DATA acknowledged: 0.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 0 (0 bytes) # RF packets sent to concentrator: 0 (0 bytes) # TX errors: 0 ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2023386312] LORAPF_INFO_:[up ] received pkt from mote: 870D0210 (fcnt=30129/75B1), RSSI -77.0 [2023399183] LORAPF_INFO_:[main] report ##### 2021-05-17 04:34:29 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 1 # CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00% # RF packets forwarded: 1 (60 bytes) # PUSH_DATA datagrams sent: 2 (364 bytes) # PUSH_DATA acknowledged: 100.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 0 (0 bytes) # RF packets sent to concentrator: 0 (0 bytes) # TX errors: 0 ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2023429222] LORAPF_INFO_:[main] report ##### 2021-05-17 04:34:59 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 1 # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00% # RF packets forwarded: 0 (0 bytes) # PUSH_DATA datagrams sent: 1 (113 bytes) # PUSH_DATA acknowledged: 100.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 0 (0 bytes) # RF packets sent to concentrator: 0 (0 bytes) # TX errors: 0 ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2023446218] LORAPF_INFO_:[up ] received pkt from mote: 070F0210 (fcnt=38494/965E), RSSI -73.0 [2023449674] LORAPF_INFO_:[down] a packet will be sent in "immediate" mode [2023449675] LORAPF_INFO_:jitqueue: Current concentrator tv_sec=113 time_us=113207517, pkt_type=2, packet->count_us=0, (c-t)=4181759779/-113207517 us = 4181/4181 s [2023459261] LORAPF_INFO_:[main] report ##### 2021-05-17 04:35:29 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 2 # CRC_OK: 50.00%, CRC_FAIL: 50.00%, NO_CRC: 0.00% # RF packets forwarded: 1 (60 bytes) # PUSH_DATA datagrams sent: 2 (367 bytes) # PUSH_DATA acknowledged: 100.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 1 (190 bytes) # RF packets sent to concentrator: 1 (28 bytes) # TX errors: 0 # TX rejected (collision packet): 0.00% (req:1, rej:0) # TX rejected (collision beacon): 0.00% (req:1, rej:0) # TX rejected (too late): 0.00% (req:1, rej:0) # TX rejected (too early): 0.00% (req:1, rej:0) ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2023489319] LORAPF_INFO_:[main] report ##### 2021-05-17 04:35:59 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 0 # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00% # RF packets forwarded: 0 (0 bytes) # PUSH_DATA datagrams sent: 1 (113 bytes) # PUSH_DATA acknowledged: 100.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 0 (0 bytes) # RF packets sent to concentrator: 0 (0 bytes) # TX errors: 0 # TX rejected (collision packet): 0.00% (req:1, rej:0) # TX rejected (collision beacon): 0.00% (req:1, rej:0) # TX rejected (too late): 0.00% (req:1, rej:0) # TX rejected (too early): 0.00% (req:1, rej:0) ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2023519376] LORAPF_INFO_:[main] report ##### 2021-05-17 04:36:29 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 0 # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00% # RF packets forwarded: 0 (0 bytes) # PUSH_DATA datagrams sent: 1 (113 bytes) # PUSH_DATA acknowledged: 100.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 0 (0 bytes) # RF packets sent to concentrator: 0 (0 bytes) # TX errors: 0 # TX rejected (collision packet): 0.00% (req:1, rej:0) # TX rejected (collision beacon): 0.00% (req:1, rej:0) # TX rejected (too late): 0.00% (req:1, rej:0) # TX rejected (too early): 0.00% (req:1, rej:0) ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2023549433] LORAPF_INFO_:[main] report ##### 2021-05-17 04:37:00 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 0 # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00% # RF packets forwarded: 0 (0 bytes) # PUSH_DATA datagrams sent: 1 (113 bytes) # PUSH_DATA acknowledged: 100.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 0 (0 bytes) # RF packets sent to concentrator: 0 (0 bytes) # TX errors: 0 # TX rejected (collision packet): 0.00% (req:1, rej:0) # TX rejected (collision beacon): 0.00% (req:1, rej:0) # TX rejected (too late): 0.00% (req:1, rej:0) # TX rejected (too early): 0.00% (req:1, rej:0) ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END #####
Cheers,
Paul
-
-
any update on the issue ? its resolved now ?
-
@robert-hh said in Pygate does not receive after downlink:
Its really frustrating to try and use these forums and the forums work against you.
It may be easier now. I added a few reputation points to your account.
Thanks.
-
Its really frustrating to try and use these forums and the forums work against you.
It may be easier now. I added a few reputation points to your account.
-
@jcaron I tried to reply here in the forums, but my post was flagged as spam. Here is the reply now in the issue section of the github.
https://github.com/pycom/pycom-micropython-sigfox/issues/563Its really frustrating to try and use these forums and the forums work against you.
-
@jcaron Your response makes me extremely happy. Many thanks.
At the moment, I am building the pycome-micropython-sigfox git repo on tip of development branch. If I can get it to build and run with similar results as the stock version, I will resume with Deng's pull and patch. With your suggestion I am doing this now:
$ make BOARD=GPY VARIANT=PYGATE clean $ make BOARD=GPY TARGET=app VARIANT=PYGATE $ make BOARD=GPY TARGET=boot VARIANT=PYGATE $ make VARIANT=PYGATE BOARD=GPY ESPSPEED=115200 ESPPORT=/dev/ttyACM0 flash
This indeed builds and flashes the GPY in the PYGATE expansion board. As for results, when I see the GPY/PYGATE console, I see that it appears to run normally as with the stock image. I don't see it failing with "concentrator" message. However, I don't see messages from the node being relayed through the GPY/PYGATE to TTN. As far as the node is concerned, it delivered a loraWAN message though.
##### 2021-09-01 15:31:43 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 0 # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00% # RF packets forwarded: 0 (0 bytes) # PUSH_DATA datagrams sent: 1 (111 bytes) # PUSH_DATA acknowledged: 0.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 0 (0 bytes) # RF packets sent to concentrator: 0 (0 bytes) # TX errors: 0 # TX rejected (collision packet): 0.00% (req:1, rej:0) # TX rejected (collision beacon): 0.00% (req:1, rej:0) # TX rejected (too late): 0.00% (req:1, rej:0) # TX rejected (too early): 0.00% (req:1, rej:0) ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2717698799] LORAPF_WARN_:[up ] ignored out-of sync PUSH_ACK packet buff_ack[0:38] != token[0:39] [2717698851] LORAPF_WARN_:[up ] PUSH_ACK recieve timeout 1
hmm. afterwards I noticed it reconnected to wifi then these are in message log:
2717771645] LORAPF_INFO_:[main] report ##### 2021-09-01 15:32:56 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 1 # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00% # RF packets forwarded: 0 (0 bytes) # PUSH_DATA datagrams sent: 0 (0 bytes) # PUSH_DATA acknowledged: 0.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 0 (0 bytes) # RF packets sent to concentrator: 0 (0 bytes) # TX errors: 0 ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2717771754] LORAPF_WARN_:[up ] PUSH_ACK recieve timeout 0 [2717788687] LORAPF_INFO_:[up ] received pkt from mote: 26022F3F (fcnt=43163/A89B), RSSI -101.0 [2717788740] LORAPF_WARN_:[up ] PUSH_ACK recieve timeout 0 [2717789107] LORAPF_INFO_:jitqueue: Current concentrator tv_sec=50 time_us=50139381, pkt_type=0, packet->count_us=50670067, (c-t)=530686/530686 us = 0/0 s [2717801684] LORAPF_INFO_:[main] report ##### 2021-09-01 15:33:26 GMT ##### ### [UPSTREAM] ### # RF packets received by concentrator: 3 # CRC_OK: 33.33%, CRC_FAIL: 66.67%, NO_CRC: 0.00% # RF packets forwarded: 1 (22 bytes) # PUSH_DATA datagrams sent: 2 (316 bytes) # PUSH_DATA acknowledged: 100.00% ### [DOWNSTREAM] ### # PULL_DATA sent: 3 (100.00% acknowledged) # PULL_RESP(onse) datagrams received: 1 (180 bytes) # RF packets sent to concentrator: 1 (12 bytes) # TX errors: 0 # TX rejected (collision packet): 0.00% (req:1, rej:0) # TX rejected (collision beacon): 0.00% (req:1, rej:0) # TX rejected (too late): 0.00% (req:1, rej:0) # TX rejected (too early): 0.00% (req:1, rej:0) ### [JIT] ### [jit] queue is empty ### [GPS] ### # GPS sync is disabled ##### END ##### [2717801802] LORAPF_WARN_:[up ] PUSH_ACK recieve timeout 0
However, the end result is still no message uploaded to TTN.
-
@netskink I believe you need to specify
VARIANT=PYGATE
in yourmake
options to build the Pygate version.
-
@pauldeng I have this problem. I pulled the same revision of the code you did. At least I think I did. in the
pycom-micropython-sigfox
directory, I did$ git checkout a37510c092bcec00671c924accb97dcdfa2f4b5d
then I made you changes.diff --git a/esp32/pygate/concentrator/cmd_manager.c b/esp32/pygate/concentrator/cmd_manager.c index dba7ce511..13b032934 100644 --- a/esp32/pygate/concentrator/cmd_manager.c +++ b/esp32/pygate/concentrator/cmd_manager.c @@ -324,7 +324,7 @@ int cmd_manager_DecodeCmd(uint8_t *BufFromHost) { } /* Switch off SX1308 correlators to reduce power consumption during transmit */ - esp_lgw_reg_w(LGW_CLKHS_EN, 0); + //JFDesp_lgw_reg_w(LGW_CLKHS_EN, 0); /* Send packet */ SX1308.txongoing = 1; @@ -359,16 +359,16 @@ int cmd_manager_DecodeCmd(uint8_t *BufFromHost) { } /* reset Sx1308 */ - sx1308_dig_reset(); + //JFDsx1308_dig_reset(); /* Switch SX1308 correlators back on */ esp_lgw_reg_w(LGW_CLKHS_EN, 1); /* restart SX1308 */ - x = esp_lgw_start(); - if (x < 0) { + //JFDx = esp_lgw_start(); + //JFDif (x < 0) { //pc.printf("lgw_start() failed\n"); - } + //JFD} /* Send command answer */ BufToHost[0] = 'f';
Aftewards, I built the code with:
make BOARD=GPY clean make BOARD=GPY TARGET=boot make BOARD=GPY TARGET=app make BOARD=GPY ESPSPEED=115200 ESPPORT=/dev/ttyACM0 flash
Afterwards, I use the atom IDE to upload the pygate example which has main.py and config.json for connecting the pygate/gpy combo to the things network (ttn).
Sadly line 25 of main.py now has an error with this line:
machine.callback(trigger = (machine.PYGATE_START_EVT | machine.PYGATE_STOP_EVT | machine.PYGATE_ERROR_EVT), handler=machine_cb)
It appears this version of the firmware does not have a machine.callback() routine.
Any advice is appreciated.
-
@pauldeng I have a problem where I noticed I also have errors where the pygate does not receive packets after transmit. I tried to update my firmware and now the device works but lora no longer works whatsoever. I'll try this and see if this fix works. It seems you are building your own version of the firmware code from git.
FWIW, here is where I reported the issue and my process for updating pygate and gpy. https://forum.pycom.io/topic/7238/pygate-gpy-and-lora-failures
-
-
Great you were able to make something work!
I'd still like you to submit a PR on our repo and we can take a look at it somewhere in the future, it allows for better tracking than leaving it here on the forum, and to give you credit where credit is due :). It might just be an undiscovered issue.
Thanks!
-
Hi all,
I spent quite bit of time to try to fix.
I am not quite understand that part of the code, but I managed to fix it. Now, the Pygate continues to rx after tx. There is no more lock up seems. I will continue testing the long term, but so far so good.
My environment:
- PyGate 915
- GPY
- LTE-M1 network with public ip
- chirpstack-gateway-bridge 3.11.0
My software:
- Ubuntu 20.04 VM
- https://github.com/pycom/pycom-micropython-sigfox v1.20.2.r4 code base Dev branch a37510c092bcec00671c924accb97dcdfa2f4b5d
My changes:
Basically, disable gateway reset/restart after tx.
Date: Fri, 25 Jun 2021 12:00:45 +1000 Subject: [PATCH] fix tx lockup --- esp32/pygate/concentrator/cmd_manager.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/esp32/pygate/concentrator/cmd_manager.c b/esp32/pygate/concentrator/cmd_manager.c index dba7ce511..8c119efb1 100644 --- a/esp32/pygate/concentrator/cmd_manager.c +++ b/esp32/pygate/concentrator/cmd_manager.c @@ -324,7 +324,7 @@ int cmd_manager_DecodeCmd(uint8_t *BufFromHost) { } /* Switch off SX1308 correlators to reduce power consumption during transmit */ - esp_lgw_reg_w(LGW_CLKHS_EN, 0); + //esp_lgw_reg_w(LGW_CLKHS_EN, 0); /* Send packet */ SX1308.txongoing = 1; @@ -333,7 +333,7 @@ int cmd_manager_DecodeCmd(uint8_t *BufFromHost) { if (x < 0) { //pc.printf("lgw_send() failed\n"); } - + /* In case of TX continuous, return the answer immediatly */ esp_lgw_reg_r(LGW_TX_MODE, &txcontinuous); // to switch off the timeout in case of tx continuous if (txcontinuous == 1) { @@ -359,16 +359,16 @@ int cmd_manager_DecodeCmd(uint8_t *BufFromHost) { } /* reset Sx1308 */ - sx1308_dig_reset(); + //sx1308_dig_reset(); /* Switch SX1308 correlators back on */ - esp_lgw_reg_w(LGW_CLKHS_EN, 1); + //esp_lgw_reg_w(LGW_CLKHS_EN, 1); /* restart SX1308 */ - x = esp_lgw_start(); - if (x < 0) { + //x = esp_lgw_start(); + //if (x < 0) { //pc.printf("lgw_start() failed\n"); - } + //} /* Send command answer */ BufToHost[0] = 'f'; -- 2.25.1
Since I do not see other people report this issue, so I will just leave this fix here and not PR to Github.
I hope it will be useful to someone.
Cheers,
Paul
-
Hi,
Sorry, I meant to respond here yesterday but did not get to it. I have not seen something like this occur before, great you're willing to take a deeper look. You can adjust the debug info here: https://github.com/pycom/pycom-micropython-sigfox/blob/Dev/esp32/pygate/lora_pkt_fwd/trace.h#L43, though Im not sure if it will give that much more output. You might have to compile with additionalprintf()
statements in order to find the culprit The actual forwarding happens here: https://github.com/pycom/pycom-micropython-sigfox/blob/Dev/esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.cI did think about how this could occur, and I can only think of a single relation at the moment. Receiving LoRaWAN packets runs on a separate thread from sending the packets so receiving should continue even if sending is stuck. Perhaps we dont correctly reset the LoRa radio IC to receiving mode? Though I have not seen this behaviour before..
-
@pauldeng said in Pygate does not receive after downlink:
I compiled the firmware v1.20.2r4 from source, can I ask how to enable debug message? Maybe I could find more info.
You can change this line https://github.com/pycom/pycom-micropython-sigfox/blob/Dev/esp32/pygate/lora_pkt_fwd/trace.h#L43 to
#define LORAPF_DEBUG_LEVEL LORAPF_DEBUG
and then use machine.pygate_debug_level(4)
-
I compiled the firmware v1.20.2r4 from source, can I ask how to enable debug message? Maybe I could find more info.