I have implemented a custom join server that I’m using to support auto-join of my sensors to my gateway. LoRa Server forwards joins to my custom server for specialized processing and I then forward the request downstream to LoRa App Server for the remaining join processing, passing LoRa App Server response back through my custom service to LoRa Server. In this scenario, the service that I am using (a .NET Core API service) has a delay on initial request/initial service startup. That translates to a failure on first sensor join but subsequent joins succeed. Furthermore, once the service is up and running, additional joins seem to succeed without issue.
I’ve isolated where the error is occurring - the “json.NewDecoder.Decode” line in jsclient.go in LoRa Server is throwing an exception on attempts to unmarshal the response from my custom join service. Also, journalctl for loraserver shows an issue with inability to convert the response JSON to a backend.JoinAnsPayload. What I suspect is happening is that the stream being returned to and unmarshaled in LoRa Server from the custom join service gets cut off due to a timeout, resulting in an invalid JSON string for that initial request. I’ve tried increasing RxDelay to 15 (the max) but that did not help - either that is not related or 15 seconds is not enough.
Is there a different spot in the configuration where I can extend “timeout” for the join request processing so that the first request has time to complete successfully? I’ve also tried “priming” my custom service with some “dummy” requests prior to processing the first real join request but that only seems to address the internal startup time for the custom service. Is there a way to trigger a “dummy” join at the front-end starting at the LoRa Server level instead?
Thanks!