CN107172140B - Multi-path control zigbee equipment data processing method - Google Patents

Multi-path control zigbee equipment data processing method Download PDF

Info

Publication number
CN107172140B
CN107172140B CN201710330147.0A CN201710330147A CN107172140B CN 107172140 B CN107172140 B CN 107172140B CN 201710330147 A CN201710330147 A CN 201710330147A CN 107172140 B CN107172140 B CN 107172140B
Authority
CN
China
Prior art keywords
equipment
mcu
terminal
coordinator
local area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710330147.0A
Other languages
Chinese (zh)
Other versions
CN107172140A (en
Inventor
黄欣欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201710330147.0A priority Critical patent/CN107172140B/en
Publication of CN107172140A publication Critical patent/CN107172140A/en
Application granted granted Critical
Publication of CN107172140B publication Critical patent/CN107172140B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/103Active monitoring, e.g. heartbeat, ping or trace-route with adaptive polling, i.e. dynamically adapting the polling rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Cardiology (AREA)
  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a multi-channel controlled zigbee equipment data processing method, which comprises a coordinator, a Micro Control Unit (MCU) and a plurality of terminal equipment, wherein the MCU, the coordinator and all the terminal equipment form a zigbee local area network together; all terminal equipment is connected to enter a zigbee local area network through a coordinator, and the coordinator allocates a network access short address to each terminal equipment; an equipment list database is arranged in the MCU, the equipment list database comprises a plurality of equipment nodes, and each equipment node stores the MAC address, the equipment name, the equipment type, the channel value and the network access short address of the corresponding terminal equipment. The MCU of the invention can realize independent control of each channel and can also realize the differentiated reporting of each channel of load data.

Description

Multi-path control zigbee equipment data processing method
Technical Field
The invention relates to the technical field of wireless communication, in particular to a multi-channel control zigbee equipment data processing method.
Background
ZigBee is a low power consumption local area network protocol based on IEEE802.15.4 standard. According to international standards, the ZigBee technology is a short-range, low-power consumption wireless communication technology. The basic flow of the operation is data of the device terminal → coordinator or router (gateway) → MCU. IEEE MAC address: the globally unique address, which will remain different throughout the life cycle of the device, is assigned by the international IEEE organization, has been written into the chip at the time of its shipment, and cannot be modified. Short address: when a device joins a zigbee network, it is assigned only uniquely in the network and is used for address identification during data transmission and reception in the network.
At present, with the rapid development of the internet of things technology, the types of terminal equipment are more and more. Since some terminal equipments need to perform multi-path control (such as zigbee switch controller of multi-path light), and simultaneously perform remote control on multi-path loads. These problems are encountered when using a multi-way zigbee device: when the device accesses the network, it will send out the network access report of each channel in sequence (only one channel of data), but how the MCU identifies this device. In addition, how the MCU terminal realizes independent control of each path and how load data of each path are reported in a differentiated manner.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a data processing method of multi-path control zigbee equipment, which can solve the problems of network access and data processing of the multi-path control zigbee equipment.
The purpose of the invention is realized by the following technical scheme:
a multi-path controlled zigbee equipment data processing method comprises a coordinator, a Micro Control Unit (MCU) and a plurality of terminal equipment, wherein the MCU, the coordinator and all the terminal equipment form a zigbee local area network together; all terminal equipment is connected to enter a zigbee local area network through a coordinator, and the coordinator allocates a network access short address to each terminal equipment; the MCU is internally provided with an equipment list database, the equipment list database comprises a plurality of equipment nodes, and each equipment node stores the MAC address, the equipment name, the equipment type, the channel value and the network access short address of corresponding terminal equipment, and the method comprises the following steps:
A. the micro control unit MCU is connected into a zigbee local area network through a coordinator, each terminal device is connected into the zigbee local area network through the coordinator, and a device list database is arranged in the micro control unit MCU; the coordinator allocates a network access short address to each terminal device;
when a terminal device is connected and enters a zigbee local area network, a device list database in a Micro Control Unit (MCU) sets a device node corresponding to the terminal device, wherein the device node stores an MAC address, a device name, a device type, a channel value and a network access short address of the corresponding terminal device; thus, all the terminal devices are connected into the zigbee local area network, and the device nodes corresponding to all the terminal devices are stored in the device list database in the MCU;
B. a certain terminal device is disconnected from a zigbee local area network, then the terminal device is connected into the zigbee local area network, the coordinator allocates a network access short address to the terminal device and reports the MAC address and the network access short address of the terminal device to a Micro Control Unit (MCU), the MCU matches the MAC address of the terminal device in a device list database to find a device node corresponding to the terminal device, and then updates the network access short address corresponding to the terminal device in the device node;
C. the micro control unit MCU sends a control command or an inquiry command to a certain control channel of the terminal equipment in the zigbee local area network, the micro control unit MCU can identify the equipment node corresponding to the terminal equipment through the equipment list database, then the micro control unit MCU searches a channel value through the equipment node, the corresponding control channel in the terminal equipment responds to the control operation after receiving the control command or the inquiry command, and the terminal equipment feeds back a control result and inquires the obtained load condition to the micro control unit MCU through the zigbee local area network.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the MCU can realize independent control on the channel of the terminal equipment of each channel and can realize the differentiated reporting of each path of load data.
Drawings
FIG. 1 is a schematic flow chart of two steps A of the present invention;
FIG. 2 is a flowchart illustrating a second step B according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following examples:
example one
A multi-path controlled zigbee equipment data processing method comprises a coordinator, a Micro Control Unit (MCU) and a plurality of terminal equipment, wherein the MCU, the coordinator and all the terminal equipment form a zigbee local area network together; all terminal equipment is connected to enter a zigbee local area network through a coordinator, and the coordinator allocates a network access short address to each terminal equipment; the MCU is internally provided with an equipment list database, the equipment list database comprises a plurality of equipment nodes, and each equipment node stores the MAC address, the equipment name, the equipment type, the channel value and the network access short address of corresponding terminal equipment, and the method comprises the following steps:
A. the micro control unit MCU is connected into a zigbee local area network through a coordinator, each terminal device is connected into the zigbee local area network through the coordinator, and a device list database is arranged in the micro control unit MCU; the coordinator allocates a network access short address to each terminal device;
when a terminal device is connected and enters a zigbee local area network, a device list database in a Micro Control Unit (MCU) sets a device node corresponding to the terminal device, wherein the device node stores an MAC address, a device name, a device type, a channel value and a network access short address of the corresponding terminal device; thus, all the terminal devices are connected into the zigbee local area network, and the device nodes corresponding to all the terminal devices are stored in the device list database in the MCU;
B. a certain terminal device is disconnected from a zigbee local area network, then the terminal device is connected into the zigbee local area network, the coordinator allocates a network access short address to the terminal device and reports the MAC address and the network access short address of the terminal device to a Micro Control Unit (MCU), the MCU matches the MAC address of the terminal device in a device list database to find a device node corresponding to the terminal device, and then updates the network access short address corresponding to the terminal device in the device node;
C. the micro control unit MCU sends a control command or an inquiry command to a certain control channel of the terminal equipment in the zigbee local area network, the micro control unit MCU can identify the equipment node corresponding to the terminal equipment through the equipment list database, then the micro control unit MCU searches a channel value through the equipment node, the corresponding control channel in the terminal equipment responds to the control operation after receiving the control command or the inquiry command, and the terminal equipment feeds back a control result and inquires the obtained load condition to the micro control unit MCU through the zigbee local area network.
Example two
As shown in fig. 1 and 2, a multi-channel controlled zigbee device data processing method includes a coordinator, a micro control unit MCU, and a plurality of terminal devices, where the micro control unit MCU, the coordinator, and all the terminal devices together form a zigbee local area network, the terminal device includes a plurality of control channels, each control channel in the same terminal device is assigned with a channel value, and an MAC address, a device name, a device type, and a channel value are stored in the terminal device; all terminal equipment is connected to enter a zigbee local area network through a coordinator, and the coordinator allocates a network access short address to each terminal equipment; the MCU is internally provided with an equipment list database, the equipment list database comprises a plurality of equipment nodes, and each equipment node stores the MAC address, the equipment name, the equipment type, the channel value and the network access short address of corresponding terminal equipment, and the method comprises the following steps:
A. and after receiving the data such as the network access short address of the multi-channel, the controlled channel number and the like sequentially sent by the multi-channel terminal equipment, the coordinator sends the data to the MCU through the serial port. When receiving a network access report MCU, firstly polling the existing terminal equipment list, comparing the equipment short address in the received reported data with the data in the equipment list, if a matching value appears, then comparing the received point value (channel value) of the equipment with the point value in the equipment list, and if the received point value is greater than the existing point value, updating the greater value into the equipment list; and comparing the short address of the equipment in the received reported data with the data in the equipment list, and if no matching value appears, newly building an equipment node data structure and adding the equipment node data structure into the equipment list.
B. The method comprises the steps that an MCU receives short address and mac address reports of a multi-channel terminal, the MCU polls an existing terminal equipment list, compares equipment short addresses in the received reported data with data in the equipment list to find out corresponding node nd _ shortaddress, then polls the equipment list according to the mac address, and if a matched node nd _ mac can be found, updates the existing short address value into the short address of the node nd _ mac, and deletes the data of the node nd _ shortaddress from the equipment list; and if the node cannot be found according to the mac address, updating the value of the mac to the value of the mac of the node nd _ shortaddress, and then reporting that the new device is on-line.
C. When the load of the appointed channel is controlled or inquired, a control command or inquiry containing the point value is sent to the multi-channel terminal, and the terminal returns the state of the load of the corresponding point value channel after receiving a correct instruction.
In this embodiment, the terminal device is a 3-street lamp zigbee controller, when the 3-street lamp zigbee controller accesses the network, the 3-street lamp zigbee controller sequentially reports data such as a short address, a control path number, a mac address and the like, a gateway (MCU) polls an equipment data list of all sensors networked with the gateway, compares the short address in the received data with values of all nodes in the equipment list, and if a matched value occurs, the next step is performed; otherwise, allocating a new memory, establishing a new structural body data of the equipment node, and copying the received data to the structural body of the node; comparing the received point value of the equipment, if the value is larger than the value of the equipment data list, updating the larger point value, and finally setting the point value to be 3; reporting the street lamp short address and the mac address, and comparing the received short address data with data in the equipment data list by a gateway (MCU terminal) to find a matched node nd _ shortaddress; next, comparing the received mac data with the mac data in the device data list, if a matched value can be found, finding a corresponding node nd _ mac, updating the received short address data into the short address data of the node, and deleting nd _ shortaddress from the device list; if no matched node is found, the received mac data is updated to the mac value in the node nd _ shortaddress, and the new device is reported to be on-line; and sending a light-on instruction or an inquiry command to the 2 nd channel of the 3 street lamp controller, wherein the gateway (MCU end) needs to send a control command with a point value of 2, and the equipment makes a light-on action or returns to the state of the 2 street lamp after receiving a correct command.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (1)

1. A multi-path control zigbee equipment data processing method is characterized in that: the ZigBee wireless network comprises a coordinator, a Micro Control Unit (MCU) and a plurality of terminal devices, wherein the MCU, the coordinator and all the terminal devices form a zigbee local area network together; all terminal equipment is connected to enter a zigbee local area network through a coordinator, and the coordinator allocates a network access short address to each terminal equipment; the MCU is internally provided with an equipment list database, the equipment list database comprises a plurality of equipment nodes, and each equipment node stores the MAC address, the equipment name, the equipment type, the channel value and the network access short address of corresponding terminal equipment, and the method comprises the following steps:
A. the micro control unit MCU is connected into a zigbee local area network through a coordinator, each terminal device is connected into the zigbee local area network through the coordinator, and a device list database is arranged in the micro control unit MCU; the coordinator allocates a network access short address to each terminal device;
when a terminal device is connected and enters a zigbee local area network, a device list database in a Micro Control Unit (MCU) sets a device node corresponding to the terminal device, wherein the device node stores an MAC address, a device name, a device type, a channel value and a network access short address of the corresponding terminal device; thus, all the terminal devices are connected into the zigbee local area network, and the device nodes corresponding to all the terminal devices are stored in the device list database in the MCU; after receiving data such as network access short addresses of multiple channels and controlled channel numbers sequentially sent by multiple terminal devices, a coordinator sends the data to a Micro Control Unit (MCU) through a serial port, when receiving a network access report, the MCU firstly polls an existing terminal device list, compares the device short addresses in the received reported data with the data in the device list, if a matching value occurs, compares the received channel value of the device with the channel values in the device list, and if the received channel value is larger than the existing channel value, updates the larger value into the device list; comparing the short address of the equipment in the received reported data with the data in the equipment list, if no matching value appears, newly building an equipment node data structure and adding the equipment node data structure into the equipment list;
B. a certain terminal device is disconnected from a zigbee local area network, then the terminal device is connected into the zigbee local area network, the coordinator allocates a network access short address to the terminal device and reports the MAC address and the network access short address of the terminal device to a Micro Control Unit (MCU), the MCU matches the MAC address of the terminal device in a device list database to find a device node corresponding to the terminal device, and then updates the network access short address corresponding to the terminal device in the device node;
C. the micro control unit MCU sends a control command or an inquiry command to a certain control channel of the terminal equipment in the zigbee local area network, the micro control unit MCU can identify the equipment node corresponding to the terminal equipment through the equipment list database, then the micro control unit MCU searches a channel value through the equipment node, the corresponding control channel in the terminal equipment responds to the control operation after receiving the control command or the inquiry command, and the terminal equipment feeds back a control result and inquires the obtained load condition to the micro control unit MCU through the zigbee local area network.
CN201710330147.0A 2017-05-11 2017-05-11 Multi-path control zigbee equipment data processing method Active CN107172140B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710330147.0A CN107172140B (en) 2017-05-11 2017-05-11 Multi-path control zigbee equipment data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710330147.0A CN107172140B (en) 2017-05-11 2017-05-11 Multi-path control zigbee equipment data processing method

Publications (2)

Publication Number Publication Date
CN107172140A CN107172140A (en) 2017-09-15
CN107172140B true CN107172140B (en) 2020-04-28

Family

ID=59814860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710330147.0A Active CN107172140B (en) 2017-05-11 2017-05-11 Multi-path control zigbee equipment data processing method

Country Status (1)

Country Link
CN (1) CN107172140B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542076B (en) * 2019-01-16 2021-10-29 四川长虹电器股份有限公司 Management method of double-control mode multi-way switch equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120504A (en) * 2015-07-15 2015-12-02 深圳市通普科技有限公司 ZIGBEE dynamic address networking control method and system
CN205692032U (en) * 2016-06-24 2016-11-16 苏州和氏设计营造股份有限公司 Museum's intelligent control system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9258764B2 (en) * 2013-01-29 2016-02-09 Broadcom Corporation System and methods for anonymous crowdsourcing of network condition measurements

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120504A (en) * 2015-07-15 2015-12-02 深圳市通普科技有限公司 ZIGBEE dynamic address networking control method and system
CN205692032U (en) * 2016-06-24 2016-11-16 苏州和氏设计营造股份有限公司 Museum's intelligent control system

Also Published As

Publication number Publication date
CN107172140A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
JP7249720B2 (en) Allocation and Reuse of Network Addresses for Hierarchy-Based RPL Networks
US10693719B2 (en) Centralized controlling system controlling interactions and cooperation between radio-operated devices operating in a mesh network supporting multiple radio communication protocols
CN103329629B (en) Networking illuminator controls
EP3764597A1 (en) Network protocol for mesh capability in narrow-band wireless networks
CN203896554U (en) Indoor illumination control system and indoor intelligent control system
CN103713608A (en) Hierarchical network architecture of wireless Internet-of-Things home system and networking communication method thereof
US20150245450A1 (en) Apparatus and method for controlling zigbee wireless lighting
CN108431701B (en) Control method, control panel and control system of intelligent household equipment
US10601648B2 (en) Network nodes with intelligent integration
CN109327361B (en) Lora terminal networking method
CN103987173A (en) Indoor illumination control system and indoor intelligent control system
CN109257834B (en) Networking method of mesh wireless sensor network based on Thread protocol
CN105185085A (en) Data communication system, method and device
CN111913397B (en) Device control method, device, storage medium, and electronic apparatus
EP3764591A1 (en) Network protocol method for mesh capability in narrow-band wireless networks
CN103974380A (en) Terminal access position keep-alive method and device
CN105357255A (en) Remote update method and system
US20160295669A1 (en) Configuring a network connected lighting system
CN104301906A (en) Method for relay communication between gateways of wireless sensor network
CN110572306A (en) wired intelligent home system with ad hoc network and ad hoc network method thereof
CN107172573B (en) zigbee terminal communication data processing method
CN107172140B (en) Multi-path control zigbee equipment data processing method
CN106686697B (en) The method of zigbee terminal device node administration
CN105610857A (en) Method for automatically identifying local and remote networks
KR101543148B1 (en) Automatic searching method of sub-module for direct digital control device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant