Closed dmartauz closed 6 years ago
I have observed similar behaviour, adding a 50ms delay in the loop caused the code to start working again.
It can be considered as temporary workaround however that means 50ms of wasted time it could be doing something else :) In my case ModBus client and simple web server for gateway configuration are handled within the same loop.
Im not suggesting that as a final solution I'm just adding that a delay seems to make it work to help track down the issue.
I've just experienced this issue. Today I upgraded my pair of LoPys to the latest firmware. Now one of them does not receive any LoRaRAW traffic from the other, when it is fitted to an Expansion Board 2. The other LoPy is on a PyTrack - it can receive OK. If I swap the LoPys, the receive problem remains on the Expansion Board 2. The LoPy on the PyTrack can always receive. I have no DeepSleep module fitted with the Exp.Brd2.
I have used some SDR software that decodes the LORA frames and can confirm that it continues to decode frames from both LoPys.
It seems that the issue might depends on the base board in use.
(sysname='LoPy', nodename='LoPy', release='1.10.2.b1', version='v1.8.6-849-g0af003a4 on 2017-11-24', machine='LoPy withESP32', lorawan='1.0.0')
@g0hww Do you have anything connected to the LoRa radio pins (P5, P6 and P7) on the expansion board?
Nope. Out of curiosity, I removed all the jumpers but that had no unexpected effects, other than loss of the UART connection.
@g0hww Can you explain what you mean "receive LoRaMAC traffic from the other"? LoRaMAC traffic is usually from node to a gateway, not between nodes. Is one configured as a Nano-gateway?
Sorry, I meant LoraRAW (will edit)
self.lora = LoRa(mode=LoRa.LORA, tx_power = config.tx_dbm,
bandwidth=LoRa.BW_125KHZ,
sf = 8, preamble=12, coding_rate=LoRa.CODING_4_7,
frequency=config.lora_freq)
Odd. Its actually just started working now, though those LoPys have been on for an hour or so in this test run. The socket calls are all blocking and I'd added the 50ms delay in for good measure. That didn't seem to help earlier on. I've been fiddling with them for about 6 hours today and its the first time it has shown signs of reception. The only reason I've seen before for these little blighters not to be able to talk over LORA is when they stubbornly synchronise their beaconing intervals so that they clobber each other, but that definitely wasn't happening here. I know the channel is good, as I have an SDR monitor. UPDATE: reset by paper-clip restores the "failing to receive" state.
I updated one of my LoPys to 1.13.0.b1 and that device was then able to reliably receive my LoRa traffic when fitted to the ExpBrd2. My other LoPy still on 1.10.2.b1 continued to suffer from the problem I described above when it was fitted to the ExpBrd2 prior to upgrading. After upgrading it to 1.13.0.b1 it started to receive LoRa traffic reliably too. The issue I described seems to be fixed now :)
I think this has been resolved, so I'll close this issue. If you think otherwise, feel free to reopen it and add more details!
Since 1.10.0.b1 I having issues with receiving data through raw LoRa non-blocking socket within a while loop. In case the loop is interrupted the data can be received by socket.recv() entered through the REPL.
Simplified code of receiver:
Output with 1.10.1.b1:
Output with 1.9.2.b2: