documentation
HOME » DOCUMENTATION » TECHNICAL DOCUMENTS » Semtech Network Server User Guide » Create an Account with the Semtech Network Server

Create an Account with the Semtech Network Server

  1. Login or register for an account to access the Semtech Network Server website. By registering, not only will you get free access to the Semtech Network Server, you will also get access to a whole host of free resources and training materials.
  1. The landing screen displays.

Semtech Network Server Landing Page

Figure 3: Semtech Network Server Landing Page

Register and Connect Your Gateway to the Semtech Network Server

This section explains how to configure your gateway to communicate with the Semtech Network Server. These steps should be repeated for all the gateways you wish to connect to the Semtech Network Server.

Add Your Gateway to the Semtech Network Server

  1. Click Gateways in the menu on the left.

Figure 4: Gateways item in Left Menu

  1. Click + CREATE.

+CREATE Button

Figure 5: +CREATE Button

  1. Complete the form that appears:
  • Gateway name: a human-readable name for the gateway. Only letters, numbers and dashes are allowed, e.g., test-gateway.
  • Gateway description: a human-readable description, e.g., Gateway for testing
  • Gateway ID: ensure the MSB option is selected and paste in the GATEWAY_ID you found in the step: Find the Gateway ID.
  • Gateway-profile: if you are using the ChirpStack Gateway OS, set this option to your region, the same one you selected for the Network Server.
  • Gateway discovery enabled: You do not need to check this box. This feature is disabled on the server.
  • Gateway altitude: You do not need to enter anything here, unless you know the altitude and want to store it for informational purposes. If your gateway has an on-board GPS, the altitude will be set automatically.
  • Gateway location: if you wish, set the location of the gateway by dragging the pin on the map to the correct location.

Gateway Creation Form

Figure 6: Gateway Creation Form

  1. Scroll to the bottom of the page and click CREATE GATEWAY.

Create Gateway Button

Figure 7: Create Gateway Button

  1. The gateway now appears in the list on the Gateways page.

Gateways Page

Figure 8: Gateways Page

Generate Client Certificates

Now that you have registered your gateway, you must generate a client certificate, which is then stored on the gateway. This certificate is used to secure communications between the gateway and the network server.

  1. Log into the Semtech Network Server.
  1. Click Gateways in the menu on the left.
  1. Select the gateway you just created from the list.

Select Your Gateway

Figure 9: Select Your Gateway

  1. Open the CERTIFICATE tab, then click GENERATE CERTIFICATE. Generating the certificate takes a few seconds.

CERTIFICATE Tab

Figure 10: CERTIFICATE Tab

  1. Three certificates display:
  • CA certificate
  • TLS certificate
  • TLS key

Generated Certificates

Figure 11: Generated Certificates

Note: Following the instructions below, copy the certificates. When copying each certificate, click in the field, press CTRL+A to select all, then CTRL+C to copy. (Be sure to include the —-BEGIN CERTIFICATE—- and —-END CERTIFICATE—- lines.)

  1. Copy the contents of the CA certificate field and save it temporarily in a text file. We refer to this in the next section as the CA_CERTIFICATE.
  1. Copy the contents of the TLS certificate field and save it temporarily in a text file. We refer to this in the next section as the TLS_CERTIFICATE.
  1. Copy the contents of the TLS key field and save it temporarily in a text file. We refer to this in the next section as the TLS_KEY.

Configure Your Gateway and Create an Application

In this section you configure your gateway with the Semtech Network Server settings and the certificates you just generated. The instructions for this vary depending on whether your gateway is running LoRa Basics Station, Semtech UDP Packet Forwarder with the ChirpStack Gateway Bridge, or ChirpStack Gateway OS. Follow the instructions below for your implementation.

Configure a Gateway Running LoRa Basics Station

Consult the gateway documentation to find out how you can set the credentials on your gateway. You need to find out where these files should be stored, the configuration path.

