- Notifications
You must be signed in to change notification settings - Fork273
The Things Network Stack V2
License
TheThingsArchive/ttn
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The Things Network is a global open crowdsourced Internet of Things data network.
When you get started with The Things Network, you'll probably have some questions. Here are some things you can do to find the answer to them:
- Check out ourwebsite
- Read theofficial documentation
- Register on theforum and search around
- JoinSlack and ask us what you want to know
Although we're all about building an open, public network, we understand that some people rather have everything privately on their own servers. On our website, you'll find some articles describing how you canset up a private routing environment and how you candeploy this environment using Docker.
First, you'll have to prepare your development environment. Follow the steps below to set up your development machine.
- Make sure you haveGo installed (version 1.11 or later).
- Set up yourGo environment
- Install theprotobuf compiler (
protoc) - Install
make. On Linux installbuild-essential. On macOS,makecomes with XCode or the developer tools. On Windows you can getmakefromhttps://gnuarmeclipse.github.io/windows-build-tools/ - Make sure you haveRedis andRabbitMQinstalled andrunning.
On a fresh installation you might need to install theMQTT plugin for RabbitMQ.
If you're on Linux, you probably know how to do that. On a Mac, just runbrew bundle. The Windows installer will setup and start RabbitMQ as a service. Use theRabbitMQ Command Prompt (sbin dir)to run commands, i.e. to enable plugins. - Declare a RabbitMQ exchange
ttn.handlerof typetopic. Usingthe management plugin, declare the exchange in the web interfacehttp://server-name:15672or using the management cli, runrabbitmqadmin declare exchange name=ttn.handler type=topic auto_delete=false durable=true. If your handler's user has sufficient permissions on RabbitMQ, it will attempt to create the exchange if not present.
Next, you can clone this repository and set up the TTN part:
- Fork this repository
- Clone your fork:
git clone --branch develop https://github.com/YOURUSERNAME/ttn.git $GOPATH/src/github.com/TheThingsNetwork/ttn cd $GOPATH/src/github.com/TheThingsNetwork/ttn- Install the dependencies for development:
make dev-deps - Run the tests:
make test - Run
make buildto build bothttnandttnctlfrom source. - Run
make devto install the go binaries into$GOPATH/bin/- Optionally on Linux or Mac you can use
make linkto link them to$GOPATH/bin/(In order to run the commands, you should haveexport PATH="$GOPATH/bin:$PATH"in your profile).
- Optionally on Linux or Mac you can use
- Configure your
ttnctlwith the settings in.env/ttnctl.yml.dev-exampleby copying that file to~/.ttnctl.yml. - Trust the CA certificate of your local discovery server by copying
.env/discovery/server.certto~/.ttnctl/ca.cert.
You can check yourttnctl configuration by runningttnctl config. It should look like this:
INFO Using config: config file: /home/your-user/.ttnctl.yml data dir: /home/your-user/.ttnctl auth-server: https://account.thethingsnetwork.org discovery-address: localhost:1900 router-id: dev handler-id: dev mqtt-address: localhost:1883NOTE: From now on you should run all commands from the$GOPATH/src/github.com/TheThingsNetwork/ttn directory.
Source code for The Things Network is released under the MIT License, which can be found in theLICENSE file. A list of authors can be found in theAUTHORS file.
About
The Things Network Stack V2
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.