Foreword
Under this section demonstrates, the two wrote a program to control the use of MQTT STM32 control
Test preparation (default access my server, instead of their own server, see below explanation)
First, download BootLoader program (please to download)
First BootLoader default is to first attempt to load the user program
Later we divided into two cases:
Download the first man into the APP program and the user does not download a user program into the first APP
The first: the first human APP downloaded into the user program
I. Note: we aim is to burn a corresponding program file to the appropriate location
To avoid Clear BootLoader program, download time according to the following selection
Thus in the case of unknown BootLoader procedure, put the first user device is programmed into the corresponding position
prompt:
APP user program which is executed by pressing the button 3S Distribution Network
But later distribution network server is connected MQTT
Second, adjusting the position of the rocker switch, the STM32 serial communication and Wi-Fi
Three, RST pins are shorted and the STM32 PB2 Wi-Fi module (internal hardware reset pin that uses Wi-Fi)
Fourth, the use of this section to install APP
Note: This section is actually in front of the APP
V. binding distribution network
5.1 open the phone APP, click on the upper right corner of the menu "Add Device", enter the home router password manually. (Router to automatically obtain the name, does not require users to fill out)
5.2, press PB5 about 4S, waiting lamp flash, release PB5, Wi-Fi module into the Distribution Networks
5.3, click on the search appliance APP button to start the search appliance, the search is successful, it will automatically jump to the main page, and display device
5.4, SCM after Wi-Fi connection MQTT server 1S LEDs shine
5.5, click the device entry, device control page, click on the bottom of the check for updates
Click to check for updates, when, in fact, APP by first asking MQTT model and version number of the device
然后根据型号,用http访问Web服务器里面的 updatainfo.txt 文件
如果判断版本不一致,就提示更新
5.6 点击确认
5.7 模块返回他要更新了
5.8 更新完成
5.9 如果再点击更新