Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build Your Own TTN Gateway with Resin.io and RAK Wireless

Tim Perry
October 04, 2018

Build Your Own TTN Gateway with Resin.io and RAK Wireless

Tim Perry

October 04, 2018
Tweet

More Decks by Tim Perry

Other Decks in Technology

Transcript

  1. @pimterry
    Build your own gateway
    with resin.io and RAK wireless

    View Slide

  2. @pimterry

    View Slide

  3. @pimterry

    View Slide

  4. @pimterry

    View Slide

  5. Register a TTN Gateway
    Create an Resin.io account & application
    Provision your device
    Deploy the packet forwarder
    Configure your device
    @pimterry
    Build your own gateway

    View Slide

  6. Follow the slides yourself at:
    bit.ly/resin-ttn-workshop
    @pimterry

    View Slide

  7. Sign up at console.thethingsnetwork.org
    Register a new gateway:
    ○ Any name
    ○ Non-legacy packet forwarder
    ○ EU frequency
    @pimterry
    Register a TTN Gateway

    View Slide

  8. Sign up at Resin.io
    Enter your details
    Add an SSH key (optional)
    Create an application:
    ■ Starter app type
    ■ Raspberry Pi 3
    @pimterry
    Create a Resin.io account & application

    View Slide

  9. Click ‘Add Device’
    Enter the network details
    Follow the guide to flash your SD card
    Make sure the antenna is attached
    Insert the SD card & power
    ...and continue, whilst it boots
    Provision your device
    @pimterry

    View Slide

  10. Deploy the packet forwarder
    @pimterry
    git clone
    https://github.com/resin-io-playground/ttn-resin-gateway-rpi
    Add your app as a git remote
    (see the top right of the app page)
    git push resin master
    (No SSH key? Use resin push with the Resin CLI)

    View Slide

  11. Deploy the packet forwarder (resin push)
    @pimterry
    git clone
    https://github.com/resin-io-playground/ttn-resin-gateway-rp
    i
    Install the CLI:
    docs.resin.io/reference/cli/ (‘Standalone install’)
    In the ttn-resin-gateway-rpi folder:
    > resin login
    > resin push

    View Slide

  12. Configure your device
    @pimterry
    Open ‘Device Variables’ in
    the Resin device dashboard
    Set GW_ID to the id of your gateway
    Set GW_KEY to the key of your gateway
    Set GW_RESET_PIN to 11

    View Slide

  13. Bonus: NTP Fix
    @pimterry
    If your device can’t authenticate to TTN on the IZUM
    conference network, its clock may be failing to sync.
    You can fix this by SSHing into the host and running:
    date -s "$(curl --silent --head resin.io |
    grep Date: | sed 's/Date: //')"

    View Slide

  14. You’re done!
    @pimterry
    Monitor status via the device logs
    in the Resin dashboard
    Monitors packets sent & received
    in the TTN console

    View Slide

  15. @pimterry
    Have questions?
    forums.resin.io

    View Slide

  16. @pimterry
    Build your own gateway
    with resin.io and RAK wireless

    View Slide