03. STM32 Discovery Wi-Fi Initial Setup
Introduction
Hereinafter, "STM32 Discovery Kit (B-L4S5I-IOT01A)" is called "device".
Before beginning the initial setup, please complete the following:
- Refer to the Initial Installation and ensure that the NEQTO Engine is installed on the device.
Before beginning the initial setup, please review the supported communication specifications:
Wi-Fi authentication method supports only WPA/WPA2-Persoanl
.
Initial Setup
To perform the initial setup, follow the steps below:
Prepare a Windows 10 PC with ST-LINK/V2-1 USB driver and TeraTerm (terminal software) installed.
Start the module in User Console mode.
While pressing the User button on the device, connect the device and PC via USB.
Use the USB cable for communication.
The device's red and blue system LEDs will turn on at the same time.
If the two LEDs do not turn on, disconnect the USB from the PC and repeat from step 2.
Open the device manager on the PC and identify the COM port number that the device is connected to.
Start TeraTerm and open the COM port.
Set the serial port and terminal settings as shown below.
The User Console mode will start up, and a prompt will appear when the enter key is pressed.
If no prompt appears, disconnect the USB from the PC and repeat from step 2.
> ↵
> ↵
>
Configure the communication settings for the device.
Set the required configurations using the commands below.
The set value will be immediately saved in the nonvolatile memory after the command is input.List of communication setting commands
Command Content Note wifi set ssid <SSID> Sets the SSID of the Wi-Fi connection point.
32 character limit. (ASCII characters only)
If <SSID> is omitted, the setting value will be blank.
Caution: If there are two or more spaces in a row, one space is used.wifi set pass <PASS> Sets the password to connect to the Wi-Fi.
A valid password must be 8-63 characters.
If <PASS> is omitted, the setting value will be blank.wifi set cc <Country Code> Set the two-character country code of the country where the Wi-Fi will be used. (required)
For country codes, see "6. Appendix A" here.
UNITED_STATES:'US'
JAPAN:'JP'
wifi get Gets the Wi-Fi connection setting information (SSID, Password, Country code).
If a setting value is blank, nothing is set.The following are example command inputs:
> wifi set ssid AP-TEST-g↵
OK
> wifi set pass 1234567890Abc↵
OK
> wifi set cc US↵
OK
> wifi get↵
SSID : AP-TEST-g
PASSWORD : ********
Country : US
>
To connect to the NEQTO service for the first time, please proceed to Challenge Registration.
If challenge registration has already been completed, enter the
start
command to launch the NEQTO service.
Note that node registration must be completed on the NEQTO Console before entering thestart
command.Command Content Note start Establish a communication connection and launch the NEQTO service. > start↵
OK
> [system][info]Certification Complete(00.00.00)
[system][info]Checking Script...
[system][info]Ready
Thu Apr 08 2021 02:31:03 GMT+00:00+766ms : Hello World!!! 0
Thu Apr 08 2021 02:31:04 GMT+00:00+766ms : Hello World!!! 1
Thu Apr 08 2021 02:31:05 GMT+00:00+766ms : Hello World!!! 2
Thu Apr 08 2021 02:31:06 GMT+00:00+766ms : Hello World!!! 3
Thu Apr 08 2021 02:31:07 GMT+00:00+766ms : Hello World!!! 4
Thu Apr 08 2021 02:31:08 GMT+00:00+766ms : Hello World!!! 5
Thu Apr 08 2021 02:31:09 GMT+00:00+766ms : Hello World!!! 6
Thu Apr 08 2021 02:31:10 GMT+00:00+766ms : Hello World!!! 7
Thu Apr 08 2021 02:31:11 GMT+00:00+766ms : Hello World!!! 8
Thu Apr 08 2021 02:31:12 GMT+00:00+766ms : Hello World!!! 9
Thu Apr 08 2021 02:31:13 GMT+00:00+766ms : Hello World!!! 10
Challenge Registration
If connecting an STM32 Discovery device to the NEQTO service for the first time, it is necessary to perform the procedure to register a serial number for STM32 Discovery issued by the NEQTO Console to the device. This is called "challenge registration".
Due to challenge registration requiring a communication connection to the NEQTO Console, ensure that the communication settings are completed in advance.
The procedure is as follows:
Complete the STM32 Discovery device registration and node registration on the NEQTO Console.
View the details of the STM32 Discovery device registered in step 1. and note the challenge code.
In User Console mode, enter the
chal
command. Specify the challenge code confirmed in step 2.Command Content Note chal <Challenge Code> Schedules the challenge registration.
Specify the 12 character challenge code.
This command must be entered before entering thestart
command.User Console Mode!
Enter challenge-code!
> chal 123456789Abc↵
OK
>
Enter the
start
command to initiate the challenge registration.If the challenge registration is successful, the NEQTO service will continue to be launched.
User Console Mode!
Enter challenge-code!
> chal 123456789Abc↵
OK
> start↵
OK
> [system][info]Registration Complete(00.00.00)
[system][info]Checking Script...
[system][info]Ready
Thu Apr 08 2021 02:31:03 GMT+00:00+766ms : Hello World!!! 0
Thu Apr 08 2021 02:31:04 GMT+00:00+766ms : Hello World!!! 1
Thu Apr 08 2021 02:31:05 GMT+00:00+766ms : Hello World!!! 2
Thu Apr 08 2021 02:31:06 GMT+00:00+766ms : Hello World!!! 3
Thu Apr 08 2021 02:31:07 GMT+00:00+766ms : Hello World!!! 4
Thu Apr 08 2021 02:31:08 GMT+00:00+766ms : Hello World!!! 5
Thu Apr 08 2021 02:31:09 GMT+00:00+766ms : Hello World!!! 6
Thu Apr 08 2021 02:31:10 GMT+00:00+766ms : Hello World!!! 7
Thu Apr 08 2021 02:31:11 GMT+00:00+766ms : Hello World!!! 8
Thu Apr 08 2021 02:31:12 GMT+00:00+766ms : Hello World!!! 9
Thu Apr 08 2021 02:31:13 GMT+00:00+766ms : Hello World!!! 10
If the message below is displayed, the challenge registration has failed.
Review the settings on the NEQTO Console and retry the challenge registration.User Console Mode!
Enter challenge-code!
> chal 123456789Abc↵
OK
> start↵
OK
> Challenge failed. Check the network configuration and try again.
If the challenge registration is successful, it will not be necessary to perform the challenge registration from the next boot up.
If the device registration has been changed on the NEQTO Console, it will be necessary to re-perform the challenge registration.
Troubleshooting
The operating status of the device can be ascertained from the state of the system LEDs and the display of event messages.
While System LED RED remains on and System LED BLUE flashes continuously, the NEQTO service does not start.
Cannot connect to Wi-Fi.
» Review the Wi-Fi communication settings of the device.
» Verify that the Wi-Fi wireless communication environment is favorable.While System LED RED remains off, System LED BLUE flashes continuously, the NEQTO service does not start.
Cannot connect to NEQTO Console.
» Verify that the Wi-Fi connection point has access to the internet.
» Review the device settings on the NEQTO Console.
» If the issue cannot be resolved, please contact NEQTO support for further assistance.
Appendix
Get Device-specific Information
The following commands may be used to get device-specific information.
Command | Content | Note |
---|---|---|
sr | Gets the serial ID of the device. | Version 01.01.00+ |
v | Gets the firmware version of the device. | |
u | Gets the unique ID of the device. |
MAC Address Acquisition
The following command may be used to get the MAC address of the Wi-Fi module.
Command | Content | Note |
---|---|---|
wifi mac | Gets the Wi-Fi MAC address. It is necessary to setup the Wi-Fi and enter the start command before inputting this command. When not yet acquired, it becomes 00:00:00:00:00:00. |
User Console Mode! > start↵ OK > wifi mac↵ 12:34:56:78:90:ab > |
Antenna Level Indication
The current antenna level may be indicated via the system LED.
Refer to System LED Indications for the LED display pattern.
Command | Content | Note |
---|---|---|
wifi led <on/off> | Sets the antenna level indicator. off: Disabled on: Indicate the antenna level via LED. The default value is off. |
Factory Reset
The following commands may be used to restore the device factory settings.
All communication settings and storage data will be reset.
Note that after factory reset, it will be necessary to start again from challenge registration.
Command | Content | Note |
---|---|---|
frst <uniqueId> | Performs factory reset. For uniqueId , specify the unique ID of the device (which can be obtained using the u command).After executing the command, wait until a response is returned. It takes about 15 seconds. | |
frst <uniqueId> full | Performs a complete factory reset. The storage will be completely erased. For uniqueId , specify the unique ID of the device (which can be obtained using the u command).After executing the command, wait until a response is returned. It takes about 120 seconds. |