ArmDeveloperEcosystem / lorawan-library-for-pico

Enable LoRaWAN communications on your Raspberry Pi Pico or any RP2040 based board. 📡
BSD 3-Clause "New" or "Revised" License
125 stars 47 forks source link

LoRa Initialisation failed #10

Closed SiddhantArya closed 2 years ago

SiddhantArya commented 2 years ago

Hi,

I've been trying to use this library for making a test node for LoRa. I am using RFM95W with Raspberry Pi Pico. I've set up the connections as mentioned in the wiki and have changed the region to IN865 in 'config.h'. Also, I am using 3.3V power out from the Pico. However, I still received the LoRa Init failed message.

Upon some tinkering, I managed to get past the Initialization phase after which I'm stuck on Joining with the following loop repeating itself.

`

=========== CTXS RESTORED ===========

Size : 2208

DevEui : E6-60-38-28-23-5C-4B-35 JoinEui : 00-00-00-00-00-00-00-00 Pin : 00-00-00-00

success! Joining LoRaWAN network ...

=========== MLME-Request ============
MLME_JOIN
=====================================

STATUS : OK

=========== MLME-Confirm ============

STATUS : Tx timeout

=========== MLME-Request ============
MLME_JOIN
=====================================

STATUS : OK

=========== MLME-Confirm ============

STATUS : Tx timeout

=========== MLME-Request ============
MLME_JOIN
=====================================

STATUS : OK

=========== MLME-Confirm ============

STATUS : Tx timeout

=========== MLME-Request ============
MLME_JOIN
=====================================

STATUS : OK

=========== MLME-Confirm ============

STATUS : Tx timeout`

Any help would be appreciated.

sandeepmistry commented 2 years ago

Hi @SiddhantArya,

Are you using you trying to use this with your own LoRaWAN gateway? If so, have you looked at the gateway traffics logs in TTS web console?

I haven't used this library in India myself, but you might also need to set configure a channel mask like I had to for North America.

For example for US902-928 I had to use a channel mask value of "FF0000000000000000020000".

Please take a look at the TTN Frequency Plans for IN865-867.

SiddhantArya commented 2 years ago

Yes @sandeepmistry. I am using a pygate LoRaWAN gateway. The link of the same can be found here: PyGate Gateway. I have configured the gateway to the Indian frequency plan. The gateway shows up on the TTN console, but it doesn't show any message from my Pico + RFM95W node . I don't know where or how to set a channel mask.

wboerhout commented 2 years ago

I am using your module in order to connect to the TTN network in the Netherlands.

Code fails in SX1276Read (does not compare to 0x12 apparently)

Anything I can do to test? Do you have any progress?

Thanks for making this possible!

sandeepmistry commented 2 years ago

Hi @wboerhout,

Could you please open a new issue for this. Please include more details on the hardware you are using, the wiring (incl. photos), and what the SX1276Read is returning.

wboerhout commented 2 years ago

will do.

sandeepmistry commented 2 years ago

@SiddhantArya would you be able to try ABP instead of OTAA?

sandeepmistry commented 2 years ago

Closing for now due to lack of response.