Download Print this page

Advertisement

Quick Links

Documentation Center
RAK3172 Module Quick Start Guide
This guide covers the following topics:
RAK3172 as a Stand-Alone Device Using RUI3
RAK3172 as a LoRa/LoRaWAN Modem via AT Command
Connecting to The Things Network (TTN)
Connecting with Chirpstack
LoRa P2P Mode
Prerequisites
What Do You Need?
Before going through the steps in the installation guide of the RAK3172 WisDuo LPWAN Module, make sure to
prepare the necessary items listed below:
Hardware
RAK3172 WisDuo LPWAN Module
Computer
USB to UART TTL adapter
Software
Download and install the
WARNING
If you are using Windows 10.
Do NOT install the Arduino IDE from the Microsoft App Store. Instead, install the original Arduino IDE from
the Arduino official website. The Arduino app from the Microsoft App Store has problems using third-party
Board Support Packages.
Add
RAK3172 as a supported board in Arduino IDE
of Arduino IDE with the JSON URL below.
https://raw.githubusercontent.com/RAKWireless/RAKwireless-Arduino-BSP-Index/main/package_rakwirel
After that, you can then add RAKwireless RUI STM32 Boards via Arduino board manager.
RAK Serial Port Tool
List of Acronyms
Arduino IDE
.
by updating Board Manager URLs in Preferences settings
json

Advertisement

loading

