mayeranalytics / pySX127x

This is a python interface to the Semtech SX127x, HopeRF RFM9x, Microchip RN2483 long range, low power transceiver families.
GNU Affero General Public License v3.0
171 stars 116 forks source link

Having trouble with HopeRF RFM95W #12

Closed Abrasam closed 8 years ago

Abrasam commented 8 years ago

This is the error received when attempting to run test_lora.py

I'm using a raspberry pi zero, and have the pins as described, with 3v3 -> 3.3v, all the GNDs going to separate GNDs on the Pi, SCLK -> CLK and CE0 -> NSS.

/home/pi/pySX127x/SX127x/board_config.py:51: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(BOARD.LED, GPIO.OUT)
Traceback (most recent call last):
  File "./lora_util.py", line 35, in <module>
    lora = LoRa(verbose=False)
  File "/home/pi/pySX127x/SX127x/LoRa.py", line 100, in __init__
    self.rx_chain_calibration(calibration_freq)
  File "/home/pi/pySX127x/SX127x/LoRa.py", line 843, in rx_chain_calibration
    self.set_freq(freq_bkup)
  File "/home/pi/pySX127x/SX127x/LoRa.py", line 279, in set_freq
    assert self.mode == MODE.SLEEP or self.mode == MODE.STDBY or self.mode == MODE.FSK_STDBY
AssertionError
Abrasam commented 8 years ago

Fixed it by taking everything out, and putting it all back in again. The IT Crowd "Have you tried turning it off and on again?" comes to mind.