Alternatively, since preloaded firmware reads the
DevEUI
and
AppEUI
parameters of the module and saves them
to the internal data memory of the
board), the user can extract both parameters by reading the data memory using the STM32 ST-LINK Utility
(
) or the STM32CubeProgrammer (
Follow these steps to extract
DevEUI
and
AppEUI
using the STM32 ST-LINK Utility:
1.
Download STM32 ST-LINK Utility (
) from STMicroelectronics web site and install it
2.
Nucleo board with the personal computer by means of the USB
3.
Open a Windows
®
Command
prompt and set the path for the STM32 ST-LINK Utility:
SET PATH=%PATH%;C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK
Utility\ST-LINK Utility
4.
Read
DEvUI
and
AppEui
using STM32 ST-LINK Utility CLI command:
–
For
DevEUI
:
ST-LINK_CLI.exe -c swd ur -r8 0x08080000 0x08
–
For
AppEUI
:
ST-LINK_CLI.exe -c swd ur -r8 0x08080008 0x08
The addresses in the CLI commands are for Data Memory Bank 1 of the
Note:
The STM32 ST-LINK Utility (
) GUI can also be used to read the data memory of the NUCLEO-
L073RZ.
A similar process is possible using the STM32CubeProgrammer (
). Refer to
STM32CubeProgrammer documentation on
.
5.3
Reconfiguring the sensor device using the AT_Master project
Edit firmware to change join mode, frequency band, device IDs, and keys. More parameters are reconfigurable.
The following examples show functions used to set these parameters in user firmware.
In file
main.c
:
#define JOIN_MODE OTAA_JOIN_MODE /*ABP_JOIN_MODE*/ /*LoRaWan join method*/
In file
lora_driver.c
:
•
Lora_SetDeviceBand(uint8_t DeviceBand)
→ Sets the band plan
•
LoRa_SetDeviceID(uint8_t *PtrDeviceID)
→ Sets the device ID (DevEUI)
•
LoRa_SetAppID(uint8_t *PtrAppID)
→ Sets the application identifier (AppEUI)
•
LoRa_SetDeviceAddress(uint32_t DeviceAddr)
→ Sets the device address (DevAddr)
•
LoRa_SetKey(ATCmd_t KeyType, uint8_t *PtrKey)
→ Sets the key configuration (APPKEY,
NWKSKE, APPSKEY)
•
Lora_SetWDT(0)
→ triggers a module reset so that the new settings will take effect
The corresponding
Get
functions are also available.
Alternatively, it is possible to reconfigure the RHF0M003-LF20 module directly via its serial port by sending AT
commands from the PC. Refer to
Set additional options in the
hw_conf.h
file in folder
AT_Master
:
•
Low-power mode: enables/disables the low-power mode
•
Sensor-enable switch: enables reading the data from the sensors in the LRWAN_NS1 expansion board
AT command debug printf messages can be sent via ST-LINK Virtual COM port by:
•
enabling the definition of CMD_DEBUG in the toolchain preprocessor symbols settings,
•
or adding the line
#define CMD_DEBUG
in the user file (e.g. main.c).
UM2587
Reconfiguring the sensor device using the AT_Master project
UM2587
-
Rev 3
page 28/55