I have raised a case with Microchip about this, and this is what they said. I’ve also got a project from someone else which was based on an earlier code base.
I’ve unforutnatly not been within easy range of a gateway so, its made progress slow, but am goign to do some more work on this today, and all things being equal my RAK831 will arrive tommorrow.
Can you please confirm if your network server and gateway are same node or different nodes? Also can you confirm if you saw JOIN request at Gateway or Network Server? This would help in understanding the issue better. Normally the JOIN request is transparent to the gateway and it should just relay it to the Network Server.
The JOIN Request carries a MIC (Message Integrity Check) which is calculated using the APP Key. If the Network Server does not have the same APP Key, MIC check on Network Server will fail and it will send a Join Failure. To debug this further, we would need to know MIC check passed or failed on Network Server. Please advise if it is possible to get these logs.
If MIC check passed on Network Server, then it should send a Join response with success. If MIC check failed, then it should send a Join response with failure. Can you check if Network Server is generating the response?
If it is generating the response, then we would need to review the RX1 and RX2 settings at the device side to ensure they match the network expectations.
Hope that helps. Please let us know once you have this information.