No connection to LoRaWan
-
I registed my device FipY at TTN.
tried run this example: https://docs.pycom.io/tutorials/lora/lorawan-otaa/
or https://docs.pycom.io/tutorials/lora/lorawan-abp/And nothing happens, no conection.
-
Hi,
I submitted a pull request to update the docs in OTAA to remove confusion. The dev_eui should either be set in the TTN portal to the LoRa MAC of your device, or the dev_eui in the code should be changed to reflect the one provided by TTN. This is stated somewhere in the docs in more detail :)
Best,
Gijs
-
@thinginnovations I'm not talking about the message of type "join request" alone. ABP and OTAA are simply different approaches. ABP can for instance used in a batch process to activate a bulk of devices and be sure, that they are activated.
Obviously OTAA is more convenient.
Besides that I experienced often that downlink messages would not arrive while uplink worked, meaning that OTAA failed while using the devices after ABP worked fine. There is no timing constraint on uplink messages. And especially for people trying to work with the PyCom lorawan-nanogateway ABP is helpful to separate reasons for failure.
Obviously, after having activated the device once (in a lifetime) there is no difference any more in operation.
-
@robert-hh a join request is only performed for OTAA. When using ABP there is nothing sent to the servers other than the uplink data as the key values have already been set.
If using ABP is a preference to not getting OTAA working the it is likely your uplink data wont be received either. OTAA is the more secure method to activate devices.
-
@thinginnovations In my understanding joining has two aspects - a network specific and a device specific one.
The network specific is the activation, either by the OTAA (Over The Air Activation) protocol or by (manual) personalization, ABP (Activation By Personalization). That sets the device ID , communication keys and sets the packet counters to 0. Personalization needs to happen only once in the lifetime of a device.
The device specific part loads the communication parameters established in the activation and the actual packet counter values into the software stack for usage. That happens usually on every boot. And that is the same whether you used OTAA or ABP for activation. Without that the device cannot communicate with the LoRa host.
-
There is no join process with ABP.
-
@lloureiro once the device is joined, you can send messages to the server. To make any use of that, you have to tell the server whereto it should forward the messages
-
@robert-hh @robert-hh Now i got activation messages. Its suposed to do something from my part? Or just simple wait with device connected?
-
@lloureiro for a start, try using ABP for joining. ABP requires to set up the keys manually, but it uses only uplink messages. That is more robust. Please also verify that you use the most recent firmware and that the antenna is connected to the proper plug.
-
This post is deleted!
-
@lloureiro you mentioned the lorawan-otaa example. That one performs a join using OTAA. If that join succeeds, you have a good conntion to the TTN server. If not, many things may be wrong. You can look on the ttn console on the traffic tab of your device, if any messages arrive.
-
@robert-hh said in No connection to LoRaWan:
otaa_node
Hello Robert. Yes, gateway in reach. What is otaa_node?
-
@lloureiro is there a gateway in reach? What was the result using otaa_node? Did you join successfully?