Difference between revisions of "MG003-L-EU External Server connection"

From nemeuswiki
Jump to: navigation, search
m
m
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
  
=== DIY Server ===
+
== DIY Server ==
  
 
By default the data are sent in UDP soa connection should be open  
 
By default the data are sent in UDP soa connection should be open  
Line 20: Line 20:
  
  
=== TheThingsNetwork ===
+
== TheThingsNetwork ==
  
==== prerequisite ====
+
=== prerequisite ===
  
 
First you need an account, you can create on [https://www.thethingsnetwork.org/ thethingsnetwork]  website
 
First you need an account, you can create on [https://www.thethingsnetwork.org/ thethingsnetwork]  website
Line 29: Line 29:
  
 
Then you need to get the Gateway Unique ID :
 
Then you need to get the Gateway Unique ID :
* available on GW sticker: get the id and add '0000' at the end (only valid if not modified by user)
+
* available on GW sticker: get the id and add '0000' at the end (only valid if not modified by user)
* on bottom of 'FWD folder'
+
* on bottom of 'FWD folder'
  
 +
Then update server address:
 +
* change data server address to fit TTN router (e.g. router.eu.thethings.network:1700)
 +
 +
[[File:MG003-L-EU External Server connection TTN 1.png|MG003-L-EU External Server connection TTN 1 (LoRaWan)]]
 +
 +
==== Gateway Channel Configuration ====
  
==== registering ====
+
Ttn use more channels than the default configuration (see [https://www.thethingsnetwork.org/wiki/LoRaWAN/Frequencies/Frequency-Plans TTN Frequency plan ]), to avoid loss of packet you will need to setup the following channels at SF12
 +
* Mandatory channels: 868100000, 868300000, 868500000
 +
* Additionnal channels : 867100000, 867300000, 867500000, 867700000, 867900000
 +
 
 +
=== registering ===
  
  
Line 48: Line 58:
 
In settings
 
In settings
 
* Uncheck 'Automatically update gateway'
 
* Uncheck 'Automatically update gateway'
 
On gateway :
 
* change data server address to fit TTN router (e.g. router.eu.thethings.network:1700)
 
 
  
  
  
==== Add an application ====
+
=== Add an application ===
  
 
Create a New application  
 
Create a New application  
  
 
You can use the TTN APP id or get the one from your module/device.
 
You can use the TTN APP id or get the one from your module/device.

Latest revision as of 09:01, 4 December 2017



1 DIY Server

By default the data are sent in UDP soa connection should be open

Exemple in ruby

#!/usr/bin/env ruby 
require 'socket'               # Get sockets from stdlib

Socket::udp_server_loop("0.0.0.0",2224) do |raw,msgSrc|  
  $stdout << format("\nReceived %s\n",raw)
  $stdout << format("\nReceived %s\n",msgSrc)
...
end


2 TheThingsNetwork

2.1 prerequisite

First you need an account, you can create on thethingsnetwork website

The gateway need to be in packet fowarder mode. You can set it via the Gateway Configuration tool, by changing the mode to 'PKT_FOWARDER' in the 'radio Folder'.

Then you need to get the Gateway Unique ID :

  • available on GW sticker: get the id and add '0000' at the end (only valid if not modified by user)
  • on bottom of 'FWD folder'

Then update server address:

  • change data server address to fit TTN router (e.g. router.eu.thethings.network:1700)

MG003-L-EU External Server connection TTN 1 (LoRaWan)

2.1.1 Gateway Channel Configuration

Ttn use more channels than the default configuration (see TTN Frequency plan ), to avoid loss of packet you will need to setup the following channels at SF12

  • Mandatory channels: 868100000, 868300000, 868500000
  • Additionnal channels : 867100000, 867300000, 867500000, 867700000, 867900000

2.2 registering

You can login to thethingnetworks and register your Gateway.

  • Give the gateway Unique ID (gateway eui) found on Java application or on sticker if not modified by the user (add 0000 at the end).
  • Check the box 'I'm using the legacy packet forwarder'
  • Select Europe Frequency plan
  • Select Gateway location
  • Select Antenna Placement

Click the Button 'Register Gateway'


In settings

  • Uncheck 'Automatically update gateway'


2.3 Add an application

Create a New application

You can use the TTN APP id or get the one from your module/device.