Join otaa receives ERROR -1

Issue: join otaa receives ERROR-1

Setup: iot lora phat node, raspberry pi 4 8GB

Server:

Details:

Hi - I am trying to connect to The Things Network using an IoT Lora Node Phat but keep getting RAK811 response error -1: Invalid argument.
Below is the log output, any help would be much appreciated.

DEBUG:rak811.serial:Serial initialized
DEBUG:rak811.serial:Ignoring untagged: >Welcome to RAK811<
DEBUG:rak811.serial:Ignoring untagged: ><
DEBUG:rak811.serial:Ignoring untagged: >Selected LoraWAN 1.0.2 Region: EU868 <
DEBUG:rak811.serial:Ignoring untagged: ><
DEBUG:rak811.serial:Sending: >at+mode=0\r\n<
DEBUG:rak811.serial:Ignoring untagged: ><
DEBUG:rak811.serial:Ignoring untagged: >Selected LoraWAN 1.0.2 Region: EU868 <
DEBUG:rak811.serial:Ignoring untagged: ><
DEBUG:rak811.serial:Received: >OK<
DEBUG:rak811.serial:Sending: >at+band=EU868\r\n<
DEBUG:rak811.serial:Received: >OK<
DEBUG:rak811.serial:Sending: >at+set_config=app_eui:0000000000000000&app_key:<-----------APP-KEY--------->\r\n<
DEBUG:rak811.serial:Received: >OK<
DEBUG:rak811.serial:Sending: >at+join=otaa\r\n<
DEBUG:rak811.serial:Received: >ERROR-1<

Welcome to RAK forum @Leeee07 ,

What python library are you using?

I’m using python 3,

And the rak811 version is 2.0.3.0

The one I am asking is the python library.

I haven’t use lora phat node yet.

But you can check what RAK811 FW that python library supports. The RAK811 FW v2.0.3.0 is a very very old firmware.

You can check the RAK811 FW and changelogs here RAKwireless Downloads but these are already V3.0.0.x

If you’re library is in github, I highly advise you to check it and have a look on the issues tab as well.

If you need to update your RAK811 FW, here is our guide for FW update RAK811 Module Quick Start Guide | RAKwireless Documentation Center.

Here is the python code I am using. Thanks for your help

`#!/usr/bin/env python3
# V2.0.x firmware
from rak811.rak811 import Mode, Rak811

lora = Rak811()
lora.hard_reset()
lora.mode = Mode.LoRaWan
lora.band = 'EU868'
lora.set_config(app_eui='70B3D5xxxxxxxxxx',
                app_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
lora.join_otaa()
lora.dr = 5
lora.send('Hello world')
lora.close()`

Hi Carl,
I have fixed the error by changing the app eui key.
Thank you very much for your help. Much appreciated

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.