IoT HTTP Web Server on STM32U5
The stock firmware IOT_HTTP_WebServer (1.1.0)
corresponds to the B-U585I-IOT02A demonstration program at st.com/resource/en/compiled_demos/b-u585i-iot02a_demo.zip.
The example runs a web-server on the device displaying the readings from its environmental on-board sensors. The device uses its on-board WiFi module to connect to the specified WLAN SSID, and then its web-server can be accessed remotely from a web-browser. The example source code is available in the STM32Cube Firmware Package for U5 and can be obtained as "IOT_HTTP_WebServer" example from the STM32Cube.
Creating your device
To create your device, do the following:
Create an STM32U5 device with the
IOT_HTTP_WebServer (1.1.0)
stock firmware. If you have any questions, please refer to our STM32U5 quickstart guideOn the Confirm Details screen you can specify the device name and verify your selections. Keep the advanced boot options unchecked and then click CREATE DEVICE.
The device will then be created. It takes a few moments.
Your STM32U5 IoT Discovery Kit is now ready to go!
Running the example
To run the example, we need to join the board to a virtual WiFi network first:
Click Console tab in the device's menu, if it is not open by default. Type SSID from the list (
Arm
in this case) and anything as a password (Arm
in this case).noteThe SSID and password are case-sensitive.
Now the STM32U5 IoT Discovery Kit virtual device is running a sensor web-server.
To access the web-server on the virtual board we need to join its LAN. To do this from a local machine follow the steps in Connecting to the VPN and ensure the VPN connection is established.
In the Connect tab find the LAN IP address for the virtual board.
Enter
http://<LAN_IP>
LAN IP in a web-browser on your local machine. For example, if your LAN IP is10.11.0.1
, enterhttp://10.11.0.1
in your web browser. Observe the ST web page as below:On the web-server go to Temperature menu and click Start button to capture the temperature sensor reading. Then on your AVH device page go to Sensors tab - Environmental and change the value for the temperature sensor from default 25 degrees. On the web-server page you can see the changes captured.
Next steps
For next steps see STM32U5 IoT Discovery Kit overview page with references to more usage examples.