CN117527460A - Method and device for expanding RS485 interface through local area network - Google Patents

Method and device for expanding RS485 interface through local area network Download PDF

Info

Publication number
CN117527460A
CN117527460A CN202311259344.XA CN202311259344A CN117527460A CN 117527460 A CN117527460 A CN 117527460A CN 202311259344 A CN202311259344 A CN 202311259344A CN 117527460 A CN117527460 A CN 117527460A
Authority
CN
China
Prior art keywords
node
host
equipment
information
node equipment
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.)
Pending
Application number
CN202311259344.XA
Other languages
Chinese (zh)
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.)
Fujian Star Net Tianhe Intelligent Technology Co ltd
Original Assignee
Fujian Star Net Tianhe Intelligent Technology 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 Fujian Star Net Tianhe Intelligent Technology Co ltd filed Critical Fujian Star Net Tianhe Intelligent Technology Co ltd
Priority to CN202311259344.XA priority Critical patent/CN117527460A/en
Publication of CN117527460A publication Critical patent/CN117527460A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and a device for expanding an RS485 interface through a local area network, wherein the method comprises the following steps: the node equipment is respectively connected with the controlled equipment through an RS485 interface, the node equipment is communicated with the host through a local area network, after the node equipment is on line, node information is broadcast in the local area network, after the host receives broadcast data, the node information is identified, and the IP address and port information of the host are replied to the node equipment; after receiving the reply of the host, the node equipment acquires a configuration information request from the host to complete configuration; the host initiates a control instruction to the node device, controls the corresponding controlled device, and sends state information to the host.

Description

