Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 14, 2021. It is now read-only.
/ttnPublic archive

The Things Network Stack V2

License

NotificationsYou must be signed in to change notification settings

TheThingsArchive/ttn

Repository files navigation

Build StatusCoverage StatusGoDoc

The Things Network

The Things Network is a global open crowdsourced Internet of Things data network.

Getting Started With The Things 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:

Installing and Running The Things Network Stack

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.

Development

First, you'll have to prepare your development environment. Follow the steps below to set up your development machine.

  1. Make sure you haveGo installed (version 1.11 or later).
  2. Set up yourGo environment
  3. Install theprotobuf compiler (protoc)
  4. Installmake. On Linux installbuild-essential. On macOS,make comes with XCode or the developer tools. On Windows you can getmake fromhttps://gnuarmeclipse.github.io/windows-build-tools/
  5. 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.
  6. Declare a RabbitMQ exchangettn.handler of typetopic. Usingthe management plugin, declare the exchange in the web interfacehttp://server-name:15672 or 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:

  1. Fork this repository
  2. Clone your fork:git clone --branch develop https://github.com/YOURUSERNAME/ttn.git $GOPATH/src/github.com/TheThingsNetwork/ttn
  3. cd $GOPATH/src/github.com/TheThingsNetwork/ttn
  4. Install the dependencies for development:make dev-deps
  5. Run the tests:make test
  6. Runmake build to build bothttn andttnctl from source.
  7. Runmake dev to install the go binaries into$GOPATH/bin/
    • Optionally on Linux or Mac you can usemake link to link them to$GOPATH/bin/ (In order to run the commands, you should haveexport PATH="$GOPATH/bin:$PATH" in your profile).
  8. Configure yourttnctl with the settings in.env/ttnctl.yml.dev-example by copying that file to~/.ttnctl.yml.
  9. Trust the CA certificate of your local discovery server by copying.env/discovery/server.cert to~/.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:1883

NOTE: From now on you should run all commands from the$GOPATH/src/github.com/TheThingsNetwork/ttn directory.

License

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.


[8]ページ先頭

©2009-2026 Movatter.jp