LAN device discovery method based on dual-port backup technology

A technology of local area network equipment and discovery method, which is applied in the field of local area network equipment discovery based on dual-port backup technology, and can solve the problem that the main port 5353 cannot be bound, etc.

Inactive Publication Date: 2019-01-15
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF8 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The purpose of the present invention is to overcome the shortcomings in the above-mentioned background technology and provide a method for discovering local area network devices based on dual-port backup technology, w

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • LAN device discovery method based on dual-port backup technology

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0027] Such as figure 1 As shown, a method for discovering LAN devices based on dual-port backup technology, using dual-port backup technology, using another port 9393 as a backup port, using dual-port 5353 and 9393 to simultaneously send and receive packets, and port 9393 as a backup port for 5353 port, specifically including the following steps:

[0028] S1. Initialize the current running information of the SDK, such as startup discovery, startup discovery, device SN configuration, etc.;

[0029] B. Create two sockets to bind the main port and the standby port respectively, and enter step C when both the main port and the standby port are successfully bound; wherein, the main port is port 5353, and the standby port is 9393 port.

[0030] C. Start two threads to accept the data packets of the main port and the standby port respectively, and simultaneously monitor the main port and the standby port respectively;

[0031] D. Summarize the received data packets, and verify th...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a LAN device discovery method based on the dual-port backup technology, which comprises the following steps: A. initializing SDK current running information; B. create two sockets to bind that primary port and the standby port respectively; C. star two threads to respectively receive data message of a main port and a standby port; D, verifying the contents of the data message to judge whether the contents of the data message conform to the SDK internal protocol; E, enter step F if that protocol conforms to the SDK internal protocol, otherwise discard the data message; F, judging whether the service information carried in the data message is the opposite end service information, if so, extracting the opposite end service IP and the port, and establishing the TCP connection; G. aft that connection is successful, the device information acquisition request is sent, and aft the device information reply is received, the SDK can discover the device. The method of the invention ensures that the function of the local SDK is not affected when the main port cannot be bound or occupied by other applications.

Description

technical field [0001] The invention relates to the technical field of Internet of Things communication, in particular to a method for discovering local area network devices based on dual-port backup technology. Background technique [0002] With the widespread application of mDNS (multicast DNS, multicast DNS) in Apple products (iphone, ipad, Mac, etc.), and more and more hardware and software manufacturers supporting the mDNS protocol in their devices, the mDNS protocol has basically become It has become an industry standard for mutual discovery of devices and services in a LAN. The most common usage scenario for mDNS is in a LAN. [0003] Through port 5353, each host entering the LAN, if the mDNS service is enabled, will multicast a message to all hosts in the LAN, for example, who am I and what is my IP address, etc., and then other mDNS services are enabled The host will respond, for example, who am I and what is my IP address. mDNS uses port 5353. When there is no DN...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04L29/08H04L29/12H04L29/06
CPCH04L69/162H04L69/163H04L61/4511H04L67/54
Inventor 陈梁
Owner SICHUAN CHANGHONG ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products