Great to hear that you want to help us with the development of the backend. The instructions for setting up your environment can be found on Github. We use Linux or macOS machines, but Windows should be possible too (although you’d have to figure that out yourself).
v1-staging is what’s currently running on staging.thethingsnetwork.org, while v2-preview is the code for the upcoming version that is running our preview environment. We don’t do development on v1-staging anymore and it will be discontinued after we officially launch v2, so it would be a waste to spend your time on that.
Using the latest stable versions of dependencies will probably give the best experience, but any recent version should work just fine too.
If you look in the Procfile you see what commands forego runs in order to start each component. You can run these commands separately as well.
You can find the configuration files for your development environment in the .env folder. The configuration in those files should be enough to start development of the backend. You can “simulate” running the components on different machines by using the docker-compose file that is included in the repository (just follow the part about Docker in the README).
Yes, we’re planning to remove the preview suffix from v2 before the end of December.
We don’t have any opinion on Linux distributions; neither for development, nor for production machines, so just take what you’re most comfortable with.
You can always assume that we run the latest versions of our dependencies. We only use a small subset of the Redis API, so an older version should work just as well, but I usually prefer the latest.
I have compiled the ttn-2-preview version from the source. I have first started my discovery server, then I try to start router, but I get this error message: FATAL Could not initialize router error=Failed to announce this component to TTN discovery: rpc error: code = 2 desc = permission denied: unable to parse token: Auth server dev not registered: permission denied: unable to parse token: Auth server dev not registered. Can you help me with that?
Thanks, now it is working, but my router does not open a port for uplink stream for my gateway. Does any body know how to do that? I have tried to change the configure file for the router, but that does not work for me.
I don’t mean a physical router, but I mean ttn router. I don’t see any udp port which is open on my server
that I can configure my gateway to send packages to that port (by default it is 1700).
Basically, you need to run the lora-gateway-bridge between a gateway (a current version gateway sending udp packets to the ttn-router) and the ttn-router of the v2-preview TTN Network Server.
@hoonppark do you know how to start a ttn handler, because when I start a ttn handler then the port 1782 doesn’t opened. Therefore I can’t run ttnctl on my local server.
@sPyLoRa, I haven’t tried to start a ttn router alone yet. I just ran ‘forego start’ to start all ttn server components. Once I run the command ‘$ forego start’, I can see the following ttn processes are started:
Interestingly, there is no port number mentioned in this file.
Why don’t you try to start the TTN server by running the command ‘forego start’ and see if your server starts up ok. I think that’s the first step to verify if your TTN server can start up without a problem or not. Once it works, then try to start each component individually.
Looks like you’re using the v1-staging version of ttnctl while using the v2-preview version of the backend. Try updating everything to the latest version.