Summary of Contents for RAK 3172 WisDuo LPWAN

  • Page 1 RAK3172 as a supported board in Arduino IDE by updating Board Manager URLs in Preferences settings of Arduino IDE with the JSON URL below. json https://raw.githubusercontent.com/RAKWireless/RAKwireless-Arduino-BSP-Index/main/package_rakwirel After that, you can then add RAKwireless RUI STM32 Boards via Arduino board manager. RAK Serial Port Tool List of Acronyms...
  • Page 2: Product Configuration

    Documentation Center Acronym Definition Device Firmware Upgrade JTAG Joint Test Action Group LoRa Long Range OTAA Over-The-Air-Activation (OTAA) Activation-By-Personalization (ABP) The Things Network DEVEUI Device EUI (Extended Unique Identification) APPEUI Application EUI (Extended Unique Identification) APPKEY Application Key DEVADDR Device Address NWKSKEY Network Session Key APPSKEY...
  • Page 3 Documentation Center ⚠ WARNING Firmware update is done via UART2 pins. If you will connect the module to an external device that will be interfacing with UART2, take extra precautions in your board design to ensure you can still perform FW update to it.
  • Page 4: Software Setup

    Documentation Center Figure 3: IPEX Connector of RAK3172 for LoRa Antenna NOTE Detailed information about the RAK3172 LoRa antenna can be found on the antenna datasheet ⚠ WARNING When using the LoRa transceiver, make sure that an antenna is always connected. Using this transceiver without an antenna can damage the module.
  • Page 5 Documentation Center Figure 4: Arduino preferences 2. To add the RAK3172 to your Arduino Boards list, edit the Additional Board Manager URLs. Click the icon, as shown in Figure 5. Figure 5: Modifying Additional Board Manager URLs 3. Copy the URL below and paste it on the field, as shown in Figure 6. If there are other URLs already there, just add them on the next line.
  • Page 6 Documentation Center Figure 6: Add additional board manager URLs 4. Restart the Arduino IDE. 5. Open the Boards Manager from Tools Menu. Figure 7: Opening Arduino boards manager 6. Write in the search bar, as shown in Figure 8. This will show the available RAKwireless module boards that you can add to your Arduino Board list.
  • Page 7 Documentation Center Figure 8: Installing RAKwireless RUI STM32 Boards Configure RAK3172 on Boards Manager 8. Once the BSP is installed, select Tools > Boards Manager > RAKWireless RUI STM32 Modules > WisDuo RAK3172 Evaluation Board. The RAK3172 Evaluation board uses RAK3172 WisDuo module. Figure 9: Selecting RAK3172 Module RAK3172 COM Port on Device Manager Connect the RAK3172 via UART and check RAK3172 COM Port using Windows Device Manager.
  • Page 8 Documentation Center Figure 10: Device manager ports (COM & LPT) Compile an Example with Arduino LED Breathing 1. After completing the steps on adding your RAK3172 to the Arduino IDE, you can now try to run a simple program to test your setup. You need to add two LEDs to the bare minimum schematic of the RAK3172 module, as shown in Figure 11.
  • Page 9 Documentation Center Figure 12: Select COM port 5. You can see the serial monitor icon and click it to connect COM port. Figure 13: Open Arduino serial monitor 6. If the connection is successful, you can send AT Commands to RAK3172. For example: To check the RUI version, type on the text area, then click on the Send button, as shown in Figure 14.
  • Page 10 Documentation Center Figure 14: Send AT command Figure 15: Arduino serial monitor COM28 7. Open Arduino_Led_Breathing example code.
  • Page 11 Documentation Center Figure 16: Arduino Led Breathing example 8. Click on the Verify icon to check if you have successfully compiled the example code. Figure 17: Verify the example code 9. Click the Upload icon to send the compiled firmware to your RAK3172 module. NOTE: RAK3172 should automatically go to BOOT mode when the firmware is uploaded via Arduino IDE.
  • Page 12 Documentation Center Figure 18: Upload the example code 10. If the upload is successful, you will see the Upgrade Complete message. Figure 19: Device programmed successfully 11. After the Device Programmed is completed, you will see that LEDs are blinking. RAK3172 I/O Pins and Peripherals This section discusses how to use and access RAK3172 pins using RUI3 API.
  • Page 13 Documentation Center Figure 20: Available Peripherals and Digital I/O pins in RAK3172 module How to Use Digital I/O You can use any of the pins below as Digital Pin.
  • Page 14 Documentation Center Pin Name Alternative Pin Usage I2C_SCL PA15 ADC1 ADC2 UART1_TX UART1_RX PB12...
  • Page 15 Documentation Center Figure 21: Available Digital I/O pins in RAK3172 module The pins listed below must not be used. Pin name Pin Usage UART2_TX UART2_RX PA13 SWDIO PA14 SWCLK RAK3172 Internal Use Arduino digitalRead to read the value from a specified Digital I/O pin, either HIGH or LOW. Use Arduino digitalWrite to write a HIGH or a LOW value to a Digital I/O pin.
  • Page 16 Documentation Center void setup() pinMode(PA0, OUTPUT); //Change the P0_04 to any digital pin you want. Also, you can set this to void loop() digitalWrite(PA0,HIGH); //Change the PA0 to any digital pin you want. Also, you can set this to delay(1000); // delay for 1 second digitalWrite(PA0,LOW);...
  • Page 17 Documentation Center #define analogPin PB3 // variable to store the value read void setup() Serial.begin(115200); void loop() analogRead(analogPin); // read the input pin Serial.println(val); // debug value delay(100); How to Use Serial Interfaces UART There are two UART peripherals available on the RAK3172 module. There are also different Serial Operating Modes possible in RUI3, namely...
  • Page 18 Documentation Center void setup() Serial1.begin(115200); // use Serial1 for UART1 and Serial for UART2 // you can designate separate baudrate for each. Serial.begin(115200); void loop() Serial1.println("RAK3172 UART1 TEST!"); Serial.println("RAK3172 UART2 TEST!"); delay(1000); // delay for 1 second There is one I2C peripheral available on RAK3172. I2C Pin Number I2C Pin Name I2C_SCL...
  • Page 19 Documentation Center #include <Wire.h> void setup() Wire.begin(); Serial.begin(115200); while (!Serial); Serial.println("\nI2C Scanner"); void loop() byte error, address; nDevices; Serial.println("Scanning..."); nDevices for(address address < 127; address++ // The i2c_scanner uses the return value of // the Write.endTransmission to see if // a device did acknowledge to the address. Wire.beginTransmission(address);...
  • Page 20 Documentation Center 17:29:15.690 -> Scanning... 17:29:15.738 -> I2C device found at address 0x28 17:29:15.831 -> done 17:29:15.831 -> 17:29:20.686 -> Scanning... 17:29:20.733 -> I2C device found at address 0x28 17:29:20.814 -> done 17:29:20.814 -> If your RUI3 project uses SPI, then PA4 to PA7 pins are reserved for RUI3 SPI interface. NOTE: PA13 and PA14 pins are reserved for SWD debug interface.
  • Page 21 Documentation Center Figure 25: TTNv3 gateway registration and configuration 3. On General Settings, enter the Gateway ID, Gateway EUI, and Gateway Name. This information is available in your LoRaWAN gateway configuration. Select the Gateway Server address according to the region where the LoRaWAN gateway will be installed.
  • Page 22 2. Connect the RAK3172 via UART and check RAK3172 COM Port. See Figure 3. Open the example code under RAK WisBlock RUI examples: File -> Examples -> RAK WisBlock RUI examples -> Example -> LoRaWan_OTAA. Figure 28: OTAA LoRaWAN application example...
  • Page 23 Figure 29: Configuring DEVEUI, APPEUI and APPKEY 3. Depending on the Regional Band you selected, you might need to configure the sub-band of your RAK module to match the gateway and LoRaWAN network server. This is especially important for Regional Bands like US915, AU915 and CN470.
  • Page 24 Documentation Center (!api.lorawan.band.set(OTAA_BAND)) { Serial.printf("LoRaWan OTAA - set band is incorrect! \r\n"); return; uint16_t maskBuff 0x0002; (!api.lorawan.mask.set(&maskBuff)) { Serial.printf("LoRaWan OTAA - set mask is incorrect! \r\n"); return; NOTE: RAK3172 supports the following regions: RAK_REGION_EU433 = 0 RAK_REGION_CN470 = 1 RAK_REGION_RU864 = 2 RAK_REGION_IN865 = 3 RAK_REGION_EU868 = 4 RAK_REGION_US915 = 5...
  • Page 25 Documentation Center NOTE: Make sure you have configured the correct RAK board before uploading the code. See Configure RAK3172 on Boards Manager section. Also, check RAK3172 COM Port on Device Manager section. 4. Open Tools Menu and select a COM port. COM28 is currently used.
  • Page 26 Documentation Center Figure 33: Arduino serial monitor logs 7. Check on the LoRaWAN network TTN console logs if your device has been successfully joined with the join- messages. request join-accept Figure 34: TTN console log The modified project is available below. LoRaWAN_OTAA...
  • Page 27 Documentation Center #define OTAA_PERIOD (20000) /************************************* LoRaWAN band setting: RAK_REGION_EU433 RAK_REGION_CN470 RAK_REGION_RU864 RAK_REGION_IN865 RAK_REGION_EU868 RAK_REGION_US915 RAK_REGION_AU915 RAK_REGION_KR920 RAK_REGION_AS923 *************************************/ #define OTAA_BAND (RAK_REGION_US915) #define OTAA_DEVEUI {0x70, 0xB3, 0xD5, 0x7E, 0xD0, 0x04, 0xF1, 0xC0} #define OTAA_APPEUI {0x70, 0xB3, 0xD5, 0x7E, 0xD0,0x03, 0xAB, 0xA2} #define OTAA_APPKEY {0xB4, 0x85, 0x7E, 0xFE, 0x1C, 0xB5, 0x15, 0xEB, 0x44, 0x61, 0x0D, 0x9B,...
  • Page 28 Documentation Center uint8_t node_app_key[16] OTAA_APPKEY; (!api.lorawan.appeui.set(node_app_eui, 8)) { Serial.printf("LoRaWan OTAA - set application EUI is incorrect! \r\n"); return; (!api.lorawan.appkey.set(node_app_key, 16)) { Serial.printf("LoRaWan OTAA - set application key is incorrect! \r\n"); return; (!api.lorawan.deui.set(node_device_eui, 8)) { Serial.printf("LoRaWan OTAA - set device EUI is incorrect! \r\n");...
  • Page 29 Documentation Center /** Check LoRaWan Status*/ Serial.printf("Duty cycle is %s\r\n", api.lorawan.dcs.get()? "ON" "OFF"); // Check Duty Cyc Serial.printf("Packet is %s\r\n", api.lorawan.cfm.get()? "CONFIRMED" "UNCONFIRMED"); // Ch uint8_t assigned_dev_addr[4] api.lorawan.daddr.get(assigned_dev_addr, 4); Serial.printf("Device Address is %02X%02X%02X%02X\r\n", assigned_dev_addr[0], assigned_dev_addr Serial.printf("Uplink period is %ums\r\n", OTAA_PERIOD); Serial.println("");...
  • Page 30 Serial Port Tool so you can easily send AT commands and view the replies from the console output. The RAK Serial Port Tool commands still uses the RUI V2 AT commands by default. You can modify it to have RUI3 AT commands and then save it.
  • Page 31 Documentation Center commands for the RAK3172. This guide covers the following topics: TheThingsNetwork Guide - How to login, register new accounts and create new applications on TTN. RAK3172 TTN OTAA Guide - How to add OTAA device on TTN and what AT commands to use on RAK3172 OTAA activation.
  • Page 32 Documentation Center Figure 37: Selecting Cluster in TTN V3 You can use the same login credentials on the TTN V2 if you have one. If you have no account yet, you need to create one. 2. To register as a new user to TTN, click on Login with The Things ID then select register on the next page, as shown in Figure 33 and Figure 34.
  • Page 33 Documentation Center Figure 39: Registration of new account 3. You should now be on the step of creating your TTN account. Fill in all the necessary details and activate your account. 4. After creating an account, you should log in on the platform using your username/email and password then click Submit, as shown in Figure 35.
  • Page 34 Documentation Center Figure 41: Authorization to TTN 6. Now that you are logged in to the platform, the next step is to create an application. Click Create an application. Figure 42: Creating TTN application for your LoRaWAN devices 7. To have an application registered, you need to input first the specific details and necessary information about your application then click Create application.
  • Page 35 Documentation Center Figure 43: Details of the TTN application 8. If you had no error during the previous step, you should now be on the application console page. The next step is to add end-devices to your TTN application. LoRaWAN specification enforces that each end-device has to be personalized and activated.
  • Page 36 Documentation Center Figure 45: Manually register device to TTN Figure 46: Device activation configuration 3. Then you need to put a unique End device ID and EUIs (DevEUI and AppEUI), as shown in Figure 42. Check if your module has a DevEUI on the sticker or QR that you can scan then use this as the device unique DevEUI. Optionally, you can add a more descriptive End device name and End device description about your device.
  • Page 37 It is advisable to use a meaningful end-device ID, end-device name, and end-device description that will match your device's purpose. The end-device ID is for illustration purposes only. rak-device Figure 47: OTAA Device Information 5. The next step is to set up the Frequency plan, a compatible Regional Parameter version, and the LoRaWAN class supported.
  • Page 38 Documentation Center Figure 49: OTAA AppKey generation and device registration You should now be able to see the device on the TTN console after you fully register your device, as shown in Figure 44. NOTE: The AppEUI, DevEUI, and AppKey are the parameters that you will need to activate your LoRaWAN end-device via OTAA.
  • Page 39 (see Figure 30) and open the RAK Serial Port Tool. Select the right COM port and set the baud rate to 115200. It is recommended to start by testing the serial communication and verify that the current configuration is working...
  • Page 40 Documentation Center Figure 51: at+version command response 2. The next step is to configure the OTAA LoRaWAN parameters in RAK3172: LoRa work mode: LoRaWAN LoRaWAN join mode: OTAA LoRaWAN class: Class A LoRaWAN region: EU868 Set the work mode to LoRaWAN. AT+NWM=1 Set the LoRaWAN activation to OTAA.
  • Page 41 Documentation Center NOTE: Depending on the Regional Band you selected, you might need to configure the sub-band of your RAK3172 to match the gateway and LoRaWAN network server. This is especially important for Regional Bands like US915, AU915, and CN470. To configure the masking of channels for the sub-bands, you can use the command that can be AT+MASK...
  • Page 42 Documentation Center Figure 52: Configuring LoRa Parameters 3. After the configuration of the LoRaWAN parameters, the next step is to set up the EUIs and key. You need the use the values from the TTN console. Device EUI: 1133557799224466 Application EUI: 1000000000000009 Application Key: 04FA4E626EF5CF227C969601176275C2 Set the Device EUI.
  • Page 43 Documentation Center Figure 53: Configuring LoRa Parameters 4. After EUI and keys configuration, the device can now join the network and send payloads. AT+JOIN=1:0:10:8 NOTE: command parameters are optional. You can configure the settings for auto-join, reattempt AT+JOIN interval, and the number of join attempts if your application needs it. If not configured, it will use the default parameter values.
  • Page 44 6. Send command format: AT+SEND=<port>:<payload> Figure 54: OTAA Test Sample Data Sent via RAK Serial Port Tool 7. You can see the data sent by the RAK3172 module on the TTN device console Live data section. Also, the Last seen info should be a few seconds or minutes ago.
  • Page 45 Documentation Center Figure 55: OTAA Test Sample Data Sent Viewed in TTN TTN ABP Device Registration 1. To register an ABP device, go to your application console and select the application where you want your device to be added. Then click + Add end device, as shown in Figure 51. Figure 56: Adding ABP Device 2.
  • Page 46 4. After putting all the details, click Network layer settings to proceed to the next step. NOTE: It is advisable to use a meaningful end-device ID, end-device name, and end-device description that will match your device purpose. The end-device ID is for illustration purposes only. rak-device-abp...
  • Page 47 Documentation Center Figure 59: ABP Device Information 5. The next step is to set up the Frequency plan, a compatible Regional Parameter version, and the LoRaWAN class supported. In an ABP device, you also need to generate a Device Address and a NwkSKey (Network Session Key).
  • Page 48 (see Figure 30) and open the RAK Serial Port Tool. Select the right COM port and set the baud rate to 115200. It is recommended to start by testing the serial communication and verify the current configuration is working by...
  • Page 49 Documentation Center will echo the commands you input to the module, which is useful for tracking the commands and troubleshooting. 2. You will receive OK when you input the two commands. After setting , you can now see all the commands you input together with the replies.
  • Page 50 Documentation Center Set the LoRaWAN activation to ABP. AT+NJM=0 Set the LoRaWAN class to Class A. AT+CLASS=A Set the frequency/region to EU868. AT+BAND=4 NOTE: Depending on the Regional Band you selected, you might need to configure the sub-band of your RAK3172 to match the gateway and LoRaWAN network server.
  • Page 51 Documentation Center Code Regional Band EU433 CN470 RU864 IN865 EU868 US915 AU915 KR920 AS923-1 AS923-2 AS923-3 AS923-4 Figure 64: Configuring LoRa Parameters 4. After the configuration of the LoRaWAN parameters, the next step is to set up the device address and session keys.
  • Page 52 Documentation Center Network Session Key: 433C7A924F7F6947778FE821525F183A Set the Device Address. AT+DEVADDR=260BDE80 Set the Application Session Key. AT+APPSKEY=A585903A949C2B2D44B55E99E94CB533 Set the Network Session Key. AT+NWKSKEY=433C7A924F7F6947778FE821525F183A Figure 65: Configuring LoRa Parameters 5. After EUI and keys configuration, the device can now join the network and send some payload. AT+JOIN=1:0:8:0 Join command format: AT+JOIN=w:x:y:z...
  • Page 53 After checking all the things above, try to send LoRaWAN payloads again. Figure 66: ABP Test Sample Data Sent via RAK Serial Port Tool 7. You can see the data sent by the RAK3172 module on the TTN device console Live data section and the Last...
  • Page 54 LoRa gateway. Learn more about ChirpStack NOTE: It is assumed that you are using a RAK Gateway and its built-in ChirpStack. Also, the gateway with the ChirpStack must be configured successfully. For further information, check the RAK documents for more details.
  • Page 55: Create A New Application

    1. In a ChirpStack online gateway, the frequency band of the nodes should be consistent with the frequency band of the gateway in use. Connect the Gateway with Chirpstack 2. The RAK Serial Port Tool provided by RAK 3. RAK3172 module NOTE: The frequency band used in the demonstration is EU868.
  • Page 56 Documentation Center Payload codec: It is the parsing method for selecting load data such as parsing LPP format data. Figure 71: Filling Parameters of an Application Register a New Device 1. Choose the Application created in the previous step, then select the DEVICES tab, as shown in Figure 67 and Figure 68.
  • Page 57 NOTE: Device profiles DeviceProfile_OTAA and DeviceProfile_ABP are only available if you are using the built- in Chirpstack LoRaWAN Server of RAK Gateways. If you have your own Chirpstack installation, you can set up the device profile with LoRaWAN MAC version to make it compatible with RAK3172.
  • Page 58 Documentation Center Figure 76: Generate a New Device EUI Chirpstack OTAA Device Registration 1. If you have selected “DeviceProfile_OTAA”, as shown in Figure 72, then after the device is created, an Application Key must be also created for this device. Figure 77: Chirpstack OTAA Activation 2.
  • Page 59 Computer (see Figure 30) and open the RAK Serial Port Tool. Select the right COM port and set the baud rate to 115200. It is recommended to start by testing the serial communication and verify that the current configuration is working...
  • Page 60 Documentation Center will echo the commands you input to the module, which is useful for tracking the commands and troubleshooting. You will receive when you input the two commands. After setting , you can now see all the commands you input together with the replies. Try again and you should see it on the terminal followed by , as shown in Figure 76.
  • Page 61 Documentation Center Set the LoRaWAN activation to OTAA. AT+NJM=1 Set the LoRaWAN class to Class A. AT+CLASS=A Set the frequency/region to EU868. AT+BAND=4 NOTE: Depending on the Regional Band you selected, you might need to configure the sub-band of your RAK3172 to match the gateway and LoRaWAN network server.
  • Page 62 Documentation Center Code Regional Band EU433 CN470 RU864 IN865 EU868 US915 AU915 KR920 AS923-1 AS923-2 AS923-3 AS923-4 Figure 82: Configuring LoRa Parameters 3. After the configuration of the LoRaWAN parameters, the next step is to set up the DevEUI and AppKey. You need the use the values from the Chirpstack device console.
  • Page 63 Documentation Center NOTE: The Application EUI parameter is not required in the ChirpStack platform; therefore, it is possible to use the same id as the Device EUI. Device EUI: 5E9D1E0857CF25F1 Application EUI: 5E9D1E0857CF25F1 Application Key: F921D50CD7D02EE3C5E6142154F274B2 Set the Device EUI. AT+DEVEUI=5E9D1E0857CF25F1 Set the Application EUI.
  • Page 64 Documentation Center NOTE: command parameters are optional. You can configure the settings for auto-join, reattempt AT+JOIN interval, and the number of join attempts if your application needs it. If not configured, it will use the default parameter values. also share the common functionality of trying to join the network. AT+JOIN AT+JOIN=1 Join command format:...
  • Page 65 Documentation Center Figure 84: OTAA Test Sample Data Sent via RAK Serial Port Tool On the ChirpStack platform, you should see the join and uplink messages in the LORAWAN FRAMES tab, as shown in Figure 80. By convention, messages sent from nodes to gateways are considered as Uplinks while messages sent by gateways to nodes are considered as Downlinks.
  • Page 66 Computer (see Figure 30) and open the RAK Serial Port Tool. Select the right COM port and set the baud rate to 115200. It is recommended to start by testing the serial communication and verify that the current configuration is working...
  • Page 67 Documentation Center will echo the commands you input to the module, which is useful for tracking the commands and troubleshooting. You will receive when you input the two commands. After setting , you can now see all the commands you input together with the replies. Try again and you should see it on the terminal followed by , as shown in Figure 83.
  • Page 68 Documentation Center AT+NJM=0 Set the LoRaWAN class to Class A. AT+CLASS=A Set the frequency/region to EU868. AT+BAND=4 NOTE: Depending on the Regional Band you selected, you might need to configure the sub-band of your RAK3172 to match the gateway and LoRaWAN network server. This is especially important on Regional Bands like US915, AU915, and CN470.
  • Page 69 Documentation Center Code Regional Band EU433 CN470 RU864 IN865 EU868 US915 AU915 KR920 AS923-1 AS923-2 AS923-3 AS923-4 Figure 89: Configuring LoRa Parameters 3. After the configuration of the LoRaWAN parameters, the next step is to set up the device address and session keys.
  • Page 70 Documentation Center Network Session Key: C280CB8D1DF688BC18601A97025C5488 Set the Device Address. AT+DEVADDR=26011AF9 Set the Application Session Key. AT+APPSKEY=4D42EC5CAF97F03D833CDAf5003F69E1 Set the Network Session Key. AT+NWKSKEY=C280CB8D1DF688BC18601A97025C5488 Figure 90: Configuring LoRa Parameters After EUI and keys configuration, the device can now join the network and send some payload. AT+JOIN=1:0:10:8 NOTE: command parameters are optional.
  • Page 71 Send command format: AT+SEND=<port>:<payload> Figure 91: ABP Test Sample Data Sent via RAK Serial Port Tool LoRa P2P Mode This section will show you how to set up and connect two RAK3172 units to work in the LoRa P2P mode. The configuration of the RAK3172 units is done by connecting the two modules to a general-purpose computer using a USB-UART converter.
  • Page 72 Documentation Center will echo the commands you input to the module, which is useful for tracking the commands and troubleshooting. You will receive when you input the two commands. After setting , you can now see all the commands you input together with the replies. Try again and you should see it on the terminal followed by Figure 92: at+version command response...
  • Page 73 Documentation Center Figure 93: P2P Mode NOTE: The device will start automatically if you change modes from LoRaWAN to LoRa P2P and vice-versa. You might need to input the command again to ensure that your succeeding commands on P2P mode echo on the terminal. 2.
  • Page 74 Documentation Center Figure 94: Configuring P2P in both RAK3172 Module 3. To set one module as the receiver (RX), you need to set the value of the P2P receive command. NOTE: LoRa P2P default setting is Transmitter (TX) mode. This consumes lower power compared to Receiver (RX) mode where the radio is always listening for LoRa packets.
  • Page 75: Upgrading The Firmware

    Documentation Center 4. With one module configured as Transmitter (TX) and the other device will be the Receiver (RX), you can now try to send or transmit P2P payload data. AT+PSEND= <payload> NOTE: is returned when setting wrong or malformed value. AT_PARAM_ERROR is returned if the device is still in RX mode and you try to send or reconfigure RX AT_BUSY_ERROR...
  • Page 76: Firmware Upgrade Procedure

    "Select Port" button. NOTE: If your firmware upload always fails, check your current baud rate setting using the command AT+BAUD=? and use that baud rate value in the RAK DFU Tool. You can also check if you selected the right COM port.
  • Page 77 Documentation Center Figure 96: Device Firmware Upgrade Tool 5. Select the application firmware file of the module with the suffix ".bin". Figure 97: Select firmware 6. Click the "Upgrade" button to upgrade the device. After the upgrade is complete, the RAK3172 will be ready to work with the new firmware.
  • Page 78 Documentation Center Figure 98: Firmware upgrading Figure 99: Upgrade successful Arduino Installation Refer to Software section. Last Updated: 9/16/2022, 1:37:35 PM...