Closed
Description
At line 357 in adafruit_rfm9x.py, I was getting the exception with Failed to configure radio for LoRa mode, check wiring!
. Changed:
--- lib/adafruit_rfm9x.py 2018-08-04 16:14:14.000000000 -0600
+++ src/lib/adafruit_rfm9x.py 2018-08-06 00:38:26.275907581 -0600
@@ -354,10 +354,10 @@
# Also set long range mode (LoRa mode) as it can only be done in sleep.
self.sleep()
self.long_range_mode = True
- #self._write_u8(_RH_RF95_REG_01_OP_MODE, 0b10001000)
+ self._write_u8(_RH_RF95_REG_01_OP_MODE, 0b10001000)
time.sleep(0.01)
- #val = self._read_u8(_RH_RF95_REG_01_OP_MODE)
- #print('op mode: {0}'.format(bin(val)))
+ val = self._read_u8(_RH_RF95_REG_01_OP_MODE)
+ print('op mode: {0}'.format(bin(val)))
if self.operation_mode != SLEEP_MODE or not self.long_range_mode:
raise RuntimeError('Failed to configure radio for LoRa mode, check wiring!')
except OSError:
...now seems to work.
Metadata
Metadata
Assignees
Labels
No labels