Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused pins #4

Open
kauly opened this issue Feb 23, 2018 · 4 comments
Open

Unused pins #4

kauly opened this issue Feb 23, 2018 · 4 comments

Comments

@kauly
Copy link

kauly commented Feb 23, 2018

In the board_config.py, how we define unused pins? Getting always this AssertionError and I think it's because bad board configuration. I using the NiceRF LoRa1276 and a rasp zero w.

/home/pi/lora-testes/LoRaWAN/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 "tx_ttn.py", line 40, in <module>
    lora = LoRaWANsend(False)
  File "tx_ttn.py", line 15, in __init__
    super(LoRaWANsend, self).__init__(verbose)
  File "/home/pi/lora-testes/LoRaWAN/SX127x/LoRa.py", line 100, in __init__
    self.rx_chain_calibration(calibration_freq)
  File "/home/pi/lora-testes/LoRaWAN/SX127x/LoRa.py", line 856, in rx_chain_calibration
    self.set_freq(freq_bkup)
  File "/home/pi/lora-testes/LoRaWAN/SX127x/LoRa.py", line 282, in set_freq
    assert self.mode == MODE.SLEEP or self.mode == MODE.STDBY or self.mode == MODE.FSK_STDBY
AssertionError

@zmarwa
Copy link

zmarwa commented Apr 18, 2018

any solution for this please?

@jeroennijhof
Copy link
Owner

jeroennijhof commented Apr 20, 2018

The python lib SX127x uses 4 DIO hardcoded and there functions are:
DIO0 00: RxDone
DIO0 01: TxDone
DIO0 10: CadDone
DIO1 00: RxTimeout
DIO1 01: FhssChangeChannel
DIO1 10: CadDetected
DIO2 00: FhssChangeChannel
DIO2 01: FhssChangeChannel
DIO2 10: FhssChangeChannel
DIO3 00: CadDone
DIO3 01: ValidHeader
DIO3 10: PayloadCrcError

Maybe you can check which functions are missing since the NiceRF chip has only 3 DIO, my guess is DIO2 so you could hack out all DIO2 functions and make sure DIO0, DIO1 and DIO3 are connected.

@rpsreal
Copy link

rpsreal commented May 1, 2018

I have the same error with Raspberry Pi B+ and all the pins are connected.

@MikeRouten
Copy link

I am getting the same AssertionError because self.mode = 0. This is with a Dragino Hat on top of a Pi 3.

Has anyone been able to resolve this issue?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants