chandrawi / LoRaRF-Python

Python library for basic transmitting and receiving data using LoRa and FSK modem
MIT License
29 stars 15 forks source link

Lora.begin() fails #7

Closed darvinde closed 1 year ago

darvinde commented 1 year ago

Hi,

I am using a Waveshare SX126X LoRa Hat. When running the files from the example folder i get these error: "Something wrong,..." because Lora.begin() returned False. When changing the busyPin to 27, we get a tuple out of range error. I also changed the busId from 1 to 0 because otherwise i got an SPI error.

Do you know how we can fix this? Thanks in advance

chandrawi commented 1 year ago

What kind LoRa HAT you used? Is it using SPI or UART communication? Can you show me a datasheet or a wiki page for this LoRa Hat?

Most of the time, Lora.begin() error because of wrong pin connection to Raspberry Pi. This library uses broadcom pin numbering. So, set the reset and busy pin according the broacom pin numbering.

darvinde commented 1 year ago

This is the "wiki" https://www.waveshare.com/wiki/SX1262_868M_LoRa_HA and here is a the datasheet of the hat https://www.waveshare.com/w/upload/c/c4/SX1268_V1.0.pdf. Thank you for the information! The hat is using SPI according to the datasheet.

chandrawi commented 1 year ago

The LoRa Hat is used UART communication while this library meant to used with SPI. You should search other library that support your LoRa Hat