Wirepas networks

This chapter describes what Wirepas networks are and how to create, manage and deploy them.

The Wirepas networks page allows you to configure and deploy gateway software that connects the Wirepas mesh to the server. Each network creates a composition that behaves like a blueprint for your Wirepas application that runs on your gateway. This composition is automatically assigned to the fleet of devices you connect your Wirepas network to.

The Wirepas networks tab is in the sidebar, as shown in the following figure.

Wirepas networks tab in the sidebar

Before you start

You’ll need:

  • the Wirepas feature turned on in Marketplace.

  • your gateways equipped with the Wirepas Connectivity Card and onboarded.

  • the following values:

    • Wirepas Mesh MQTT username, password, hostname and port,

    • network ID and channel,

    • gateway stack version.

Warning

The feature cannot be turned off in Marketplace until any network exists.

Create a Wirepas network

Click the + Add network button in the top right corner, and a pop-up appears. Follow the next 5 steps to create your network.

Configure the network parameters

In the Network parameters step:

  1. Give your network a name.

  2. Provide the network ID and channel your Wirepas mesh works on. The ID must be exactly 8 hex characters, for example, A1B2C3D4.

  3. Give this network authentication and cipher keys.

Network parameters step of the Add network window

Important

Keys are optional, but they play an important role in the security of your mesh. It is better to provide them.

Set up the sink and gateway

In the Sink & gateway settings step, you can see the name of your sink. This field is read-only, but you can change the name of your sink later in the fleet’s variables section; see Change the sink name.

  1. Select the sink role. There are two possible options:

    Role

    Description

    sink csma-ca

    Your sink is a place where data from the mesh leaves.

    router csma-ca autorole

    Your sink behaves like a router in your mesh.

  2. In the Start stack after configuration field, select either True or False. If set to False, after configuration, the stack does not start automatically.

  3. In the last field, select the gateway stack version.

Sink & gateway settings step of the Add network window

Set the Wirepas host parameters

In the Wirepas host parameters step, add the MQTT hostname, port, username and password that you gathered in Before you start.

Wirepas host parameters step of the Add network window

Warning

Providing incorrect data may lead to a gateway that fully works but does not send any information back to the broker.

Select a fleet

In the Fleet details step:

Fleet details step of the Add network window

If you already have a fleet with devices that should run your Wirepas network application:

  1. Select this fleet from the dropdown menu.

  2. Click the Next button.

Selecting an existing fleet in the Fleet details step

If you onboarded devices but did not create the fleet:

  1. Click Create fleet.

  2. Provide the fleet’s name.

  3. Add devices.

  4. Press Next.

Creating a new fleet in the Fleet details step

Check the summary

In the Summary step:

Summary step of the Add network window

Important

Check all values you have provided earlier very carefully. Providing wrong data leads to non-working applications

The network is created.

Created Wirepas network

The next step is to deploy this network’s application to your gateway.

Wirepas network composition

The Go to composition button is in the top right corner, as shown in the following figure.

Network details page with the Go to composition button

When you were creating the Wirepas network, the composition was automatically created and attached to the fleet. This composition contains four applications:

Application

Description

dbus-service

A private D-Bus message bus the other services talk over.

sink-service

Drives the USB sink over UART and exposes it on D-Bus.

transport-service

The MQTT client. Uses the MQTT credentials you already specified to bridge D-Bus traffic to the broker.

wirepas-configurator

Runs once. It finds the sink. After that, it stops it, writes the node address, role, network ID, channel and keys, then starts the sink again if Start stack after configuration is set to True.

This composition has the same name as its Wirepas network.

Composition details page of the Wirepas network composition

Deploy the network stack

You can deploy the automatically generated composition.

The Go to fleet button is in the top right corner, as shown in the following figure.

Go to fleet button on the Network details page

Press it, and you are redirected to the previously connected fleet.

Compositions tab of the connected fleet

TODO link to deploying a composition within a fleet (“For detailed information on how to deploy a composition within a fleet, see …”)

You can check the status of your deployment directly in the network tab, as shown in the following figure.

Deployment status on the Network details page

Important

Any changes you make to the network that affect the composition are not deployed automatically. They appear only after a redeployment or the deployment of a new version.

Change the network settings

The settings button is in the top right corner, as shown in the following figure.

Settings button on the Network details page

In the settings, you can apply changes to your network. You can change:

  • network name,

  • network ID and channel,

  • authentication and cipher keys,

  • sink role,

  • Start stack after configuration,

  • gateway stack version,

  • host parameters (MQTT credentials),

  • fleet.

Network details window with the network settings

Change the sink name

In the Sink & gateway settings tab, you can see that the sink name is read-only. If you need to change it, follow the next steps:

  1. Go to your network and open its fleet section:

    Go to fleet button on the Network details page
  2. On the fleet page, open the Variables tab and find WM_GW_SINK_ID. This is the variable that holds the sink name value.

    WM_GW_SINK_ID variable on the Variables tab of the fleet
  3. Click it and change the value.

  4. Save your new value.

  5. Check the Wirepas network settings. Your new value should be visible.