I have multiple OTAA configured devices. When I switch on all of them at the same time, sometimes, there is a mismatch in the device address. Two of the joined nodes are transmitting with the same device address but are alotted different device addresses by the network server.
Is there any reason why this would happen?
Each time when device is gain the OTAA procedure, device address regenerated again, if device session TTL expires. Try to increase this parameter in chirpstack-network-server.toml
Does every device use an unique AppKey?
They have the same AppKey.
Correct
But I don’t think that is the problem
This might be the issue.
See the following section from the LoRaWAN specification:
As you can see the join-accept message is encrypted using the AppKey
, also the MIC is generated using the AppKey
.
As your devices share the same AppKey
, there is a possibility that a device receives a join-accept intended for a different device. Since the MIC looks valid, the device can not know this is the case.
Therefore, always use unique AppKeys!
Yup
Makes sense
Thank you!
Technically it makes sense but I noticed that Things network doesn’t mind having same Appkey for all . Any idea why so ? Do they have different join procedure ?
It could be for convenience, but I believe you would end up in the same situation when two devices are activated at the same time with the same AppKey.