Method and device for expanding RS485 interface through local area network
Technical Field
The invention relates to a method and a device for expanding an RS485 interface through a local area network.
Background
RS485 is a standard for balanced transmission line multipoint communications with 2-wire, half-duplex, and electrical characteristics specified as belonging to the OSI model physical layer. RS485 is recommended for use in point-to-point networks, linear, bus type, but not star, ring type networks. In the field of intelligent home, most heating and ventilation systems and background music systems use RS485 to communicate, and the condition that a central control host interface is insufficient easily occurs for large projects. Meanwhile, in practical project application, the wiring requirement of the RS485 network cannot be met frequently due to construction wiring reasons.
Disclosure of Invention
The invention aims to solve the technical problems of providing a method and a device for expanding an RS485 interface through a local area network, and aims to solve the problems that the interface is insufficient and the RS485 wiring requirement cannot meet the application scene, and the RS485 network is expanded by using the local area network so as to realize the requirements of multiple RS485 interfaces of a single host.
In a first aspect, the present invention provides a method for expanding an RS485 interface through a local area network, including a host, at least one node device and at least one controlled device, where the node devices are respectively connected to the controlled devices through the RS485 interface, and the node device communicates with the host through the local area network, and specifically includes the following steps:
step 1, after the node equipment is on line, broadcasting node information in a local area network, and after receiving broadcast data, a host identifies the node information and replies IP address and port information of the host to the node equipment;
step 2, after receiving the reply of the host, the node equipment acquires a configuration information request from the host to complete configuration;
and 3, the host initiates a control instruction to the node equipment, controls the corresponding controlled equipment, and sends state information to the host.
Further, the step 1 is further specifically: after the node equipment is on line, the node information of the node equipment is broadcast through the local area network in a set period, the host computer judges whether the node equipment is in a configuration table according to the node information after receiving the node information, if the node information is in the configuration table, the host computer IP address and the host computer port information are replied to the node equipment, the node equipment stores the IP address and the port information of the host computer, and the node information comprises the node IP address, the node port number and the MAC address information.
Further, the step 2 is further specifically:
and stopping broadcasting when the node equipment receives the reply of the host, sending a heartbeat request to the host by the node equipment, receiving and replying a message by the host, acquiring a configuration information request from the host by the node equipment, and configuring by the node equipment through the configuration information.
Further, the step 3 is further specifically: the host computer sends a control instruction to the node equipment, and the control equipment is correspondingly connected with the controlled equipment on the RS485 interface; the node equipment acquires the state of the controlled equipment on the RS485 interface in real time, and if the state of the controlled equipment changes, the node equipment sends the equipment state information to the host.
Further, step 4, when the communication is idle, the node device sends a heartbeat request to the host in a set heartbeat period, and if more than N set heartbeat periods do not receive the host response, step 1 is entered; if the host computer sets that N heartbeat periods do not receive the heartbeat request of the node equipment, deleting the online information of the node equipment, and entering the step 1 without replying the heartbeat request of the node equipment.
In a second aspect, the present invention provides a device for expanding an RS485 interface through a local area network, including a host, at least one node device and at least one controlled device, where the node devices are respectively connected to the controlled devices through the RS485 interface, and the node devices communicate with the host through the local area network, and specifically includes the following modules:
the request module broadcasts node information in the local area network after the node equipment is on line, and the host identifies the node information and replies the IP address and port information of the host to the node equipment after receiving the broadcast data;
the configuration module is used for acquiring a configuration information request from the host after the node equipment receives the reply of the host, so as to complete configuration;
and the control module is used for enabling the host to initiate a control instruction to the node equipment, controlling the corresponding controlled equipment and enabling the node equipment to send state information to the host.
Further, the request module is further specifically: after the node equipment is on line, the node information of the node equipment is broadcast through the local area network in a set period, the host computer judges whether the node equipment is in a configuration table according to the node information after receiving the node information, if the node information is in the configuration table, the host computer IP address and the host computer port information are replied to the node equipment, the node equipment stores the IP address and the port information of the host computer, and the node information comprises the node IP address, the node port number and the MAC address information.
Further, the configuration module is further specifically: and stopping broadcasting when the node equipment receives the reply of the host, sending a heartbeat request to the host by the node equipment, receiving and replying a message by the host, acquiring a configuration information request from the host by the node equipment, and configuring by the node equipment through the configuration information.
Further, the control module is further specifically: the host computer sends a control instruction to the node equipment, and the control equipment is correspondingly connected with the controlled equipment on the RS485 interface; the node equipment acquires the state of the controlled equipment on the RS485 interface in real time, and if the state of the controlled equipment changes, the node equipment sends the equipment state information to the host.
Further, the system also comprises a heartbeat connection module, when the communication is idle, the node equipment sends a heartbeat request to the host in a set heartbeat period, and if the host response is not received in more than N set heartbeat periods, the node equipment enters the request module; if the host computer sets N heartbeat periods and does not receive the heartbeat request of the node equipment, deleting the online information of the node equipment, not replying the heartbeat request of the node equipment, and entering a request module.
One or more technical solutions provided in the embodiments of the present invention at least have the following technical effects or advantages:
in the prior art, the RS485 requirement is that a star network cannot be used, and the star network is easy to appear in the field of intelligent home. The invention uses the local area network to communicate with the node equipment through the host computer, has the characteristics of convenient installation and easy expansion, and solves the problem of the wiring requirement of the RS485 network.
The invention can realize a single host, a plurality of nodes, and each node is provided with a plurality of RS485 interfaces, thereby solving the problem that the RS485 interfaces are insufficient.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
The invention will be further described with reference to examples of embodiments with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method according to a first embodiment of the invention;
fig. 2 is a schematic structural diagram of a device in a second embodiment of the present invention.
Detailed Description
According to the technical scheme in the embodiment of the application, the overall thought is as follows:
the invention provides a method for expanding an RS485 interface through a local area network, which comprises a host and node equipment, wherein the node equipment is provided with a plurality of RS485 physical interfaces, and the host and the node equipment are communicated through the Local Area Network (LAN); the system can be in the form of wireless Ethernet or in the form of network cable connection; after the node equipment is on line, broadcasting node information in the local area network, and after receiving the broadcasting data, identifying the MAC address and the IP address of the node equipment and replying the IP address and the port information of the host to the node equipment; after receiving the reply of the host, the node equipment initiates a heartbeat request to the host and replies to the host; the node equipment acquires a configuration request from a host and responds to the host; the host can initiate a control instruction to the node equipment; the node device may also send status information to the host. The method can expand the RS485 interface through a local area network, and solves the problems that the number of interfaces is insufficient and wiring requirements can not be met possibly encountered in practical application of RS 485; host hardware: nexHome smart home edge gateway R861; node hardware: the NexHome Smart home extension Module EX861.
The configuration information acquired by the node device from the host mainly comprises: the controlled equipment address, manufacturer, model, protocol and other relevant information, and the information node equipment can communicate with the controlled equipment.
The configuration information of the node equipment is acquired from the host, the RS485 controlled equipment is possibly added or deleted according to project conditions, the configuration information is changed at the moment, and the node equipment determines whether the configuration is required to be acquired from the host again by comparing the version numbers; the node equipment sends a heartbeat request to the host, the response data of the host contains the configuration version number of the node equipment, if the configuration version number exists in the node equipment, the configuration version number stored in the node equipment is compared with the configuration version number in the response data by comparison, and if the configuration version number is the same with the configuration version number in the response data, new configuration information does not need to be acquired; if it is different, new configuration information needs to be obtained from the host.
Example 1
As shown in fig. 1, the embodiment provides a method for expanding an RS485 interface through a local area network, including a host, at least one node device and at least one controlled device, where the node devices are respectively connected with the controlled device through the RS485 interface, and the node device communicates with the host through the local area network, and the controlled device may be a heating and ventilation device (air conditioner, ground heating, fresh air) or a background music system, and specifically includes the following steps:
step 1, broadcasting node information of node equipment through a local area network in a set period after the node equipment is on line, judging whether the node equipment is in a configuration table according to the node information after a host receives the node information, if so, replying a host IP address and host port information to the node equipment, and storing the IP address and the port information of the host by the node equipment, wherein the node information comprises a node IP address, a node port number and MAC address information;
step 2, the node equipment stops broadcasting when receiving the reply of the host, and simultaneously the node equipment sends a heartbeat request to the host, the host receives and responds to the message, the node equipment acquires a configuration information request from the host, and the node equipment performs configuration through the configuration information;
step 3, the host sends a control instruction to the node equipment, and the control equipment is correspondingly connected with the controlled equipment on the RS485 interface; the node equipment acquires the state of the controlled equipment on the RS485 interface in real time, and if the state of the controlled equipment changes, the node equipment sends the equipment state information to the host.
Step 4, when the communication is idle, the node equipment sends a heartbeat request to the host in a set heartbeat period, and if the host response is not received in more than N set heartbeat periods, the step 1 is entered; if the host computer sets that N heartbeat periods do not receive the heartbeat request of the node equipment, deleting the online information of the node equipment, and entering the step 1 without replying the heartbeat request of the node equipment. The communication idle state refers to the situation that the host does not send a control instruction to the node equipment and the node equipment does not send equipment state information to the host.
Based on the same inventive concept, the present application also provides a device corresponding to the method in the first embodiment, and details of the second embodiment are described in the following.
Example two
As shown in fig. 2, in this embodiment, there is provided a device for expanding an RS485 interface through a local area network, including a host, at least one node device and at least one controlled device, where the node devices are respectively connected to the controlled devices through the RS485 interface, and the node device communicates with the host through the local area network, and specifically includes the following modules:
the request module is used for broadcasting node information of the node equipment through the local area network in a set period after the node equipment is on line, the host judges whether the node equipment is in a configuration table according to the node information after receiving the node information, if the node information is in the configuration table, the host replies an IP address and port information of the host to the node equipment, the node equipment stores the IP address and the port information of the host, and the node information comprises the node IP address, the node port number and the MAC address information;
the configuration module is used for stopping broadcasting when the node equipment receives the reply of the host, sending a heartbeat request to the host by the node equipment, receiving and responding to the message by the host, acquiring a configuration information request from the host by the node equipment, and configuring the node equipment through the configuration information;
the control module is used for sending a control instruction to the node equipment by the host, and the control equipment is correspondingly connected with the controlled equipment on the RS485 interface; the node equipment acquires the state of the controlled equipment on the RS485 interface in real time, and if the state of the controlled equipment changes, the node equipment sends equipment state information to the host;
the heartbeat connection module is used for sending a heartbeat request to the host computer in a set heartbeat period when the communication is idle, and entering the request module if the host computer response is not received in more than N set heartbeat periods; if the host computer sets N heartbeat periods and does not receive the heartbeat request of the node equipment, deleting the online information of the node equipment, not replying the heartbeat request of the node equipment, and entering a request module.
Since the device described in the second embodiment of the present invention is a device for implementing the method described in the first embodiment of the present invention, based on the method described in the first embodiment of the present invention, a person skilled in the art can understand the specific structure and the deformation of the device, and thus the detailed description thereof is omitted herein. All devices used in the method according to the first embodiment of the present invention are within the scope of the present invention.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that the specific embodiments described are illustrative only and not intended to limit the scope of the invention, and that equivalent modifications and variations of the invention in light of the spirit of the invention will be covered by the claims of the present invention.