Note: If you can connect to your gateway using SSH or PuTTY, the configuration path will be the same folder that holds your station.conf file. Be aware that, if you search for station.conf, you may find multiple instances of the file within subfolders inside the examples folder. There should also be a station.conf file outside of this folder; the path containing this station.conf file is the one to use.

Create the following files at the configuration path (e.g., if the configuration path is /home, you would create the files in the /home folder):

  • EU868:

wss://eu868.basicstation.loracloud.com:443

  • US915:

wss://us915.basicstation.loracloud.com:443

  • CN470:

wss://cn470.basicstation.loracloud.com:443

  • AU915:

wss://au915.basicstation.loracloud.com:443

  • AS923 (1):

wss://as923-1.basicstation.loracloud.com:443

  • AS923 (2):

wss://as923-2.basicstation.loracloud.com:443

  • KR920:

wss://kr920.basicstation.loracloud.com:443

  • IN865:

wss://in865.basicstation.loracloud.com:443

  • tc.trust - set this file to the contents of the CA certificate field in the network server gateway certificate section, saved in the previous step as CA_CERTIFICATE.
  • tc.crt - set this file to the contents of the TLS certificate field in the network server gateway certificate section, saved in the previous step as TLS_CERTIFICATE.
  • tc.key - set this file to the contents of the TLS key field in the network server gateway certificate section, saved in the previous step as TLS_KEY.

Configure a Gateway with the Semtech UDP Packet Forwarder

When working with the Semtech UDP packet forwarder, you need to first configure the ChirpStack Gateway Bridge.

  1. Locate the device running ChirpStack Gateway Bridge. This could be your gateway, a second device running Debian or Ubuntu on your network, or it could be a cloud server, as described in the Gateway section.
  1. You need to know the Gateway Bridge configuration path. If you installed ChirpStack Gateway Bridge yourself, you should already know the path. If you bought a gateway with ChirpStack Gateway Bridge installed, consult the documentation. We refer to this path as GATEWAY_BRIDGE_CONFIGURATION_PATH.

Note: If you can connect to the device running ChirpStack Gateway Bridge using SSH or PuTTY, the configuration path will be the same as the folder that holds your chirpstack-gateway-bridge.toml file. On some gateway models, the configuration path could be one of the following:

  • /etc/chirpstack-gateway-bridge
  • $HOME/.config/chirpstack-gateway-bridge
  1. Create a file at the GATEWAY_BRIDGE_CONFIGURATION_PATH named ca.pem, and populate it with the contents of the CA certificate field in the Network Server Gateway Certificate section, saved in the previous step as CA_CERTIFICATE.

For example, if the GATEWAY_BRIDGE_CONFIGURATION_PATH is /etc/chirpstack-gateway-bridge the file will be saved at /etc/chirpstack-gateway-bridge/ca.pem.

  1. Create a file at the GATEWAY_BRIDGE_CONFIGURATION_PATH named cert.pem, and populate it with the contents of the TLS certificate field in the Network Server Gateway Certificate section, saved in the previous step as TLS_CERTIFICATE.

For example, if the GATEWAY_BRIDGE_CONFIGURATION_PATH is /etc/chirpstack-gateway-bridge the file will be saved at /etc/chirpstack-gateway-bridge/cert.pem.

  1. Create a file at the GATEWAY_BRIDGE_CONFIGURATION_PATH named key.pem, populating this file with the contents of the TLS key field in the Network Server Gateway Certificate section, saved in the previous step as TLS_KEY.

For example, if the GATEWAY_BRIDGE_CONFIGURATION_PATH is /etc/chirpstack-gateway-bridge the file will be saved at /etc/chirpstack-gateway-bridge/key.pem.

  1. Open the chirpstack-gateway-bridge.toml file at the GATEWAY_BRIDGE_CONFIGURTATION_PATH. Find the section starting with [integration.mqtt.auth]. Make sure the type is set to generic, as shown in the code example:

 

  [integration.mqtt.auth]

  type=“generic”

 

  1. Locate the section in the chirpstack-gateway-bridge.toml which starts with [integration.mqtt.auth.generic]. Update or insert the following settings under the [integration.mqtt.auth.generic] section heading.
  • servers:

Update or create the servers setting as shown, where MQTT_SERVER_ENDPOINT is replaced with the MQTT server for your region, as listed on the Semtech Network Server website and below.

 

  servers=[“MQTT_SERVER_ENDPOINT”]

 

For example, for the region EU868, this setting is:

 

  servers=[“ssl://eu868.mqtt.loracloud.com:8883”]

 

  • EU868:

ssl://eu868.mqtt.loracloud.com:8883

  • US915:

ssl://us915.mqtt.loracloud.com:8883

  • CN470:

ssl://cn470.mqtt.loracloud.com:8883

  • AU915:

ssl://au915.mqtt.loracloud.com:8883

  • AS923-1:

ssl://as923-1.mqtt.loracloud.com:8883

  • AS923-2:

ssl://as923-2.mqtt.loracloud.com:8883

  • KR920:

ssl://kr920.mqtt.loracloud.com:8883

  • IN865:

ssl://in865.mqtt.loracloud.com:8883

  • ca_cert, tls_cert and tls_key:

Update the ca_cert, tls_cert and tls_key settings as shown, where GATEWAY_BRIDGE_CONFIGURATION_PATH is replaced with the actual path to the gateway bridge configuration.

 

  ca_cert=[”GATEWAY_BRIDGE_CONFIGURATION_PATH/ca.pem”]

  tls_cert=[”GATEWAY_BRIDGE_CONFIGURATION_PATH/cert.pem”]

  tls_key=[”GATEWAY_BRIDGE_CONFIGURATION_PATH/key.pem”]

 

For example, if your GATEWAY_BRIDGE_CONFIGURATION_PATH is /etc/chirpstack-gateway-bridge then this would be:

 

ca_cert=[”/etc/chirpstack-gateway-bridge/ca.pem”]

tls_cert=[”/etc/chirpstack-gateway-bridge/cert.pem”]

tls_key=[”/etc/chirpstack-gateway-bridge/key.pem”]

 

  1. Make sure your chirpstack-gateway-bridge.toml file has the [integration.mqtt], [integration.mqtt.auth] and [integration.mqtt.auth.generic] sections with the server, ca_cert, tls_cert and tls_key fields under the [integration.mqtt.auth.generic] section as shown.

 

[integration.mqtt]

event_topic_template=“gateway/{{ .GatewayID }}/event/{{ .EventType }}”

command_topic_template=“gateway/{{ .GatewayID }}/command/#”

[integration.mqtt.auth]
type=“generic”

[integration.mqtt.auth.generic]
server=“ssl://eu868.mqtt.loracloud.com:8883”

username=”“

password=”“

ca_cert=”/etc/chirpstack-gateway-bridge/ca.pem”

tls_cert=”/etc/chirpstack-gateway-bridge/cert.pem”

tls_key=”/etc/chirpstack-gateway-bridge/key.pem”

 

Configure a Gateway Running ChirpStack Gateway OS

  1. Log into the Raspberry Pi via SSH or PuTTY with the username admin and the password admin.

ssh admin@RASPBERRY_PI_IP_ADDRESS

admin

  1. At the command prompt, enter:

$ sudo gateway-config

  1. At the password prompt, enter:

Admin

  1. When the Configuration menu appears, select 3 Edit ChirpStack Gateway Bridge config, and press Enter.

Configuration Menu; Option 3

Figure 12: Configuration Menu; Option 3

  1. Select 2 MQTT connection wizard, and press Enter.

Figure 13: Edit ChirpStack Gateway Bridge Config Menu

  1. Enter the MQTT server address for your region, as listed below and on the Semtech Network Server webpage.
  • EU868:

ssl://eu868.mqtt.loracloud.com:8883

  • US915:

ssl://us915.mqtt.loracloud.com:8883

  • CN470:

ssl://cn470.mqtt.loracloud.com:8883

  • AU915:

ssl://au915.mqtt.loracloud.com:8883

  • AS923-1:

ssl://as923-1.mqtt.loracloud.com:8883

  • AS923-2:

ssl://as923-2.mqtt.loracloud.com:8883

  • KR920:

ssl://kr920.mqtt.loracloud.com:8883

  • IN865:

ssl://in865.mqtt.loracloud.com:8883

  1. Press Enter.
  1. When asked if you would like to configure a CA certificate. Press Enter to select Yes, then press Enter at the next prompt.

MQTT Connection Wizard: CA Certificate Opportunity

Figure 14: MQTT Connection Wizard: CA Certificate Opportunity

The nano editor opens an empty file.

  1. Copy the CA_CERTIFICATE you saved in the Generate Client Certificates section.
  1. Paste the CA certificate into the nano editor using CTRL+V. (If you are using Windows, simply right-click.)

Nano Editor with PastedCA Certificate

Figure 15: Nano Editor with PastedCA Certificate

  1. Save and close the file by pressing CTRL+O, and then Enter to accept the filename and location as /etc/chirpstack-gateway-bridge/ca.pem, then press CTRL+X to exit.
  1. When asked if you want to configure a client-certificate, press Enter to select Yes.
  1. Press Enter to select OK at the next prompt.

MQTT Connection Wizard: Client Certificate Opportunity

Figure 16: MQTT Connection Wizard: Client Certificate Opportunity

  1. Copy the TLS_CERTIFICATE you saved earlier.
  1. Paste the TLS certificate into the window using CTRL+V. (If you are using Windows, simply right-click.).

Nano Editor with Pasted TLS Certificate

Figure 17: Nano Editor with Pasted TLS Certificate

  1. Save and close the file by pressing CTRL+O, and then Enter to accept the filename and location as /etc/chirpstack-gateway-bridge/cert.pem. Press CTRL+X to exit.
  1. Press Enter to select OK at the next prompt.

MQTT Connection Wizard: Client Certificate Key Opportunity

Figure 18: MQTT Connection Wizard: Client Certificate Key Opportunity

  1. Copy the TLS_KEY you saved previously.
  1. Paste the TLS key into the window using CTRL+V. (If you are using Windows, simply right-click.)

Figure 19: Nano Editor with Pasted TLS Key

  1. Save and close the file by pressing CTRL+O, and then Enter to accept the filename and location as /etc/chirpstack-gateway-bridge/key.pem. Press CTRL+X to exit.
  1. The Restart ChirpStack Gateway Bridge screen displays. Press Enter to select OK.

Figure 20: ChirpStack Gateway Bridge Restart Screen

  1. The ChirpStack Gateway OS Configuration menu displays.

Create an Application

An application represents a collection of devices on the network server. These devices may either be all of the same type or a mixture of device types. The data from each device in the application will pass to any integrations you have registered with the application. This section explains how to create an application.

  1. Log into the Semtech Network Server if you haven’t already done so.
  1. Click Applications in the menu on the left.

Semtech Network Server Applications Item

Figure 21: Semtech Network Server Applications Item

  1. Click + CREATE.

Applications +CREATE Button

Figure 22: Applications +CREATE Button

  1. Complete the form:
  • Application name: enter a name with only letters, numbers, and dashes, e.g., lr1110-application
  • Application description: Give the application a description e.g., LoRa Edge™ testing application (spaces are allowed)

Create Application Form

Figure 23: Create Application Form

  1. Click CREATE APPLICATION. The application appears in the list of Applications.

New Application on the Applications Page

Figure 24: New Application on the Applications Page

You have now created an application.