Ping responses occasionally return rssi: 0, snr: 0. RSSI of 0 dBm is physically impossible for LoRa — it indicates the SX1262 getPacketStatus() register returned a zero value (likely an SPI bus read anomaly).
The trace helper currently accepts any matching tag unconditionally:
# trace.py:72-83iftrace_taginself.pending_pings:ping_info['result']={'rssi':getattr(packet,"rssi",0),# accepts 0 without validation...}ping_info['event'].set()
Suggested Fix
Add a signal sanity check before accepting the trace response:
rssi_val=getattr(packet,"rssi",0)ifrssi_val==0:logger.warning(f"Ignoring trace response for tag {trace_tag} with RSSI=0 (no signal data)")return# wait for a valid response or let timeout handle it
This way, a spurious 0/0 read is silently dropped and the caller either gets a real response (if one arrives within the timeout) or a clean timeout error — rather than reporting fake signal data.
**Branch:** `feat/companion`
## Problem
Ping responses occasionally return `rssi: 0, snr: 0`. RSSI of 0 dBm is physically impossible for LoRa — it indicates the SX1262 `getPacketStatus()` register returned a zero value (likely an SPI bus read anomaly).
The trace helper currently accepts any matching tag unconditionally:
```python
# trace.py:72-83
if trace_tag in self.pending_pings:
ping_info['result'] = {
'rssi': getattr(packet, "rssi", 0), # accepts 0 without validation
...
}
ping_info['event'].set()
```
## Suggested Fix
Add a signal sanity check before accepting the trace response:
```python
rssi_val = getattr(packet, "rssi", 0)
if rssi_val == 0:
logger.warning(f"Ignoring trace response for tag {trace_tag} with RSSI=0 (no signal data)")
return # wait for a valid response or let timeout handle it
```
This way, a spurious 0/0 read is silently dropped and the caller either gets a real response (if one arrives within the timeout) or a clean timeout error — rather than reporting fake signal data.
<!-- github-sync-id:4060111166 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Branch:
feat/companionProblem
Ping responses occasionally return
rssi: 0, snr: 0. RSSI of 0 dBm is physically impossible for LoRa — it indicates the SX1262getPacketStatus()register returned a zero value (likely an SPI bus read anomaly).The trace helper currently accepts any matching tag unconditionally:
Suggested Fix
Add a signal sanity check before accepting the trace response:
This way, a spurious 0/0 read is silently dropped and the caller either gets a real response (if one arrives within the timeout) or a clean timeout error — rather than reporting fake signal data.
For me Ping fails almost every time. I'm using a Seedstudio SX126 connected via SPI