Claims (10)

1. The method for expanding the RS485 interface through the local area network is characterized by comprising a host, at least one node device and at least one controlled device, wherein the node device is respectively connected with the controlled device through the RS485 interface, and the node device is communicated with the host through the local area network, and specifically comprises the following steps of:
step 1, after the node equipment is on line, broadcasting node information in a local area network, and after receiving broadcast data, a host identifies the node information and replies IP address and port information of the host to the node equipment;
step 2, after receiving the reply of the host, the node equipment acquires a configuration information request from the host to complete configuration;
and 3, the host initiates a control instruction to the node equipment, controls the corresponding controlled equipment, and sends state information to the host.
2. The method for expanding an RS485 interface through a local area network according to claim 1, wherein the step 1 is further specifically: after the node equipment is on line, the node information of the node equipment is broadcast through the local area network in a set period, the host computer judges whether the node equipment is in a configuration table according to the node information after receiving the node information, if the node information is in the configuration table, the host computer IP address and the host computer port information are replied to the node equipment, the node equipment stores the IP address and the port information of the host computer, and the node information comprises the node IP address, the node port number and the MAC address information.
3. The method for expanding the RS485 interface through the local area network according to claim 1, wherein the step 2 is further specifically:
and stopping broadcasting when the node equipment receives the reply of the host, sending a heartbeat request to the host by the node equipment, receiving and replying a message by the host, acquiring a configuration information request from the host by the node equipment, and configuring by the node equipment through the configuration information.
4. The method for expanding the RS485 interface through the local area network according to claim 1, wherein the step 3 is further specifically: the host computer sends a control instruction to the node equipment, and the control equipment is correspondingly connected with the controlled equipment on the RS485 interface; the node equipment acquires the state of the controlled equipment on the RS485 interface in real time, and if the state of the controlled equipment changes, the node equipment sends the equipment state information to the host.
5. The method for expanding an RS485 interface through a local area network according to claim 1, further comprising step 4, when the communication is idle, the node device sends a heartbeat request to the host in a set heartbeat period, and if more than N set heartbeat periods do not receive a host response, step 1 is entered; if the host computer sets that N heartbeat periods do not receive the heartbeat request of the node equipment, deleting the online information of the node equipment, and entering the step 1 without replying the heartbeat request of the node equipment.
6. The device for expanding the RS485 interface through the local area network is characterized by comprising a host, at least one node device and at least one controlled device, wherein the node device is respectively connected with the controlled device through the RS485 interface, and the node device is communicated with the host through the local area network and specifically comprises the following modules:
the request module broadcasts node information in the local area network after the node equipment is on line, and the host identifies the node information and replies the IP address and port information of the host to the node equipment after receiving the broadcast data;
the configuration module is used for acquiring a configuration information request from the host after the node equipment receives the reply of the host, so as to complete configuration;
and the control module is used for enabling the host to initiate a control instruction to the node equipment, controlling the corresponding controlled equipment and enabling the node equipment to send state information to the host.
7. The device for expanding an RS485 interface through a local area network according to claim 6, wherein the request module is further specifically: after the node equipment is on line, the node information of the node equipment is broadcast through the local area network in a set period, the host computer judges whether the node equipment is in a configuration table according to the node information after receiving the node information, if the node information is in the configuration table, the host computer IP address and the host computer port information are replied to the node equipment, the node equipment stores the IP address and the port information of the host computer, and the node information comprises the node IP address, the node port number and the MAC address information.
8. The device for expanding an RS485 interface through a local area network according to claim 6, wherein the configuration module is further specifically:
and stopping broadcasting when the node equipment receives the reply of the host, sending a heartbeat request to the host by the node equipment, receiving and replying a message by the host, acquiring a configuration information request from the host by the node equipment, and configuring by the node equipment through the configuration information.
9. The device for expanding an RS485 interface through a local area network according to claim 6, wherein the control module is further specifically: the host computer sends a control instruction to the node equipment, and the control equipment is correspondingly connected with the controlled equipment on the RS485 interface; the node equipment acquires the state of the controlled equipment on the RS485 interface in real time, and if the state of the controlled equipment changes, the node equipment sends the equipment state information to the host.
10. The device for expanding an RS485 interface over a lan according to claim 6, further comprising a heartbeat connection module, wherein when the communication is idle, the node device sends a heartbeat request to the host in a set heartbeat period, and if more than N set heartbeat periods do not receive a host response, the node device enters the request module; if the host computer sets N heartbeat periods and does not receive the heartbeat request of the node equipment, deleting the online information of the node equipment, not replying the heartbeat request of the node equipment, and entering a request module.
CN202311259344.XA 2023-09-27 2023-09-27 Method and device for expanding RS485 interface through local area network Pending CN117527460A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311259344.XA CN117527460A (en) 2023-09-27 2023-09-27 Method and device for expanding RS485 interface through local area network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311259344.XA CN117527460A (en) 2023-09-27 2023-09-27 Method and device for expanding RS485 interface through local area network

