Electronic Components Datasheet Search |
|
AN3972 Datasheet(PDF) 11 Page - STMicroelectronics |
|
AN3972 Datasheet(HTML) 11 Page - STMicroelectronics |
11 / 21 page AN3972 Application firmware description Doc ID 022161 Rev 1 11/21 // do the sink advertise (multicast) if (timeBeforeSinkAdvertise == 0) { emberSerialPrintf(APP_SERIAL, "EVENT: sink automatically advertising to find sensors\r\n"); sinkAdvertise(); timeBeforeSinkAdvertise = TIME_BEFORE_SINK_ADVERTISE; } Each smartplug object of the list includes all the information related to the power consumption measurement of each smartplug device installed in the building. These data are sent using a private ZigBee profile with a specific cluster ID (CLUST_GET_PLUG_DATA_ID = 0x1010) which is initialized into the function ZB_ClustersInitialization; the message related to this cluster is managed by the function OnGetPlugDataMsg that updates the data of the smartplug object included in the smartplug objects list. The smartplug devices are compliant with both the “Home Automation” profile and the private profile implemented in the Home Web Console application running on the STM3210C-EVAL. On the smartplug, the ON/OFF command is implemented by the HA standard profile so the home web console uses a standard ZCL command for this command implemented by the function SendZclOnOffCmd. 3.2 TCP/IP section 3.2.1 TCP/IP stack The web section of the application is based on the “lwIP” stack implemented by SICS. It is designed to reduce memory usage and code size in order to be used in embedded systems. For details related to this TCP/IP stack, refer to the lwIP manual available at www.sics.se. The TCP/IP task, which is implemented by the tcpip_thread function, is created by the function vStartEthernetTasks. The tcpip_thread task creates the task ethernetif_input that manages the messaging process with the Ethernet controller which is embedded in STM32. 3.2.2 TCP/IP application layer The HTTP server services run on the task httpd; it mainly creates a TCP listener on port 80 and as soon as an incoming connection is received the server accepts it and parses the HTML request by the function ParseHTMLRequest; after the parsing procedure the connection is closed. The task is normally in sleep state and it is woken up by the incoming connection request from the client. The HTML parser processes both GET and POST requests and expects to immediately get the data. The web page is made up of two static parts and two dynamic parts, so it is organized into four frames. The static parts and the “index” pages are stored in the embedded flash of the STM32; the dynamic parts are built at runtime on the basis of the smartplug data objects list maintained by the ZigBee application layer described in Section 3.1.2. The first dynamic part shows a table reporting the label, the measured voltage, current and power consumption for each smartplug in the HAN; the table is refreshed every 30 seconds. The second dynamic part shows a list of smartplugs (using the |
Similar Part No. - AN3972 |
|
Similar Description - AN3972 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.COM |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |