OTAA connection to TTN
-
I fail to get an OTAA connection to the things network. ABP is working without any problems. Does anybody had success with the newest firmware? Not sure whether the problem is coming from the gateway.
-
sorry for the confusion yes it is an ic880a not multitech
yes i'm checking back all the cables again and see if this helps
-
If you say ic880a and Multitech together its a bit confusing, they're two different gateway boards. You'll either have a mCard from Multitech or a IC880A from IMST.
But wrt to your problem I'd check all the connections - are the antennas well attached to both the LoPy and the gateway board? - try replacing the cables connecting the Pi to the board, especially the SPI.
-
yes my gateways is showing connected
but i think i figure out the issue at the eeror
I see CRC 100% failed
i wonder if my Rpi3 is not too close to the multitech board (interferences)
-
@gas
TTN is going through per-launch changes and not the easiest thing at the moment...Are you using https://console.thethingsnetwork.org/gateways and do you see you gateway as "connected" there?
-
Hi again
So meanwhile I build Multitech DIY ic880a +Rpi3 using TTN network
but still I'm not able to connect to my own gateway i did the declaration of lopy dev eui on TTN and used the app-key app_eui given by TTN
I might missing something on the gateway
-
@gas
That is correct, App Key isn't sent, but it's used by LoPy to encrypt the join message which contains the App EUI and Dev EUI.Objenius then uses that same App Key to decrypt the join message at their end and then send a reply also encrypted with that key. It's a "secret" both the module and Objenius knows
Everything must match the settings you have on the Objenius dashboard.
-
@affoltep
hi according to objenious app_key should never be sent when joining it is used to decrypt/crypt the data
but dev_eui yes since on the objenious side dashboard ou declare both dev-eui et app_eui
i tried all combination no success yet i'll keep you updated
-
@danielm : auth=(app_eui, app_key) is correct. You cannot define the dev_eui here
-
What is the right format for auth tuple in case of OTAA?
auth=(app_eui, app_key)
or
auth=(app_key, app_eui, dev_eui)
-
@affoltep
The problem here is @gas is using Objenius, which is a commercial LoRaWAN network - not the Things Network.Each network has small configuration differences, I'm not sure what Objenius expects.
-
@gas: just define the app_key and the app_eui in your LoPy code (no dev_eui) as shown in the examples. Then set the EUI Dev code in console.thethingsnetwork.org in your application/devices
-
@affoltep
I tried adding this
deveui on th eserverTTN (objenious)
and even when i do thislora.join(activation=LoRa.OTAA, auth=(app_key, app_eui, dev_eui), timeout=0)
still not having success
-
@jmarcelino Hey - Thanks a lot!. Taking the Dev EUI from the LoPy as you describe and typing it in the application of TTN makes OTAA working like a charm now ;)
-
@gas
Check if your gateway supports downlink messages? I had the same problem with the lorank8 gateway i was using because it was not updated. After the update it works perfectly. OTAA requires downlink to authenticate.Try sending a downlink from TTN while in ABP mode to check.
-
Thanks for the reply
when I look at the example I'm using i don't see where the devEUI was defined for the function lora.join
using this example my device never join...from network import LoRa
import socket
import time
import binascii
lora = LoRa(mode=LoRa.LORAWAN)
app_eui = binascii.unhexlify('AD A4 DA E3 AC 12 67 6B'.replace(' ',''))
app_key = binascii.unhexlify('11 B0 28 2A 18 9B 75 B0 B4 D2 D8 C7 FA 38 54 8B'.replace(' ',''))
lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0)
while not lora.has_joined():
time.sleep(2.5)
print('Not yet joined...')
s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
s.setsockopt(socket.SOL_LORA, socket.SO_DR, 5)
s.setblocking(False)
s.send(bytes([0x01, 0x02, 0x03]))
data = s.recv(64)
print(data)`
-
@gas said in OTAA connection to TTN:
another question how i use the deveui since i have deveui appeui and appkey
I'm not sure how Objenius works but usually in other LoRaWAN networks it's you who supplies your own unique Dev EUI to the network as part of device registration.
In the case of the LoPy you read the built-in Dev EUI with:
from network import LoRa import binascii lora = LoRa(mode=LoRa.LORAWAN) print(binascii.hexlify(lora.mac()).upper().decode('utf-8'))
Some other devices do allow you to change the built-in Dev EUI to something else, but I'm not sure that's possible on the LoPy.
If the Dev EUI doesn't match what the network expects it may well fail to connect as you describe.
-
Hi
I'm not able to join OTAA (objenious) i used just the simple example from the docs but netwwork never join
another question how i use the deveui since i have deveui appeui and appkeyThanks
-
I'm running it successfully on TTN here with OTAA using the latest firmware
>>> os.uname()
(sysname='LoPy', nodename='LoPy', release='1.1.0.b1', version='v1.8.6-274-g9a2018f on 2016-12-29', machine='LoPy with ESP32')
>>>Running LoPy-OTAA.py
Not joined yet...
Not joined yet...
Not joined yet...
Not joined yet...
Not joined yet...
Joined
Sent 1 bytes