Publications (1)

Publication Number Publication Date
CN117527460A true CN117527460A (en) 2024-02-06

Family

ID=89763306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311259344.XA Pending CN117527460A (en) 2023-09-27 2023-09-27 Method and device for expanding RS485 interface through local area network

Country Status (1)

Country Link
CN (1) CN117527460A (en)

Similar Documents

Publication Publication Date Title
CN107040284B (en) Multi-address access method for improving reliability and stability of data transmission
CN105847456B (en) A kind of RS485 distributes address methods, devices and systems automatically
CN105392181B (en) A kind of networking method of smart machine, apparatus and system
CN110366153B (en) Bluetooth ad hoc network method
WO2019196455A1 (en) Air-conditioning communication system and method, storage medium and electronic apparatus
WO2019196483A1 (en) Air conditioning system and communication method between units in air conditioning system
WO2016169231A1 (en) Method and system for building steady piconet based on bluetooth
CN101883158A (en) Method and client for acquiring VLAN (Virtual Local Area Network) IDs (Identifiers) and network protocol addresses
CN111866897B (en) Networking method of intelligent household system and intelligent household system
CN105392185B (en) A kind of networking method of smart machine, apparatus and system
CN105022276A (en) Smart home system and data interaction method thereof
US7739375B2 (en) System and method for UPnP discovery advertisement byebye by proxy
CN111397175A (en) Control equipment with multiple control modes, control method and air conditioning unit
CN111277507A (en) Method for realizing information exchange between wireless terminals
CN101436971B (en) Wireless household control system
CN110456705B (en) Network control device capable of dynamically expanding interface and building automatic control system
CN112351509A (en) Self-organizing network protocol based on determinacy management method
CN117527460A (en) Method and device for expanding RS485 interface through local area network
CN115277790B (en) Plug-and-play self-registration communication method for distributed power supply
CN101895560B (en) Fieldbus DP-NET with open two-stage topological structure
CN113132988B (en) Wireless networking link access method of street lamp controller based on token verification
CN214205565U (en) Intelligent gateway equipment fusing LoRa and NB-IOT wireless communication technology
CN113098737B (en) User node admission control method and device and electronic equipment
CN114945206A (en) Access method of PROFINET protocol in 5G-LAN
CN1464663A (en) Method for establishing IPOA channel between base station and base station controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication