Page 1
1pc - 3500mAh Lithium Battery Product Configuration Interfacing with the RAK7204 WisNode Sense Home In order for you to be able to interface with the RAK7204 WisNode Sense Home with your Windows Machine, you need to download the RAK Serial Port Tool here ⚠...
Page 2
Documentation Center Figure 1: RAK7204 WisNode Sense Home to Laptop Connection ⚠ WARNING The pin distance of the battery connector is 2.0mm. Reverse connection or short circuit may damage the device and may cause overheating and combustion of the battery. Therefore, when replacing the battery, it is necessary to strictly confirm whether the positive and negative poles of the connector are correct.
Page 3
Documentation Center Figure 3: Device Manager Look for Ports (COM & LPT) and Find the name Silicon Labs CP210x USB to UART Bridge and take note of the COM Port Number. NOTE: If you didn't find any Port with the name Silicon Labs CP210x USB to UART Bridge, make sure you have downloaded the CP210x USB Drivers in your Machine.
Page 4
All our node products are compatible with it and the process of adding a device to the network is intuitive and straightforward. This section will focus on giving a brief guide on how to connect the RAK7204 to the network console, assuming that there is a Helium Hotspot within range.
Page 5
Documentation Center Figure 6: Helium console Once registered/logged in, you will end up at the home page where you can see your function tree on the left and your DC balance at the tops as well as a number of useful links. Figure 7: Helium console home screen Go to the Devices section in the function tree.
Page 6
Press the Submit button, and you are done. Figure 10: Helium devices Now your RAK7204 is registered and is awaiting activation. For this to happen, you need to import the Dev EUI, App EUI and App Key in the RAK7204 using the RAK Serial Port Tool Open the tool, select the desired port (default baud rate) and open it.
Page 7
Documentation Center Configure your LoRa band and activation mode. This tutorial will be using the EU868 band and OTAA (only option available for now with Helium) with device class A (default one, does not need configuring). Regional band and activation mode setting at+set_config=lora:join_mode:0 at+set_config=lora:region:EU868 Enter the Dev UI...
Page 8
Figure 12: Helium console live device data Configuring the Built-in Server The procedure for connecting the RAK7204 to the Built-in Server is straightforward and includes going through the following steps: 1. Open a browser and access the Web UI of your WisGate Edge Gateway by entering its IP address in the browser address bar.
Page 9
Documentation Center Figure 13: Built-in Server Log in screen Once you have logged in make sure you are in Network Server mode. By default the gateway is working in this mode, so if this is the first time you are configuring it it should already be set. If this is nit the case go to the Network Server menu, the Network Settings sub menu and select the Network Server option in the Mode drop- down menu:...
Page 10
Documentation Center Figure 14: Network Server mode 2. Start the Device registration process by going to the Application sub menu in the LoRa Network section and creating an application. Enter a name in the field, leave the default type and press "Save & Apply" Figure 15: Creating your application...
Page 11
Move to the Payload Formats sub-window and set the payload format to "CayenneLPP" via the drop down menu. This is the format that the RAK7204 uses, thus enabling this functionality will allow you to see the parsed data in the Application Server. Finally enable the "Only forward the parsed data object" functionality, press the "Save &...
Page 12
Now you are in the "Devices" section and you can add a device by entering its Device EUI, which you can find on a sticker on the back of the RAK7204. Press the "Add" button to proceed. Figure 19: Adding a device In the configuration screen enter a name for your device and leave the rest of the parameters with their default values (the Description is optional).
Page 13
Your Device is now added to the Built-in server and you should see it in the "Devices" section. Figure 21: Devices section Next you need to import the same configuration in the RAK7204. Configuring the RAK7204 Start by connecting to your RAK7204 as described in the Product Configuration section of the Quick Start Guide.
Page 14
, update using this procedure. Follow the steps in order to update the RAK7204 configuration and connect it to the Built-in Server 1. Import the Device EUI (from the label on the back), Application EUI and Application Key (you should have noted them down as instructed in the previous section), by executing the following commands in order (replace the "xxxx"...
Page 15
Documentation Center Figure 23: Importing EUIs and Key 2. Set the activation parameters (LoRa Region, Device Class, Activation Mode). This example will use the EU868 regional band, class A, OTAA activation mode. LoRa Region at+set_config=lora:region:EU868 Device Class at+set_config=lora:class:0 Activation Mode at+set_config=lora:join_mode:0 After executing the last command the node will automatically start the join procedure.
Page 16
Documentation Center Figure 24: Activation parameters Upon successful registration the following response will be shown in the Serial Tool. Figure 25: Successful Device Join If you check the Devices Section and the Live Device Data in the Devices section you should see the device being online for some time and also some packets, in this case the Join request and an uplink packet where the data is visible in a human readable format (as we chose the Cayenne payload format)
Page 17
At The Things Conference 2021, it was announced that The Things Network is upgrading to The Things Stack v3. In this section, it will be shown how to connect RAK7204 WisNode Sense Home to The Things Stack. First, log in to the TTNv3. To do so, head to the TTNv3 site .
Figure 29: Console Page after successful login NOTE: To connect RAK7204 WisNode Sense Home to TTNv3, you should already have connected a gateway in range to TTNv2 or TTNv3, or you have to be sure that you are in the range of a public gateway.
Documentation Center 1. If you do not have created applications yet, to create an application, choose Create an application. If you have created applications before, navigate through Go to applications > + Add application. Figure 30: Create an application page 2.
Page 20
2. Below the Register end device heading, you can find two options for registering a device. Choose Manually. For Activation mode, choose Over the air activation (OTAA) For the LoRaWAN version, choose MAC V1.0.2 (RAK7204 is LoRaWAN 1.0.2 fully compliant). Figure 33: Registering the device in OTAA mode...
Page 21
4. Fill in the Basic settings for the device: End device ID - This is the unique identifier for your RAK7204 WisNode Sense Home in your application. You need to enter this manually. The End device ID must contain only lowercase letters, numbers, and dashes (-).
Page 22
Documentation Center End device name (optional) - A unique, human-readable identifier for your device. You make it up, so be creative. Device IDs cannot be used by multiple devices within the same application. End device description (optional) - Optional end device description; can also be used to save notes about the end device.
Page 23
Documentation Center NOTE: For this example, these settings will be left as default. 8. Click Join settings. Figure 38: Join settings for OTAA mode 9. Fill in the Application key (AppKey) to secure communication between the end device and the application. The AppKey can be generated automatically by clicking the Generate button next to the AppKey field.
Page 24
Application Key from there. Figure 41: OTAA device parameters 2. Using the RAK Serial Port Tool, set the join mode, device class, and your LoRaWAN region to your correct frequency band, with the following set of AT commands:...
Page 25
Remember to replace the frequency band with the one for your LoRaWAN region. Check first your frequency plan Figure 42: Setting up the RAK7204 WisNode Sense Home operation mode NOTE: The following tutorial is based on using the EU868 frequency band.
Page 26
Figure 43: Setting up the RAK7204 WisNode Sense Home OTAA parameters 4. Finally, execute the join command: at+join Figure 44: Join command If you get a response in the Live data feed in The Things Stack, it means your RAK7204 is successfully connected!
Page 27
You can use RAK7204 WisNode Sense Home to connect with ChirpStack according to the following steps: NOTE: In this section, it is assumed that you are using RAK Gateway and its built-in ChirpStack or RAK cloud testing ChirpStack. It is also assumed that a Gateway with the ChirpStack has been configured successfully.
Page 28
Documentation Center Figure 46: ChirpStack Applications 3. Fill up the necessary information then Click "CREATE APPLICATION”. Figure 47: Creating the Application 4. Click the new item name “RAKwireless_Test_Application”:...
Page 29
Documentation Center Figure 48: Applications page in ChirpStack Figure 49: RAKwireless Test Application 5. Add a Node device into ChirpStack by clicking the “CREATE” button:...
Page 30
Documentation Center Figure 50: Adding a Node Device 6. Fill them in. You can generate a Device EUI automatically by clicking the Device EUI icon, or you can write the correct Device EUI in the edit box. Figure 51: Filling the Device Parameters NOTE: If you want to join in OTAA mode, select “DeviceProfile_OTAA”...
Page 31
Figure 53: Application Key Generation 3. Click "SET DEVICE KEYS” button. Now, you’ve completed the configuration on ChirpStack. The Device EUI which was set in the previous section to your RAK7204 WisNode Sense Home as "dev_eui" is the same in the image highlighted below.
Page 32
Documentation Center Figure 54: Device EUI Code Same with the Application Key, which was set in the previous section as "app_key" is the same with the image highlighted. Figure 55: Application Key LoRaWAN...
Page 33
ChirpStack. 4. Next, let’s configure RAK7204 WisNode Sense Home by using AT commands. To do this, connect your RAK7204 WisNode Sense Home to a PC, power it on and open RAK Serial Port Tool on your computer. at+version Figure 56: RAK Serial Port Tool Now, let us join our RAK7204 WisNode Sense Home using the OTAA activation mode.
Page 34
Documentation Center Figure 57: Setting of LoRaWAN mode and class 6. Type the following AT command to set the: Frequency/Region, Device EUI, Application EUI and Application Key. Remember to replace the "XXXX" with the corresponding parameter value for your particular case: at+set_config=lora:region:XXXX at+set_config=lora:dev_eui:XXXX at+set_config=lora:app_eui:XXXX...
Page 35
Documentation Center Figure 58: Setting of Frequency and Device EUI Figure 59: Setting of Application EUI and Key 7. Then, join in OTAA mode. at+join...
Page 36
8. You can view the "JoinRequest" and "JoinAccept" on ChirpStack page: Figure 61: Join Request of the Device in the ChirpStack 9. Let’s try sending data from our RAK7204 WisNode Sense Home to the ChirpStack by typing the command below in the serial port.
Page 37
Documentation Center Figure 62: Sending Data to ChirpStack You can see the message on ChirpStack page: Figure 63: Message Received in ChirpStack ABP Mode 1. If you select “Device Profile ABP” or “DeviceProfile_ABP_CN470”, it means you want to join ChirpStack in ABP mode.
Page 38
3. Next, let’s use these parameters to set WisNode LoRa by using AT command. Let's join in ABP mode and set EU868 frequency as an example. 4. If the join mode is not in ABP, just set the LoRa join mode to ABP and LoRa class to Class A by typing the following commands in RAK Serial Port Tool...
Page 39
Documentation Center Figure 66: Setting of LoRaWAN Mode and Class 5. Type the following AT command to set your respective: Frequency/Region, Device Address, Network Session Key and App Session Key. Figure 67: Setting of Frequency and Device Address...
Page 40
Documentation Center Figure 68: Setting of Device EUI and Network Session Key 6. Then, join in ABP mode. Figure 69: Joining of ABP Now, try sending data from our WisNode LoRa to the Chirpstack...
Page 41
Home In the previous section, we have successfully sent some raw data from our RAK7204 WisNode Sense Home to The Things Network, but the problem is that you can't really see the actual sensor data from the payload. In this section , we will solve that and understand what each payload means.
Documentation Center Figure 72: Received Raw Data in TTN Figure 73: Actual Data sent to Cayenne For this example, the payload is : 08 02 01 63 07 68 4B 06 73 25 9E 02 67 01 15 04 02 22 72 04 02 22 72 Now lets analyze each data , which is in Hexadecimal Format.
Documentation Center 3. Pressure Data Example Data: 06 73 25 9E Parameter Hex Data Decimal Equivalent Multiplier True Value Data flag 06 73 Pressure 25 9E 9630 0.1 hPa Unsigned MSB 963.0 hPa 4. Temperature Data Example Data: 02 67 01 15 Parameter Hex Data Decimal Equivalent...
Page 44
Documentation Center Figure 75: Github Page for the Decoding Function 2. From your TTN console, go to application page and click the "Payload Formats" tab as shown in the image below. Figure 76: Payload Format at TTN Application Page 3. Next, select "Payload Format" as "Custom". Then, from the decoder tab, copy and paste the decoder function from step 1.
Page 45
Documentation Center 08 02 01 63 07 68 4B 06 73 25 9E 02 67 01 15 04 02 22 72 04 02 22 72 Figure 78: Testing Payload Data 2. Then, click "Test" and it will generate a code with the decoded data as shown in the image above. Testing in Real System in TTN After gateway and node go online, click the uplink data record from the application data tab to check the decode status.
Page 46
Documentation Center Figure 79: Uplink Decoded Data Decoding Sensor Data in ChirpStack Input Decoding Function in ChirpStack 1. To start with, download the decoding function through this link Click me to view the code 2. From to your ChirpStack, go to application page and click the "APPLICATION CONFIGURATION" tab as shown in the image below.
Page 47
Documentation Center Figure 81: Decoded Function in Chirpstack 4. Then, click ‘UPDATE APPLICATION’ button to save decoding function. Testing in Real System in ChirpStack After gateway and node go online, click the uplink data record from the application data at "LIVE DEVICE DATA" tab to check the decode status.
Page 48
Documentation Center Lora® P2P Mode The setup process for the RAK7204 WisNode Sense Home in LoRaP2P Mode is just the same with the process with the RAK811 Wisnode. These are the steps that you need to follow for this mode: 1.
Page 49
Documentation Center Figure 84: LoRaP2P Configuration OK! Try to send a message from RAK7204 WisNode Sense Home - 2 (the right one) to RAK7204 WisNode Sense Home - 1 (the left one): at+send=lorap2p:1234567890 Figure 85: Test Message Sent Success! You can send more messages:...
Page 50
You can use RAK7204 WisNode Sense Home LoRaP2P mode according to it. ADR and DR You can open the ADR feature of RAK7204 WisNode Sense Home by using the following AT command: at+set_config=lora:adr:1 or you can close the ADR feature of RAK7204 WisNode Sense Home by using this AT command:...
Page 51
Usually you don't need to burn the bootloader since there is a bootloader already in RAK7204 WisNode Sense Home from V3.0.0.0 firmware and so on. If the firmware of your RAK7204 WisNode Sense Home is V3.0.0.0 or a newer one, Skip this section.
Page 52
5. Set the Baud Rate to 115200, and the Parity to Even as seen in the figure above then Press Connect. If you didn't properly set your RAK7204 WisNode Sense Home to work in BOOT Mode, you will see the...
Page 53
Documentation Center Figure 91: Errors Occurred During Connecting If this happens, Close the STM32CubeProgrammer and go back to the section above and set your RAK7204 WisNode Sense Home to work in Boot Mode again. If all works well, You will then see the following log:...
Page 54
Documentation Center 7. In the STM32CubeProgrammer, Click the "Erase Chip" button to erase all the data on RAK7204 WisNode Sense Home: Figure 93: Erasing the Data in the Chip 8. Click "Open File" and select the correct Bootloader file that you have just downloaded.
Page 55
Figure 96: Successfully Burned the Bootloader to the device 11. “Disconnect” and close the “STM32CubeProgrammer” tool. WARNING ⚠ Disconnect your RAK7204 WisNode Sense Home in your Windows PC and do not forget to remove the Jumper on the Boot Line Pins to work in Normal Mode.
Page 56
Burning the Bootloader section, follow the steps below Make sure you have set your RAK7204 WisNode Sense Home to work in boot mode. If you have just burned the bootloader according to the previous section, it works in boot mode now.
Page 57
Select the application firmware file of the module with the suffix ". bin". Figure 99: Select firmware Click the "upgrade" button to upgrade the device. After the upgrade is complete, the RAK7204 is now ready to work with the new firmware.
Page 58
Testing the Installed Firmware In order for you to check if you have successfully installed the firmware on your RAK7204 WisNode Sense Home, open the Serial Port tool again. Press the "Reset button" or type the command below. If everything works perfectly,...
Page 59
Documentation Center Figure 102: Restarting Your Device This information means that you have uploaded the Firmware successfully! Last Updated: 7/29/2022, 10:17:19 PM...
Need help?
Do you have a question about the RAK7204 and is the answer not in the manual?
Questions and answers