Skip to content

Latest commit

 

History

History
347 lines (201 loc) · 19.6 KB

WisMesh-Basic-Device-Setup-Guide.md

File metadata and controls

347 lines (201 loc) · 19.6 KB
RAKWireless Meshtastic RAKstar

WisMesh Basic Device Setup Guide

This guide goes step by step through the setup of a WisMesh device based on the RAKwireless RAK4631 (nRF52840), RAK11200 (ESP32) or RAK11310 (RP2040) module.

⚠️ The Meshtastic Mobile App used is the Android version. The steps will be similar when using the iOS version of the application, however the UI will be looking different.

This guide is for the basic device setup and is divided into three sections:

  1. General setup of a device with the RAK4631 (nRF52840) module and the the RAK11200 (ESP32) module with the Meshtastic Mobile App over BLE
  2. WiFi connection setup of a device with the RAK11200 (ESP32) module with the Meshtastic Mobile App over BLE and WiFi
  3. General setup of a device with the RAK11310 (RP2040) with the Meshtastic Web Client

It covers the setup of the device to send and receive messages over the Meshtastic Network and the setup of the location acquisition module (if available).

⚠️ A detailed extended setup guide for Meshtastic Sensors, is in the WisMesh Sensor Node Setup guide, which shows additional steps required to forward sensor data to a MQTT broker and visualize them in the Cloud. The WisMesh-Sensor-Node-Setup goes through the steps to enable sensor data transmission for devices with additional sensors, like temperature, humidity, air quality and other sensors.

⚠️ A detailed extended setup guide how to setup a Meshtastic device as gateway to a MQTT broker is in the WisMesh Gateway Setup Guide guide, which covers the setup of a Ethernet or WiFi connection to a MQTT broker to forward sensor data, device location and other information to the Cloud.


Setup a WisMesh device with RAK4631 or RAK11200 over BLE

Connect the device to a mobile phone over BLE

⚠️ The Meshtastic Mobile App uses BLE to communicate with the WisMesh device. To be able to use the app, your mobile phone must support BLE communication.


(1) Install the Meshtastic Mobile App from Google Play Store or Apple App Store.

⚠️ For Android devices other options to install the application are available. Details are shown in the Meshtastic Software documentation.

⚠️ After installation, on the first start of the application it will ask for multiple permissions.
Make sure to allow all requested permissions, otherwise the application will not be able to communicate with the WisMesh device


(2) Connect a WisMesh device to the mobile applicaiton

  1. Make sure that BLE is enabled on the mobile phone

  2. In the Meshtastic app, use the (+) button on the lower right side to start connecting to a device.

Start to add a device

  1. The device will now show available BLE devices in a list: There might be multiple entries listed, all of them are devices with the Meshtastic firmware.

BLE device list

If your device has a display (like the WisMesh B1), you can see its name in the display.

Device name in display

Select the device you want to add. It will ask for a Bluetooth pairing PIN.

Enter BLE PIN

If your device has a display (like the WisMesh B1), you can see the PIN in the display.

BLE PIN in display

If your device doesn't have a display, try the PIN 123456.

⚠️ If 123456 doesn't work as PIN, you will have to connect to the device over USB, and use a Serial Terminal application to check the debug output of the device. The PIN number required for the BLE connection will be shown in the debug output.

The device will now show up in the device list of the mobile app.

Device added to application


Setup the connection parameters of the device

Setup the Meshtastic Region

The first thing to setup is the Meshtastic Region. This is done in the Region selector on the right side.

Setup region

On a new device, it will show UNSET. On the drop-down selector you have to choose the correct Meshtastic region for your country.

Region list

⚠️ It is necessary to select the correct Meshtastic Region, otherwise the WisMesh device will not be able to connect to other Meshtastic nodes! The region defines the basic LoRa frequency range the device will use to communicate.

If you are unsure about the correct region for your country, you can find a list in the Meshtastic documentation => Region


Open the Radio Configuration

To continue with the setup, we have to open the Radio Configuration.
To open the Radio Configuration click on the three dots on the top right side. A menu will open, showing different options, including the Radio Configuration.

Go to Radio Configuration

In the next steps, we will check the (1) Channels settings, the (2) LoRa settings, enable the (3) Location tracking and correct the (4) Display setting if needed.

Next steps in the setup


Setup the communication channel

The default primary channel for communication is preset in the device to LONGFAST. However, if you do not want to share your communication with all other Meshtastic devices, you can change it in the Channels setting and define your own communication channel.

⚠️ For most users, the default channel setting will work.

As an example, here is the setup for a "private" channel, that the devices in the Meshtastic Sensor Network are using.

In the Channels settings, click on the default channel LONGFAST. This will open a new window, where we can define a new channel name and assign our own PSK for the encryption.

Define a custom channel

Any similarity of the channel name with the writer of this document is coincidence

⚠️ All devices in this "private" device group have to use the same channel name AND the same PSK to be able to communicate!


Setup the LoRa configuration

After selecting the Meshtastic Region, the LoRa communication is preset to an default for this specific region.

⚠️ For most users, the default LoRa setting will work.

Using again the "private" Meshtastic network that the devices in the Meshtastic Sensor Network are using, the default settings for Modem preset and Frequency Slot are changed from the defaults LONG_FAST and 3 to SHORT_FAST and 2 to match with the other devices.

Define custom LoRa settings

⚠️ All devices in this "private" device group have to use the same Modem preset, LoRa frequency offset and the same Frequency Slot to be able to communicate!

Advanced user settings
Another setting in the LoRa Config that will be important if the devices messages and sensor data should be shared over a MQTT broker to the Cloud, is at the very end of the screen.
Scrolling down, it shows two settings related to MQTT.

MQTT settings

Enabling Ignore MQTT will ignore messages that are received from a MQTT broker.
Enabling OK to MQTT MUST be set, if the device's data should be sent to a MQTT broker. This is an important setting if e.g. sensor data or location data are shared with the Cloud for further processing.


Setup the location tracking

If the device is equipped with a GNSS location module, it can send the devices location information over the Meshtastic Network.
For devices that do not have such a module, a fixed location can be setup.

The location module settings are in the Position tab of the Radio Configuration.

Location settings

For devices with a GNSS module the default settings will work. The type of module is automatically detected by the Meshtastic firmware.
For devices without a GNSS module, it is possible to set a fixed position. This can help, e.g. in case a coverage map is build.

Check the display settings

If there are artefacts visible in the OLED screen, it can be related to a wrong display setup.

Location settings

In this case go to the Display settings in the Radio Configuration and select a different OLED driver. In the Override OLED auto-detect try a different display model.

Location settings

For the WisMesh Pocket and WisMesh B1, the OLED_SSD1306 is the best selection.



Setup the WiFi connection of the RAK11200

⚠️ Once the WiFi connection is established, and the RAK11200 is connected to the same WiFi network as the mobile phone, the device will show up with it's WiFi connection in the mobile app!


Setup the WiFi credentials in the Radio Configuration

Follow the steps of Part 1 to connect the RAK11200 to the Meshtastic Mobile App.

Goto to the Radio Configuration.
To open the Radio Configuration click on the three dots on the top right side. A menu will open, showing different options, including the Radio Configuration.

Go to Radio Configuration

In the different options showing in the Radio Configuration choose Network

WiFi Network settings

The Network Config is for both WiFi and a wired connection through Ethernet. Enable WiFi and keep Ethernet disabled.

Then enter the WiFi SSID that should be used and the WiFi PSK for this WiFi Network. Optional (if available), you can scan a QR code with the WiFi credentials.

Go to Radio Configuration

⚠️ The settings for the NTP server (Network Time Provider) are optional. You can use the default meshtastic.pool.ntp.org or choose one that works better for your country.

Once the Meshtastic node is connected to the WiFi network, the BLE connection to the Meshtastic Mobile App is no longer available.

⚠️ WARNING

If you configure the device for a WiFi network that you cannot access from your phone, e.g. an isolated guest access point on your router, you cannot access the device anymore. The only way to recover the device is to do a factory reset by reflashing the Meshtastic firmware


Connect to the device via WiFi

Connect your phone to the same WiFi network that is setup in the Network Config of the device.
The device will show up in the device list with its IP address now.

Device connected through WiFi

If the device is not showing in the list, you can try to obtain the IP address of the device

  • from the USB log output
  • with a network scanner application

Once you have the IP address, you can enter it in the IP Address: field and try to connect.

⚠️ If the device is not showing up with its IP address and the manual entry of the IP address does not work either you might have selected a WiFi network that you cannot access from your phone.
Connect the phone to the same WiFi network and check if it is listed.
If this doesn't work as well, you might need to reset the device by doing a factory reset.



Setup a WisMesh device with RAK11310 through the Web Client

The Raspberry RP2040 MCU on the RAK11310 does not have WiFi nor BLE connectivity. The only way to setup the device is through the Web Client.


Connect the device over USB to your computer

It is not easy to determine the USB port the RAK11310 will use. As best practice disconnect all other devices that would show as USB port on the computer.


Connect the device to the Web Client

⚠️ The Web Client using Web Serial API is only supported by a few browser. You can find the list of supported browsers in the Meshtastic documentation for the Web Client.

We are using the Chrome browser and the hosted version of the Web Client in the setup of the RAK11310 Meshtastic node.

⚠️ The Web Client is not always updated to match with the latest Meshtastic firmware. E.g. in the Web Client used in this guide, the new Regions for the Philippines are missing. In case some settings are not available, you have to use the Python CLI to change these settings.


Open the Web Client

In the Chrome browser, open https://client.meshtastic.org/ to start the Web Client. In the start screen it will show that no devices are connected.

Web Client starting

Click on New Connection to setup the USB connection to the RAK11310. In the new window, select Serial as connection method.
Depending on the connected devices, you will see a list of devices. Select the device that is the RAK11310.

⚠️ It is not easy to determine the USB port the RAK11310 will use. As best practice disconnect all other devices that would show as USB port on the computer.

Web Client starting

If the correct USB port is selected, the Web Client screen will show some first information about the device like

  • Device name
  • Battery status
  • Meshtastic firmware version

Web Client starting

Click on Config to start with the configuration of the device.


Set the LoRa configuration

Setup the Meshtastic Region

The first thing to setup is the Meshtastic Region. This is done in the LoRa tab in the Web Client.

Setup region

On a new device, it will show UNSET. On the drop-down selector you have to choose the correct Meshtastic region for your country.

⚠️ It is necessary to select the correct Meshtastic Region, otherwise the WisMesh device will not be able to connect to other Meshtastic nodes! The region defines the basic LoRa frequency range the device will use to communicate.

If you are unsure about the correct region for your country, you can find a list in the Meshtastic documentation => Region

⚠️ The Web Client is not always updated to match with the latest Meshtastic firmware. E.g. in the Web Client used in this guide, the new Regions for the Philippines are missing. In case some settings are not available, you have to use the Python CLI to change these settings.


Setup the Frequency Slot and MQTT

In the same tab, is the Frequency Slot selection.

⚠️ For most users, the default Frequency Slot setting will work.

And below is the control for the MQTT settings.

Setup Frequency Slot

Advanced user settings
If the devices messages and sensor data should be shared over a MQTT broker to the Cloud, it is important to enable OK to MQTT.

Enabling Ignore MQTT will ignore messages that are received from a MQTT broker.
Enabling OK to MQTT MUST be set, if the device's data should be sent to a MQTT broker. This is an important setting if e.g. sensor data or location data are shared with the Cloud for further processing.


Setup the Modem Preset

After selecting the Meshtastic Region, the LoRa communication is preset to an default for this specific region.

⚠️ For most users, the default LoRa setting will work.

The default setting can be changed under Waveform Settings in the Modem Preset

Setup LoRa Configuration


Set the communication channel

The communication channel settings are in the Channels. The default primary channel for communication is preset in the device to LONGFAST. However, if you do not want to share your communication with all other Meshtastic devices, you can change it in the Name setting and define your own communication channel.

⚠️ For most users, the default channel setting will work.

Setup region

Advanced user settings
If the devices messages and sensor data should be shared over a MQTT broker to the Cloud, it is important to check Uplink Enable.



Appendix Use Meshtastic Python CLI to change settings

⚠️ The Web Client is not always updated to match with the latest Meshtastic firmware. E.g. in the Web Client used in this guide, the new Regions for the Philippines are missing. In case some settings are not available, the Meshtastic Python CLI can be used to change these settings.

In this tutorial, the RAK11310 has to be set to Meshtastic Region Philippines 915 MHz, which is not (yet) listed in the Web Client.
To change the device settings to use this specific region, the Meshtastic Python CLI is needed.

First the Meshtastic Python CLI has to be installed as shown in the Meshtastic Documentation.

Once the Python CLI is installed, the required region can be setup with

python -m meshtastic --set lora.region 21

Every setting of the RAK11310 can be changed using the Meshtastic Python CLI. You can find a complete guide in the Meshtastic documentation in Using the Meshtastic CLI



Meshtastic® is a registered trademark of Meshtastic LLC