Skip to content

Fails on Feather M4 unless self._write_u8(_RH_RF95_REG_01_OP_MODE, 0b10001000) is called in __init__() #8

Closed
@brennen

Description

@brennen

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions