The communication between the WiFi module and your microcontroller is performed by means of a standard asynchronous serial protocol. Almost all microcontrollers are equipped with at least one Universal Asynchronous Receiver Transmitter interface (UART), thus, the establishment of the communication is usually straightforward.
The serial protocol is asynchronous and the bus consists of just two wires, the receiver line, RX, the transmitter line, TX as depicted in the following picture:
The following figure shows a practical wiring example between the miuPanel kit1 (SCF-01 WiFi module + the level adapter ADP-01) and a development board:
The serial protocol is usually configurable, thus, it is important to make sure that both devices on the serial bus are configured to use the exact same settings. In particular, to communicate with WiFi module the micro-controller’s UART has to be set as follow:
The default baud rate of the Wi-Fi module is 57600 baud, but it can be changed both from APP or through a serial command.
Depending on the employed WiFi module, the power supply and the electrical voltage on the bus, must be as follow:
Please note that the power supply must be able to provide at least 300 mA
When you receive the WiFi module, you have to activate the product and enable your mobile phone to talk with the module. When the module is powered-up for the first time, the µPanel firmware will run and create a WiFi access point whose name is miuPanel. This access point represents the primary method for setting-up your module.
In order to proceed with the following instructions you will have to install the µPanel App on your mobile device. Launching the App from your smartphone, the screen reported in the following picture should appear, indicating that you are ready to add your new module:
First of all, enable the WiFi of your mobile device and select the miuPanel from the list. Since the WiFi connection is protected, you will be asked for the password. The initial module’s password is uPanel11 (please note that the P is upper case). When connected, press on the Add New Module button. You will see the following message confirming that the App is actually trying to connect to your module
After a while your module should appear in your device’s screen as shown by the following picture. The header of the new product box shows the serial number that identifies your product. If you wish, you can assign a user friendly name to your module simply by clicking on its serial number and entering the name you like.
You are just a step away from your Panel! To activate your module, make sure your mobile device is actually connected to the Internet (disconnect your device from the miuPanel WiFi and connect to another WiFi or mobile data network which give an internet access) and click on your product box. The following message will appear:
In a while you should see your product with the message “click here to connect“, as shown in the following picture, indicating that your product has been correctly registered and activated.
Now in the bottom part of your module button the App also shows both the module local and public IP. You will find more information about these IP in the Router and Module in the next guide section “module configuration”.
Now press on your module button to connect to your module! Remember that since you have not yet enabled the WiFi module to connect to any router, before press on “click to connect” you have to reconnect your mobile device directly to the miuPanel WiFi Access Point).
NOTE: if the app shows the message “your product can not be regitered!” this simply means that your miupanel vendor has not yet activated the module registration after the sales, so the registration fail. Usually the vendor activates the registration of your wi-fi module whithin 24 hours the sale. In this case, you can contact your vendor to request the activation.
You should obtain the screen reported in the following picture that shows the module has replied indicating that there is not yet a panel to show you. Congratulations! You are now ready to start with your µPanel!
Please note that the first LED (on the left) in the tool bar will stay steady ON, indicating that your mobile device is connected and communicating with the module. The second LED (on the right), instead will flash only when data and commands are successfully transmitted from your mobile device to your module.
Please go to the next section to know how to configure your module
In this section are described the module’s configurations to set to permit the App to reach your module from remote.
The WiFi module can be configured using either the menu on the App or the module serial interface to send the serial command. In this section we will present the former method.
To better undestand the following configurations, keep in mind that the µPanel APP will search automatically your remote wifi module scanning sequentially four connection mode:
The first mode that will permit to reach the remote module will be used from the App. From the users point of view, the connection mode choosed from the app to communicate with the module are irrilevant.
To access to the menu: connect the mobile phone to the WiFi Access Point of the miuPanel module >>> open the App and access to the module (by clicking on “click to connect” button) >>> click on the Menu button, located on the right side of the tool bar, the following menu will appear.
The first menu item (Configure Module) allows you to access the page with the module configuration:
The presented form includes the following basic fields:
The following configuration are useful to communicate with your module from the Internet (i.e. from everywhere in the world).
If you have a router with static public IP, instead to enable the CLOUD, you can set your router to permit the App to directly reach the module from outside. In order to be able to communicate with your module from the Internet (i.e. from everywhere in the world) you have to configure your router to allow incoming TCP connections to reach the module port 80 and 81. The µPanel firmware is able to automatically configure most of the routers so that they will accept and forward these incoming connections. The currently supported protocols are the NAT-PMP and UPnP. The former is adopted by Apple products, the latter by many home routers. The following three entries of the configuration module permit to set and enable the router auto-configurator function:
The last module entries permit to configure and access the following features:
Some of the above discussed parameters and functions might be protected and locked by a controller connected to the serial port. Please refer to the serial section to know more about the protected commands.
The best manner to run your first panel is to see the examples.
See the sketchs of some basic examples written for Arduino UNO connected to miuPanel Kit1:
See the sketchs of some basic examples written for the miuPanel board TOP-03 (100% Arduino compatible):