NS->JS communication


#1

Does anyone know if there are some examples of the JSON that is passed between a NS and a JS? I’ve been reading the Backend developers guide, but some examples would be great, if they exsited.
( https://lora-alliance.org/sites/default/files/2018-04/lorawantm-backend-interfaces-v1.0.pdf )

Alternatively is there a Join Server i can set up so i can sniff the packets between the JS and the NS?
I’ve not been able to find an open source one.


#2

This could be helpful: https://github.com/brocaar/lorawan/tree/master/backend.

It provided both Go structs that can be used for JSON (un)marshaling as a join-server http Handler which could be implemented.


#3

Yes, thanks… though i dont’ know anything about go, i’ll have a look

Does this code implement a join server?


#4

It can be used to build a join-server, see also its docs: https://godoc.org/github.com/brocaar/lorawan/backend/joinserver.


#5

I did find that, but I coud’tn see how i’d use that to create a working joinsever… Is that just some of the code?


#6

It provides you with a http.Handler implementation (which is an interface in Go used by the net/http package). See the joinserver_test.go as it sets up a handler using a http server for testing.


#7

ok, thanks… i’ll need to look at that and do some learning.


#8

For the purpose of learnign / testing, can i implement this along side the rest of the loraserver components? I’m really keen to understand the communcations between the servers.