CN106304245B - Equipment network access configuration method and device - Google Patents

Equipment network access configuration method and device Download PDF

Info

Publication number
CN106304245B
CN106304245B CN201610852540.1A CN201610852540A CN106304245B CN 106304245 B CN106304245 B CN 106304245B CN 201610852540 A CN201610852540 A CN 201610852540A CN 106304245 B CN106304245 B CN 106304245B
Authority
CN
China
Prior art keywords
information
configuration
network access
configuration data
beacon frame
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
CN201610852540.1A
Other languages
Chinese (zh)
Other versions
CN106304245A (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.)
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Haier Uplus Intelligent Technology Beijing 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 Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Haier Uplus Intelligent Technology Beijing Co Ltd
Priority to CN201610852540.1A priority Critical patent/CN106304245B/en
Publication of CN106304245A publication Critical patent/CN106304245A/en
Application granted granted Critical
Publication of CN106304245B publication Critical patent/CN106304245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/244Connectivity information management, e.g. connectivity discovery or connectivity update using a network of reference devices, e.g. beaconing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种设备入网配置方法及装置,用于无线访问接入点方法包括以下步骤:接收设备配置入网的请求信息;将入网配置数据装载进信标帧的厂商特定信息字段中;广播所述信标帧。本发明中设备入网配置方法及装置,利用信标帧携带配置数据,由路由设备广播发送这种信标帧,可以提供更大的辐射范围。并且由于信标帧为Wifi协议标准帧,技术成熟,Wifi设备对该帧的支持稳定,可以大大优化兼容性。同时由于单一信标帧即可携带所有配置数据,不涉及分包组包问题,可有效保证配置成功率。

Figure 201610852540

The invention discloses a device network access configuration method and device. The method for wireless access to an access point includes the following steps: receiving request information for device network access configuration; loading network access configuration data into a vendor-specific information field of a beacon frame; broadcasting the beacon frame. In the present invention, the device network access configuration method and device use the beacon frame to carry the configuration data, and the beacon frame is broadcast and sent by the routing device, which can provide a larger radiation range. And because the beacon frame is a standard frame of the Wifi protocol, the technology is mature, and the Wifi device supports the frame steadily, which can greatly optimize the compatibility. At the same time, since a single beacon frame can carry all configuration data, the problem of packet grouping is not involved, and the configuration success rate can be effectively guaranteed.

Figure 201610852540

Description

一种设备入网配置方法和装置A device network access configuration method and device

技术领域technical field

本发明涉及网络技术领域,特别是涉及一种设备入网配置方法和装置。The present invention relates to the field of network technologies, and in particular, to a method and device for configuring device network access.

背景技术Background technique

目前,设备入网配置一般采用组播方式,在使用组播方式进行配置时,均为在私有协议内,多采用分包传送数据。由于不同路由设备或是控制端对组播的支持程度不同,因此兼容性较差;同时大量发送组播包,会带来瞬间的网络压力。由于采用分包传输的方式,对网络环境的要求较高,因此配置成功率低。At present, the device network access configuration generally adopts the multicast mode. When the multicast mode is used for configuration, it is all in the private protocol, and most of the data is transmitted in packets. Since different routing devices or control terminals have different levels of support for multicast, the compatibility is poor. At the same time, sending a large number of multicast packets will bring instant network pressure. Due to the use of sub-packet transmission, the requirements for the network environment are relatively high, so the configuration success rate is low.

发明内容SUMMARY OF THE INVENTION

为了克服上述现有技术的缺陷,本发明要解决的技术问题是提供一种设备入网配置方法和装置,用以提高配置成功率。In order to overcome the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is to provide a device network access configuration method and device, so as to improve the configuration success rate.

为解决上述技术问题,本发明中的一种设备入网配置方法,用于无线访问接入点,所述方法包括以下步骤:In order to solve the above technical problems, a device network configuration method in the present invention is used for wireless access points, and the method includes the following steps:

接收设备配置入网的请求信息;Receive request information for device configuration access to the network;

将入网配置数据装载进信标帧的厂商特定信息字段中;Load the network access configuration data into the vendor-specific information field of the beacon frame;

广播所述信标帧。The beacon frame is broadcast.

为解决上述技术问题,本发明中的一种设备入网配置方法,用于设备端,所述方法包括以下步骤:In order to solve the above-mentioned technical problems, a device network configuration method in the present invention is used for the device side, and the method includes the following steps:

在处于配置状态时,接收路由器发送的信标帧;In the configuration state, receive the beacon frame sent by the router;

从所述信标帧的厂商特定信息字段中获取所述入网配置数据;obtaining the network access configuration data from the vendor-specific information field of the beacon frame;

基于获取的所述入网配置数据接入网络。The network is accessed based on the acquired network access configuration data.

为解决上述技术问题,本发明中的一种设备入网配置方法,用于无线访问接入点,所述方法包括以下步骤:In order to solve the above technical problems, a device network configuration method in the present invention is used for wireless access points, and the method includes the following steps:

记录入网成功的设备的设备信息;Record the device information of the devices successfully connected to the network;

在与所述无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;After the password of the wireless access point is changed, the probe request frame sent by the device is received, and the device information and the access point information are obtained from the vendor-specific information field of the probe request frame;

将获取的接入点信息与本端接入点信息进行比对;Compare the obtained access point information with the local access point information;

在比对一致时,将获取的设备信息与记录的设备信息进行匹配;When the comparison is consistent, match the acquired device information with the recorded device information;

在匹配成功时,将新的入网配置数据装载进所述信标帧的厂商特定信息字段中后,广播装载有新的入网配置数据的信标帧。When the matching is successful, after the new network access configuration data is loaded into the vendor-specific information field of the beacon frame, the beacon frame loaded with the new network access configuration data is broadcast.

为解决上述技术问题,本发明中的一种设备入网配置方法,用于设备端,所述方法包括以下步骤:In order to solve the above-mentioned technical problems, a device network configuration method in the present invention is used for the device side, and the method includes the following steps:

在与所述无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;When the wireless access point is disconnected due to a wrong password, loading the local device information and the access point information into the vendor-specific information field of the probe request frame;

广播所述探测请求帧;broadcasting the probe request frame;

打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧,从所述信标帧的厂商特定信息字段中获取新的入网配置数据;Turn on the configuration state, receive a beacon frame that carries new network access configuration data broadcast by the wireless access point, and obtain new network access configuration data from the vendor-specific information field of the beacon frame;

基于新的入网配置数据接入网络。The data access network is based on the new network access configuration.

为解决上述技术问题,本发明中的一种设备入网配置装置,包括:In order to solve the above-mentioned technical problems, a device network access configuration device in the present invention includes:

请求接收模块,用于接收设备配置入网的请求信息;The request receiving module is used to receive the request information for the device to configure the network;

数据组装模块,用于将入网配置数据装载进信标帧的厂商特定信息字段中;The data assembly module is used to load the network access configuration data into the vendor-specific information field of the beacon frame;

广播模块,用于广播所述信标帧。A broadcasting module, configured to broadcast the beacon frame.

为解决上述技术问题,本发明中的一种设备入网配置装置,包括:In order to solve the above-mentioned technical problems, a device network access configuration device in the present invention includes:

记录单元,用于记录入网成功的设备的设备信息;A recording unit, used to record the device information of the device that successfully accesses the network;

探测请求接收单元,用于在与所述无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;The probe request receiving unit is configured to receive the probe request frame sent by the device after the password of the wireless access point changes, and obtain the device information and the access point from the manufacturer-specific information field of the probe request frame information;

识别单元,用于将获取的接入点信息与本端接入点信息进行比对;在比对一致时,将获取的设备信息与记录的设备信息进行匹配;在匹配成功时,将新的入网配置数据装载进所述信标帧的厂商特定信息字段中后,广播装载有新的入网配置数据的信标帧。The identification unit is used to compare the acquired access point information with the local access point information; when the comparison is consistent, the acquired device information is matched with the recorded device information; when the matching is successful, the new After the network access configuration data is loaded into the vendor-specific information field of the beacon frame, the beacon frame loaded with the new network access configuration data is broadcast.

为解决上述技术问题,本发明中的一种设备入网配置装置,包括:In order to solve the above-mentioned technical problems, a device network access configuration device in the present invention includes:

帧接收模块,用于在处于配置状态时,接收路由器发送的信标帧;The frame receiving module is used to receive the beacon frame sent by the router when it is in the configuration state;

配置数据获取模块,用于从所述信标帧的厂商特定信息字段中获取所述入网配置数据;a configuration data acquisition module, configured to acquire the network access configuration data from the vendor-specific information field of the beacon frame;

网络连接模块,用于基于获取的所述入网配置数据接入网络。A network connection module, configured to access a network based on the acquired network access configuration data.

为解决上述技术问题,本发明中的一种设备入网配置装置,包括:In order to solve the above-mentioned technical problems, a device network access configuration device in the present invention includes:

请求信息组装单元,用于在与所述无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;a request information assembling unit, configured to load the local device information and the access point information into the vendor-specific information field of the probe request frame when the wireless access point is disconnected due to a password error;

请求广播单元,用于广播所述探测请求帧;a request broadcasting unit for broadcasting the probe request frame;

所述帧接收单元,用于打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧;The frame receiving unit is configured to open a configuration state and receive a beacon frame that carries new network access configuration data broadcast by the wireless access point;

所述配置数据获取单元,用于从所述信标帧的厂商特定信息字段中获取新的入网配置数据;the configuration data acquisition unit, configured to acquire new network access configuration data from the vendor-specific information field of the beacon frame;

所述网络连接单元,用于基于新的入网配置数据接入网络。The network connection unit is configured to access the network based on the new network access configuration data.

本发明有益效果如下:The beneficial effects of the present invention are as follows:

本发明中设备入网配置方法及装置,利用信标帧携带配置数据,由路由设备广播发送这种信标帧,可以提供更大的辐射范围。并且由于信标帧为Wifi协议标准帧,技术成熟,Wifi设备对该帧的支持稳定,可以大大优化兼容性。同时由于单一信标帧即可携带所有配置数据,不涉及分包组包问题,可有效保证配置成功率。In the present invention, the device network access configuration method and device use the beacon frame to carry the configuration data, and the beacon frame is broadcast and sent by the routing device, which can provide a larger radiation range. And because the beacon frame is a standard frame of the Wifi protocol, the technology is mature, and the Wifi device supports the frame steadily, which can greatly optimize the compatibility. At the same time, since a single beacon frame can carry all configuration data, the problem of packet grouping is not involved, and the configuration success rate can be effectively guaranteed.

附图说明Description of drawings

图1是本发明实施例中一种设备入网配置方法的流程图;FIG. 1 is a flowchart of a method for configuring network access of a device in an embodiment of the present invention;

图2是本发明实施例中一配置条目的数据结构示意图;2 is a schematic diagram of a data structure of a configuration entry in an embodiment of the present invention;

图3是本发明实施例中条目头的数据结构示意图;3 is a schematic diagram of a data structure of an entry header in an embodiment of the present invention;

图4是本发明实施例中头信息的数据结构示意图;4 is a schematic diagram of a data structure of header information in an embodiment of the present invention;

图5是本发明实施例中包头的数据结构示意图;5 is a schematic diagram of a data structure of a packet header in an embodiment of the present invention;

图6是本发明实施例中一种设备入网配置方法的流程图;FIG. 6 is a flowchart of a device network access configuration method in an embodiment of the present invention;

图7是本发明实施例中断网时设备与AP的交互示意图;7 is a schematic diagram of interaction between a device and an AP when the network is interrupted according to an embodiment of the present invention;

图8是本发明实施例中用于AP的设备入网配置装置的结构示意图;8 is a schematic structural diagram of a device network access configuration device for AP in an embodiment of the present invention;

图9是本发明实施例中用于设备侧的设备入网配置装置的结构示意图。FIG. 9 is a schematic structural diagram of a device network access configuration apparatus for a device side in an embodiment of the present invention.

具体实施方式Detailed ways

为了提高配置成功率,本发明提供了一种设备入网配置方法和装置,以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不限定本发明。In order to improve the success rate of configuration, the present invention provides a method and apparatus for device network access configuration. The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to illustrate the present invention, but not to limit the present invention.

如图1所示,本发明实施例中一种设备入网配置方法,用于无线访问接入点,所述方法包括以下步骤:As shown in FIG. 1 , in an embodiment of the present invention, a device network access configuration method is used for wireless access points, and the method includes the following steps:

S101,接收设备配置入网的请求信息;其中,请求信息一般是用户启动的。例如,用户在路由器管理页面进行启动。S101: Receive request information for configuring network access by a device; wherein, the request information is generally initiated by a user. For example, the user starts at the router management page.

S102,将入网配置数据装载进信标帧的厂商特定信息字段中。S102: Load the network access configuration data into the vendor-specific information field of the beacon frame.

S103,广播所述信标帧,以使处于配置状态的设备从接收到的信标帧中获取所述入网配置数据;所述帧标识用于标识所述信标帧携带入网配置数据。S103: Broadcast the beacon frame, so that the device in the configuration state obtains the network access configuration data from the received beacon frame; the frame identifier is used to identify that the beacon frame carries the network access configuration data.

本发明实施例摒弃了通过组播配置的方式,利用Beacon(信标)帧携带所有配置数据,由路由设备广播发送这种Beacon帧,可以提供更大的辐射范围。并且由于Beacon帧为Wifi协议标准帧,技术成熟,Wifi设备对该帧的支持稳定,可以大大优化兼容性。同时由于单一信标帧即可携带所有配置数据,不涉及分包组包问题,可有效保证配置成功率。The embodiment of the present invention abandons the way of configuring by multicast, uses a Beacon (beacon) frame to carry all configuration data, and broadcasts and sends the Beacon frame by a routing device, which can provide a larger radiation range. And because the Beacon frame is a standard frame of the Wifi protocol, the technology is mature, and the Wifi device supports the frame steadily, which can greatly optimize the compatibility. At the same time, since a single beacon frame can carry all configuration data, the problem of packet grouping is not involved, and the configuration success rate can be effectively guaranteed.

在上述实施例的基础上,进一步提出上述实施例的变型实施例,在此需要说明的是,为了使描述简要,在各变型实施例中仅描述与上述实施例的不同之处。On the basis of the above-mentioned embodiments, modified embodiments of the above-mentioned embodiments are further proposed. It should be noted here that, in order to simplify the description, only the differences from the above-mentioned embodiments are described in each of the modified embodiments.

在本发明的一个实施方式中,在所述广播所述信标帧的步骤之前,还包括:In an embodiment of the present invention, before the step of broadcasting the beacon frame, the method further includes:

获取需要配置入网的设备的厂商信息,根据所述厂商信息,确定用于标识所述信标帧携带入网配置数据的帧标识,将所述帧标识装载进所述信标帧的厂商特定信息字段中。Obtain the manufacturer information of the device that needs to be configured to access the network, determine the frame identifier used to identify the network access configuration data carried in the beacon frame according to the manufacturer information, and load the frame identifier into the manufacturer-specific information field of the beacon frame middle.

Beacon帧是Wifi的802.11协议规定的一种标准管理帧,Wifi设备定时广播Beacon帧,用来通知网络AP(Wireless Access Point,无线访问接入点)的存在性。Beacon帧中除携带Wifi的一些基础信息外,还允许Wifi设备厂商在厂商特定信息字段内提供自定义的信息。基于此本发明实施方式将所述入网配置数据和所述帧标识装载进所述信标帧的厂商特定信息字段中。本发明实施方式原理简单,有效降低了实现复杂度,并不需要改变Beacon帧的协议规定。The Beacon frame is a standard management frame specified by the 802.11 protocol of Wifi. The Wifi device regularly broadcasts the Beacon frame to notify the existence of an AP (Wireless Access Point, wireless access point) in the network. In addition to carrying some basic information of Wifi, the Beacon frame also allows Wifi device manufacturers to provide customized information in the manufacturer-specific information field. Based on this embodiment of the present invention, the network access configuration data and the frame identification are loaded into the vendor-specific information field of the beacon frame. The implementation of the present invention is simple in principle, effectively reduces the implementation complexity, and does not need to change the protocol regulation of the Beacon frame.

具体说,用户在路由器管理页面选择智能家电配置选项,从中选择新家电的厂商信息,如果找到,则表示该厂商的家电与路由器厂商已协商好对Beacon帧中厂商特定信息字段的使用,则启动无线访问接入点(如路由器)配置针对该厂商的家电的入网的流程。Specifically, the user selects the smart home appliance configuration option on the router management page, and selects the manufacturer information of the new home appliance. If found, it means that the home appliance of the manufacturer and the router manufacturer have negotiated the use of the manufacturer-specific information field in the Beacon frame. The wireless access point (such as a router) configures the network access process for the manufacturer's home appliances.

无线访问接入点(如路由器)发送Beacon帧,该帧的数据区包括帧标识,帧标识可以为4个连续字节的数据,用于指示该帧携带入网配置数据,例如,设备(智能家电设备)接收Beacon帧后,判断数据区中的是否有4个连续字节的特定信息,如果有,则表示该帧利用了厂商特定信息字段,则从该字段获取入网配置数据。A wireless access point (such as a router) sends a Beacon frame. The data area of the frame includes a frame identifier. The frame identifier can be 4 consecutive bytes of data to indicate that the frame carries network configuration data. For example, a device (smart home appliance) After receiving the Beacon frame, the device determines whether there are 4 consecutive bytes of specific information in the data area. If there is, it means that the frame uses the manufacturer-specific information field, and then obtains the network access configuration data from this field.

其中,无线访问接入点包括路由器和具有路由功能的设备,例如移动终端(包括手机)。Wherein, the wireless access point includes a router and a device with a routing function, such as a mobile terminal (including a mobile phone).

进一步说,本步骤中入网配置数据的携带方式可以有两种形式:一种是在Beacon帧里的数据区携带SSID和密码,一种是在Beacon帧的SSID字段携带SSID信息,在数据区携带密码;该步骤的操作会持续发送1分钟。Further, in this step, the network access configuration data can be carried in two forms: one is to carry the SSID and password in the data area of the Beacon frame, the other is to carry the SSID information in the SSID field of the Beacon frame, and carry the SSID information in the data area. Password; the operation of this step will continue to send for 1 minute.

即是说,所述入网配置数据包括入网密码和服务集标识两种配置信息;或者,That is to say, the network access configuration data includes two types of configuration information: a network access password and a service set identifier; or,

所述入网配置数据包括入网密码一种配置信息,所述信标帧的SSID字段中携带有所述服务集标识。The network access configuration data includes configuration information of a network access password, and the service set identifier is carried in the SSID field of the beacon frame.

再进一步说,所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,其中:所述将入网配置数据和所述帧标识装载进所述信标帧的厂商特定信息字段中的步骤,包括:Still further, the vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header and each of the configuration information entries, wherein: the network access configuration data and the frame identifier are loaded into the The steps in the vendor-specific information field of the beacon frame, including:

将所述入网配置数据中配置信息分别封装在对应类型的配置信息条目中;Encapsulating the configuration information in the network access configuration data in corresponding types of configuration information entries;

将各所述配置信息条目的长度信息,封装在条目头中;Encapsulate the length information of each of the configuration information entries in the entry header;

确定各所述配置信息条目和所述条目头的长度总和;determining the total length of each of the configuration information entries and the entry header;

将长度总和信息和所述帧标识封装在包头中;Encapsulate the length sum information and the frame identification in the packet header;

将所述包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目装载进所述信标帧的厂商特定信息字段中。The packet header, the type of the configuration information entry, the entry header and each of the configuration information entries are loaded into a vendor specific information field of the beacon frame.

其中,所述配置信息条目的类型包括方式一:入网密码类型和服务集标识类型;或者方式二:入网密码类型。Wherein, the type of the configuration information entry includes the first method: the network access password type and the service set identification type; or the second method: the network access password type.

也就是说,本实施方式中采用配置包头、条目头和配置条目三段形式将所述入网配置数据和所述帧标识封装成配置数据包,将所述配置数据包装载进所述信标帧的厂商特定信息字段中。That is to say, in this embodiment, the network access configuration data and the frame identifier are encapsulated into a configuration data packet in the form of a configuration header, an entry header and a configuration entry, and the configuration data is encapsulated into the beacon frame. in the Vendor Specific Information field.

本发明实施方式使用配置包头、条目头、配置条目三段形式来封装厂商特定字段数据,采用配置条目的方式来封装配置数据,依靠配置条目长度来确定条目(配置信息)位置,可方便扩展。The embodiments of the present invention encapsulate vendor-specific field data in the form of configuration header, entry header, and configuration entry, adopt configuration entry to encapsulate configuration data, and determine entry (configuration information) location by configuration entry length, which can be easily extended.

以下详细说明封装所述入网配置数据和所述帧标识的步骤。The steps of encapsulating the network access configuration data and the frame identifier are described in detail below.

组装配置信息条目(简称条目):Assembly configuration information entry (referred to as entry):

步骤1、入网配置数据包括两种类型配置信息,分别为入网密码配置信息和服务集标识配置信息。本发明实施例中将入网密码必须携带在厂商特定信息字段,服务集标识可以携带在厂商特定信息字段,也可以携带在信标帧的SSID字段;因此将入网配置数据分为SSID(服务集标识)和KEY(入网密码)两类。相应分成两种类型条目,包括SSID类和KEY类。也就是说,把入网配置数据中的每种配置信息对应组装成一条配置信息条目。Step 1. The network access configuration data includes two types of configuration information, namely, network access password configuration information and service set identification configuration information. In this embodiment of the present invention, the network access password must be carried in the vendor-specific information field, and the service set identifier can be carried in the vendor-specific information field or in the SSID field of the beacon frame; therefore, the network access configuration data is divided into SSID (service set identifier). ) and KEY (network access password). Correspondingly divided into two types of entries, including SSID class and KEY class. That is to say, each kind of configuration information in the network access configuration data is assembled into a configuration information entry.

步骤2、每条配置信息条目包含4个字节的CRC校验码,1字节的条目类型(可选),2字节的条目长度(可选)和变长的原始数据长度。Step 2. Each configuration information entry includes a 4-byte CRC check code, a 1-byte entry type (optional), a 2-byte entry length (optional) and a variable-length original data length.

步骤3、每条配置信息条目内,将条目类型、条目长度、原始配置数据通过TEA加密算法进行加密,获取加密数据。Step 3: In each configuration information entry, encrypt the entry type, entry length, and original configuration data through the TEA encryption algorithm to obtain encrypted data.

步骤4、采用CRC32校验算法,对加密数据进行校验,获取CRC校验码。Step 4: Use the CRC32 check algorithm to check the encrypted data to obtain the CRC check code.

步骤5、用加密数据与CRC校验码组成一个完整的配置信息条目。组装的配置条目的结构如图2所示。Step 5. Use the encrypted data and the CRC check code to form a complete configuration information item. The structure of the assembled configuration entry is shown in Figure 2.

组装条目头:Assemble the entry header:

步骤1、条目头由4个字节的CRC校验码和头信息组成。Step 1. The entry header consists of a 4-byte CRC check code and header information.

步骤2、头信息包含该技术发明的版本、头长度和各条目的长度信息。这些子信息以bit位的方式从低位到高位排列组成。Step 2. The header information includes the version of the technical invention, the header length and the length information of each entry. These sub-information are arranged in bits from low to high.

步骤3、为了节约bit位,版本和头长度均采用id索引的方式映射真实值。Step 3. In order to save bits, both the version and the header length use the id index to map the real value.

步骤4、本发明中,版本1,表示为初始版本,头长度id为1,表示头信息占用3个字节,共24位。Step 4. In the present invention, version 1 represents the initial version, and the header length id is 1, indicating that the header information occupies 3 bytes, totaling 24 bits.

步骤5、计算获得各配置条目的长度。Step 5: Calculate and obtain the length of each configuration entry.

步骤6、版本占用3个bit位,支持7个扩展。头长度id占用2个bit位,支持3个扩展。SSID条目长度占用6bit位,KEY条目长度占用7bit位。不足的话,高位补0。Step 6. The version occupies 3 bits and supports 7 extensions. The header length id occupies 2 bits and supports 3 extensions. The SSID entry length occupies 6 bits, and the KEY entry length occupies 7 bits. If it is not enough, add 0 to the high bit.

步骤7、根据步骤6,获取各子信息的bit位形式数据,然后将各子信息bit位逆序。将结果以bit位的方式按照头长度、版本、SSID、KEY的顺序从低位到高位依次排列,头长度和版本信息占用低五位,SSID、KEY从第6位(即bit5)开始填充,不足32位高位补0。Step 7: According to Step 6, obtain the data in the form of bits of each sub-information, and then reverse the order of the bits of each sub-information. Arrange the results in bits in the order of header length, version, SSID, and KEY from low to high. The header length and version information occupy the lower five bits, and SSID and KEY are filled from the 6th bit (ie bit5), which is insufficient. 32-bit high bits are filled with 0.

步骤8、将排列结果从低位开始,以字节的形式封装成头信息。例如,如图3所示,以SSID条目长度为21,KEY条目长度为15为例:Step 8. The arrangement result is encapsulated into header information in the form of bytes starting from the low order. For example, as shown in Figure 3, the SSID entry length is 21 and the KEY entry length is 15 as an example:

SSID条目长度为21,占用6个bit,为010101,逆序后为101010;The length of the SSID entry is 21, occupying 6 bits, 010101, and 101010 in reverse order;

KEY条目长度为15,占用7个bit,为0001111,逆序后为1111000;The length of the KEY entry is 15, occupying 7 bits, 0001111, and 1111000 in reverse order;

版本为1,占用3个bit,为001,逆序后为100;The version is 1, occupying 3 bits, 001, and 100 in reverse order;

头长度id为1,占用2个bit,为01,逆序后为10;The header length id is 1, occupies 2 bits, is 01, and is 10 in reverse order;

完整的头信息为(从低位到高位:头长度id,版本,SSID,KEY):The complete header information is (from low to high: header length id, version, SSID, KEY):

101010 1111000 100 10,不足32位,高位补0位:101010 1111000 100 10, if it is less than 32 bits, the high bits are filled with 0 bits:

000000 101010 1111000 100 10--》00000010 10101111 00010010000000 101010 1111000 100 10--》00000010 10101111 00010010

从低位开始转化为字节形式为:12 5e 02。Converted to byte form from low order: 12 5e 02.

步骤9、对头信息进行CRC32检验,获得4字节的CRC校验码。Step 9. Perform CRC32 check on the header information to obtain a 4-byte CRC check code.

步骤10、CRC校验码和头信息组成了完成的条目头。条目头的结构如图4所示。In step 10, the CRC check code and the header information form the completed entry header. The structure of the entry header is shown in Figure 4.

封装配置包头(简称包头):Package configuration header (referred to as header):

包头包括:私有前导码,CRC32校验码,包体长度,包类型和3个字节的保留字段。The packet header includes: private preamble, CRC32 check code, packet body length, packet type and a 3-byte reserved field.

私有前导码:存放帧标识,可以为4字节的特殊十六进制数,由实现者协商决定统一值。Private preamble: Stores the frame identifier, which can be a 4-byte special hexadecimal number, and the implementer negotiates to determine the unified value.

CRC校验码:为包体长度所指定的长度的包头后续数据的CRC32校验码。CRC check code: The CRC32 check code of the subsequent data of the packet header of the length specified by the length of the packet body.

包体长度:条目头和各条目的长度之和。Body length: the sum of the length of the entry header and each entry.

包类型:为0,表明为Beacon配置数据。可扩展。Packet type: 0, indicating configuration data for Beacon. Scalable.

保留字段:预留。Reserved field: Reserved.

在传输过程中,包头的私有前导码和CRC校验码需要进行网络字节序的转换,其他数据可不转换。包头的数据结构如图5所示。During the transmission process, the private preamble and CRC check code of the packet header need to be converted to the network byte order, and other data may not be converted. The data structure of the packet header is shown in Figure 5.

将配置包头、条目头、各条目信息组成一个完整的数据段,装载进Beacon的厂商特定字段中,随Beacon广播发送出去。The configuration header, entry header, and each entry information form a complete data segment, loaded into the vendor-specific field of the Beacon, and sent out with the Beacon broadcast.

在本发明的另一个实施方式中,所述广播携带有入网配置数据和帧标识的信标帧的步骤之后,还包括:In another embodiment of the present invention, after the step of broadcasting the beacon frame carrying the network access configuration data and the frame identifier, the method further includes:

记录入网成功的设备的设备信息;Record the device information of the devices successfully connected to the network;

在与所述无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;After the password of the wireless access point is changed, a probe request frame sent by the device is received, and device information and access point information are obtained from the vendor-specific information field of the probe request frame;

将获取的接入点信息与本端接入点信息进行比对;Compare the obtained access point information with the local access point information;

在比对一致时,将获取的设备信息与记录的设备信息进行匹配;When the comparison is consistent, match the acquired device information with the recorded device information;

在匹配成功时,将新的入网配置数据装载进所述信标帧的厂商特定信息字段中后,广播装载有新的入网配置数据的信标帧。When the matching is successful, after the new network access configuration data is loaded into the vendor-specific information field of the beacon frame, the beacon frame loaded with the new network access configuration data is broadcast.

其中设备信息可以选择设备MAC地址,接入点信息可以选择接入点MAC地址。The device information may select the device MAC address, and the access point information may select the access point MAC address.

本发明实施方式可以保证由于AP更换入网配置数据时,仅需要AP端与智能物联设备端参与,减少了对第三方控制程序的依赖,简化了设备配置入网流程,优化了用户体验。The embodiment of the present invention can ensure that when the AP changes the network access configuration data, only the AP and the intelligent IoT device are required to participate, which reduces the dependence on the third-party control program, simplifies the device configuration network access process, and optimizes the user experience.

当然,本实施方式也可以不依赖于上述实施例及各变型实施方式,可以单独实施,也就是说,本发明实施例还提供一种设备入网配置方法,用于无线访问接入点,所述方法包括以下步骤:Of course, this embodiment can also be implemented independently of the above-mentioned embodiment and each variant embodiment, that is to say, the embodiment of the present invention also provides a device network access configuration method, which is used for a wireless access point. The method includes the following steps:

步骤1,记录入网成功的设备的设备信息;Step 1, record the device information of the device successfully connected to the network;

步骤2,在与所述无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;Step 2, after the password of the wireless access point is changed, the detection request frame sent by the device is received, and the device information and the access point information are obtained from the manufacturer-specific information field of the detection request frame;

步骤3,将获取的接入点信息与本端接入点信息进行比对;Step 3, compare the obtained access point information with the local access point information;

步骤4,在比对一致时,将获取的设备信息与记录的设备信息进行匹配;Step 4, when the comparison is consistent, match the acquired device information with the recorded device information;

步骤5,在匹配成功时,将新的入网配置数据装载进所述信标帧的厂商特定信息字段中后,广播装载有新的入网配置数据的信标帧。Step 5: When the matching is successful, after the new network access configuration data is loaded into the vendor-specific information field of the beacon frame, the beacon frame loaded with the new network access configuration data is broadcast.

如图6所示,本发明实施例中一种设备入网配置方法,用于设备端,所述方法包括以下步骤:As shown in FIG. 6 , in an embodiment of the present invention, a device network access configuration method is used for the device end, and the method includes the following steps:

S601,在处于配置状态时,接收路由器发送的信标帧;S601, when in a configuration state, receive a beacon frame sent by a router;

S602,从所述信标帧的厂商特定信息字段中获取所述入网配置数据;S602, obtaining the network access configuration data from the vendor-specific information field of the beacon frame;

S603,基于获取的所述入网配置数据接入网络。S603, access the network based on the acquired network access configuration data.

在本发明的一个实施方式中,所述从所述信标帧的厂商特定信息字段中获取所述入网配置数据的步骤之前,还包括:In an embodiment of the present invention, before the step of acquiring the network access configuration data from the vendor-specific information field of the beacon frame, the method further includes:

从所述信标帧的厂商特定信息字段中搜索用于标识所述信标帧携带入网配置数据的帧标识;Searching from the vendor-specific information field of the beacon frame for a frame identifier used to identify the network access configuration data carried by the beacon frame;

在搜索到所述帧标识时,从所述厂商特定信息字段中获取所述入网配置数据。When the frame identifier is searched, the network access configuration data is acquired from the vendor-specific information field.

进一步说,所述从所述厂商特定信息字段中获取所述入网配置数据;基于获取的所述入网配置数据接入网络的步骤,包括:Further, the step of acquiring the network access configuration data from the vendor-specific information field; the step of accessing the network based on the acquired network access configuration data includes:

从所述信标帧的厂商特定信息字段中获取所述入网配置数据;obtaining the network access configuration data from the vendor-specific information field of the beacon frame;

若所述入网配置数据包括入网密码和服务集标识两种配置信息,基于所述入网密码和所述服务集标识接入网络;If the network access configuration data includes two types of configuration information, a network access password and a service set identifier, access the network based on the network access password and the service set identifier;

若所述入网配置数据包括入网密码一种配置信息,从所述信标帧的SSID字段中获取所述服务集标识,基于所述入网密码和所述服务集标识接入网络。If the network access configuration data includes configuration information such as a network access password, the service set identifier is obtained from the SSID field of the beacon frame, and the network is accessed based on the network access password and the service set identifier.

详细说明本发明实施方式,设备在接收到信标帧后,开始搜索厂商特定信息字段,先搜索包头,在搜索到信标帧时,基于所述包头中的包信息和所述条目头中的头信息,从各配置条目中获取相应配置信息;所述头信息至少包括各配置条目长度信息,所述包信息至少包括配置数据包长度信息。Describing the embodiment of the present invention in detail, after receiving the beacon frame, the device starts to search the manufacturer-specific information field, firstly searches the packet header, and when the beacon frame is searched, based on the packet information in the packet header and the entry header Header information, corresponding configuration information is obtained from each configuration entry; the header information at least includes length information of each configuration entry, and the packet information at least includes configuration data packet length information.

具体说,所述配置包头包括私有前导码、包信息校验码和包信息;所述帧标识具体为所述私有前导码;所述条目头包括头信息校验码和头信息;各所述配置条目包括配置条目校验码和相应配置信息;Specifically, the configuration packet header includes a private preamble, a packet information check code and packet information; the frame identifier is specifically the private preamble; the entry header includes a header information check code and header information; The configuration entry includes the configuration entry check code and the corresponding configuration information;

所述基于所述包头中的包信息和所述条目头中的头信息,从各配置条目中获取相应配置信息的步骤,具体包括:The step of acquiring corresponding configuration information from each configuration entry based on the packet information in the packet header and the header information in the entry header specifically includes:

验证所述包信息校验码,在包信息校验码的验证通过后,提取所述包信息;Verifying the packet information check code, and extracting the packet information after the verification of the packet information check code is passed;

验证所述头信息校验码,在头信息校验码的验证通过后,提取所述头信息;Verifying the header information check code, and extracting the header information after the verification of the header information check code is passed;

分别验证各所述配置条目的条目校验码,在条目校验码的均验证通过后,根据所述包信息和所述头信息确定配置信息的位置,并从确定位置处提取相应配置信息。The entry check codes of the configuration entries are respectively verified, and after all the entry check codes are verified, the location of the configuration information is determined according to the packet information and the header information, and corresponding configuration information is extracted from the determined location.

如图7所示,在本发明的另一个实施方式中,在本发明的另一个实施方式中,所述基于获取的所述入网配置数据接入网络的步骤之后,还包括:As shown in FIG. 7 , in another embodiment of the present invention, in another embodiment of the present invention, after the step of accessing the network based on the acquired network access configuration data, the method further includes:

在与所述无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;When the wireless access point is disconnected due to a wrong password, loading the local device information and the access point information into the vendor-specific information field of the probe request frame;

广播所述探测请求帧;broadcasting the probe request frame;

打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧,从所述信标帧的厂商特定信息字段中获取新的入网配置数据;Turn on the configuration state, receive a beacon frame that carries new network access configuration data broadcast by the wireless access point, and obtain new network access configuration data from the vendor-specific information field of the beacon frame;

基于新的入网配置数据接入网络。The data access network is based on the new network access configuration.

其中,所述设备信息包括设备的MAC地址;所述接入点信息包括接入点的MAC地址。Wherein, the device information includes the MAC address of the device; the access point information includes the MAC address of the access point.

当然图7所示的探测方式,也可以不依赖于图6所示的入网配置方法,可以单独实施。Of course, the detection method shown in FIG. 7 can also be implemented independently of the network access configuration method shown in FIG. 6 .

举一具体应用例,详细说明本发明实施例中方法。A specific application example is given to describe the method in the embodiment of the present invention in detail.

1、智能物联设备进行配置后,在空中接收Beacon报文。1. After the smart IoT device is configured, it receives Beacon messages over the air.

2、接收到Beacon报文后,首先搜索包头内包含的私有前导码。由于厂商特定字段往往存在包尾,推荐从包尾逆序搜索。2. After receiving the Beacon packet, firstly search for the private preamble contained in the packet header. Because the vendor-specific fields often have a packet tail, it is recommended to search from the packet tail in reverse order.

3、搜索到私有前导码后,从该位置提取包头。验证整个配置数据的CRC检验码是否正确。不正确的丢弃该包。3. After searching for the private preamble, extract the packet header from the location. Verify that the CRC check code of the entire configuration data is correct. Incorrectly discard the packet.

4、CRC验证正确后,检测包类型是否是Beacon配置数据。不是的话丢弃该包。4. After the CRC verification is correct, check whether the packet type is the Beacon configuration data. If not, discard the packet.

5、包头验证完成后,从包头后续的数据里,提取条目头信息。5. After the packet header verification is completed, the entry header information is extracted from the subsequent data of the packet header.

6、条目头信息开始四字节为CRC校验码。由于条目头内的头信息最长为6个字节,最少2个字节,所以从2个字节开始,逐步计算该长度的数据的CRC校验值,与接收到的条目头信息内开始的四字节CRC值对比,一致则可确定头信息长度。6. The first four bytes of the entry header information are the CRC check code. Since the header information in the entry header is up to 6 bytes and at least 2 bytes, starting from 2 bytes, the CRC check value of the data of this length is gradually calculated, starting with the received entry header information. If the four-byte CRC value is compared, the length of the header information can be determined if they are consistent.

7、从头信息内解析头长度ID、版本和各条目长度。版本值为1时,版本占用3个bit位,头长度ID占用2个bit位,SSID信息占6个bit位,KEY占用7个bit位。按照头长度ID、版本、SSID、KEY的顺序排列。7. Parse the header length ID, version and the length of each entry from the header information. When the version value is 1, the version occupies 3 bits, the header length ID occupies 2 bits, the SSID information occupies 6 bits, and the KEY occupies 7 bits. Arranged in the order of header length ID, version, SSID, and KEY.

8、从头信息第一个字节开始,将该字节的低2位逆序,为头长度ID。验证该头长度ID映射的头长度是否与第6步中得到的长度值一致,不一致丢弃。8. Starting from the first byte of the header information, reverse the order of the lower 2 bits of the byte, which is the header length ID. Verify whether the header length of the header length ID mapping is consistent with the length value obtained in step 6, and discard if inconsistent.

9、验证完头长度后,从原数据中的下一位开始,逆序后续低三位,为版本。9. After verifying the length of the header, start from the next bit in the original data, and follow the lower three bits in reverse order, which is the version.

10、版本后续低6bit位为SSID,不足从下一字节的低位补齐。逆序该6位bit,获得SSID条目的长度。10. The lower 6 bits of the subsequent version are the SSID, and the insufficient bits are filled from the lower bits of the next byte. Reverse the 6-bit order to get the length of the SSID entry.

11、SSID后续的低7bit位为KEY,不足从下一个字节的低位补齐。逆序该7位bit,获得KEY的长度。11. The subsequent lower 7 bits of the SSID are KEY, which is insufficient to fill in the lower bits of the next byte. Reverse the order of the 7-bit bits to obtain the length of the KEY.

12、验证完头条目后,开始解析各配置条目内的信息。12. After verifying the header entry, start parsing the information in each configuration entry.

13、从配置条目开始位置,取SSID长度的数据,为SSID条目。开头四字节为CRC校验值。首先获取SSID条目内其余数据的CRC校验值,验证是否正确。不正确则丢弃该包。正确的话,将后续数据进行TEA解密。如果存在条目类型和条目长度字段,则验证这两个字段是否正确。其余数据为SSID。13. From the starting position of the configuration entry, take the data of the SSID length as the SSID entry. The first four bytes are the CRC check value. First, obtain the CRC check value of the remaining data in the SSID entry to verify whether it is correct. If it is not correct, the packet is discarded. If correct, the subsequent data is decrypted by TEA. The entry type and entry length fields, if present, are verified to be correct. The rest of the data is the SSID.

14、验证完SSID数据后,从下一字节开始,取KEY长度的数据,为KEY条目。开头四字节为CRC校验值。首先获取KEY条目内其余数据的CRC校验值,验证是否正确。不正确则丢弃该包。正确的话,将后续数据进行TEA解密。如果存在条目类型和条目长度字段,则验证这两个字段是否正确。其余数据为SSID。14. After verifying the SSID data, starting from the next byte, take the data of the KEY length as the KEY entry. The first four bytes are the CRC check value. First, obtain the CRC check value of the remaining data in the KEY entry to verify whether it is correct. If it is not correct, the packet is discarded. If correct, the subsequent data is decrypted by TEA. The entry type and entry length fields, if present, are verified to be correct. The rest of the data is the SSID.

15、得到SSID和KEY后,智能物联设备通过该值连接入网。15. After obtaining the SSID and KEY, the smart IoT device connects to the network through this value.

本发明进一步提供一种设备入网配置装置。The present invention further provides a device network access configuration device.

如图8所示,本发明实施例中一种设备入网配置装置,用于无线访问接入点端,包括:As shown in FIG. 8 , a device network access configuration apparatus in an embodiment of the present invention is used for wireless access to an access point, including:

请求接收模块800,用于接收设备配置入网的请求信息;a request receiving module 800, configured to receive request information for device configuration to access the network;

数据组装模块820,用于将入网配置数据装载进信标帧的厂商特定信息字段中;a data assembly module 820, configured to load the network access configuration data into the vendor-specific information field of the beacon frame;

广播模块840,用于广播所述信标帧。The broadcasting module 840 is configured to broadcast the beacon frame.

本发明实施例中设备入网配置装置可以是无线访问接入点设备,例如路由器,具有路由功能的移动终端;也可以是无线访问接入点设备的一个单独装置。In the embodiment of the present invention, the device network access configuration device may be a wireless access point device, such as a router, a mobile terminal with a routing function; it may also be a separate device of the wireless access point device.

在本发明的一个实施方式中,所述数据组装模块820,还用于获取需要配置入网的设备的厂商信息,根据所述厂商信息,确定用于标识所述信标帧携带入网配置数据的帧标识,将所述帧标识装载进所述信标帧的厂商特定信息字段中。In an embodiment of the present invention, the data assembly module 820 is further configured to acquire manufacturer information of a device that needs to be configured to access the network, and determine, according to the manufacturer information, the frame used to identify the beacon frame that carries the network access configuration data identifier, and the frame identifier is loaded into the vendor-specific information field of the beacon frame.

其中,所述入网配置数据包括入网密码和服务集标识两种配置信息;或者,Wherein, the network access configuration data includes two types of configuration information, a network access password and a service set identifier; or,

所述入网配置数据包括入网密码一种配置信息,所述信标帧的SSID字段中携带有所述服务集标识。The network access configuration data includes configuration information of a network access password, and the service set identifier is carried in the SSID field of the beacon frame.

具体说,所述数据组装模块820,具体用于将所述入网配置数据中配置信息分别封装在对应类型的配置信息条目中;Specifically, the data assembly module 820 is specifically configured to encapsulate the configuration information in the network access configuration data into corresponding types of configuration information entries;

将各所述配置信息条目的长度信息,封装在条目头中;Encapsulate the length information of each of the configuration information entries in the entry header;

确定各所述配置信息条目和所述条目头的长度总和;determining the total length of each of the configuration information entries and the entry header;

将长度总和信息和所述帧标识封装在包头中;Encapsulate the length sum information and the frame identification in the packet header;

将所述包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目装载进所述信标帧的厂商特定信息字段中。The packet header, the type of the configuration information entry, the entry header and each of the configuration information entries are loaded into a vendor specific information field of the beacon frame.

其中,所述配置信息条目的类型包括方式一:入网密码类型和服务集标识类型;或者方式二:入网密码类型。Wherein, the type of the configuration information entry includes the first method: the network access password type and the service set identification type; or the second method: the network access password type.

在本发明的另一个实施方式中,所述装置还包括:In another embodiment of the present invention, the device further comprises:

记录模块,用于记录入网成功的设备的设备信息;The recording module is used to record the device information of the device that successfully accesses the network;

探测请求接收模块,用于在与所述无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;The probe request receiving module is used to receive the probe request frame sent by the device after the password of the wireless access point changes, and obtain the device information and the access point from the manufacturer-specific information field of the probe request frame information;

识别模块,用于将获取的接入点信息与本端接入点信息进行比对;在比对一致时,将获取的设备信息与记录的设备信息进行匹配;在匹配成功时,触发所数据组装模块将新的入网配置数据装载进所述信标帧的厂商特定信息字段中后,使所述广播模块广播装载有新的入网配置数据的信标帧。The identification module is used to compare the obtained access point information with the local access point information; when the comparison is consistent, match the obtained device information with the recorded device information; when the matching is successful, trigger the data After the assembly module loads the new network access configuration data into the vendor-specific information field of the beacon frame, the broadcasting module broadcasts the beacon frame loaded with the new network access configuration data.

当然本实施方式也可以单独实施,即一种设备入网配置装置,其特征在于,所述装置包括:Of course, this embodiment can also be implemented independently, that is, a device network access configuration device, characterized in that the device includes:

记录单元,用于记录入网成功的设备的设备信息;A recording unit, used to record the device information of the device that successfully accesses the network;

探测请求接收单元,用于在与所述无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;The probe request receiving unit is configured to receive the probe request frame sent by the device after the password of the wireless access point changes, and obtain the device information and the access point from the manufacturer-specific information field of the probe request frame information;

识别单元,用于将获取的接入点信息与本端接入点信息进行比对;在比对一致时,将获取的设备信息与记录的设备信息进行匹配;在匹配成功时,将新的入网配置数据装载进所述信标帧的厂商特定信息字段中后,广播装载有新的入网配置数据的信标帧。The identification unit is used to compare the acquired access point information with the local access point information; when the comparison is consistent, the acquired device information is matched with the recorded device information; when the matching is successful, the new After the network access configuration data is loaded into the vendor-specific information field of the beacon frame, the beacon frame loaded with the new network access configuration data is broadcast.

本发明实施例为图1所示方法的装置实施例,在实现本发明实施例中装置时,参阅图1方法实施例。本发明实施例具有以下有益效果:The embodiment of the present invention is an apparatus embodiment of the method shown in FIG. 1 . When implementing the apparatus in the embodiment of the present invention, refer to the method embodiment of FIG. 1 . The embodiment of the present invention has the following beneficial effects:

1、采用成熟的WIFI管理帧作为传递媒介。1. The mature WIFI management frame is used as the transmission medium.

2、使用beacon帧的厂商特定字段来传递配置数据。2. Use the vendor-specific fields of the beacon frame to transfer configuration data.

3、使用配置包头、条目头、配置条目三段形式来封装厂商特定字段数据。3. Encapsulate vendor-specific field data in the form of configuration header, entry header, and configuration entry.

4、采用配置条目的方式封装各条配置信息。4. Encapsulate each piece of configuration information in the form of a configuration entry.

5、对各段数据均使用CRC校验。5. Use CRC check for each segment of data.

6、配置数据在单一包中传递,不存在分包问题。6. The configuration data is transmitted in a single package, and there is no subcontracting problem.

如图9所示,本发明实施例中一种设备入网配置装置,用于设备端,包括:As shown in FIG. 9 , in an embodiment of the present invention, a device network access configuration device is used for the device end, including:

帧接收模块900,用于在处于配置状态时,接收路由器发送的信标帧;The frame receiving module 900 is configured to receive the beacon frame sent by the router when in the configuration state;

配置数据获取模块920,用于从所述信标帧的厂商特定信息字段中获取所述入网配置数据;a configuration data acquisition module 920, configured to acquire the network access configuration data from the vendor-specific information field of the beacon frame;

网络连接模块940,用于基于获取的所述入网配置数据接入网络。The network connection module 940 is configured to access the network based on the acquired network access configuration data.

在本发明的一个实施方式中,所述配置数据获取模块,还用于从所述信标帧的厂商特定信息字段中搜索用于标识所述信标帧携带入网配置数据的帧标识;In an embodiment of the present invention, the configuration data acquisition module is further configured to search for a frame identifier used to identify the network access configuration data carried by the beacon frame from the vendor-specific information field of the beacon frame;

在搜索到所述帧标识时,从所述厂商特定信息字段中获取所述入网配置数据。When the frame identifier is searched, the network access configuration data is acquired from the vendor-specific information field.

进一步说,所述入网配置数据包括入网密码和服务集标识两种配置信息,或者所述入网配置数据包括入网密码一种配置信息,Further, the network access configuration data includes two types of configuration information, a network access password and a service set identifier, or the network access configuration data includes one type of configuration information, a network access password,

所述网络连接模块940,用于若所述入网配置数据包括入网密码和服务集标识两种配置信息,基于所述入网密码和所述服务集标识接入网络;The network connection module 940 is configured to access the network based on the network access password and the service set identifier if the network access configuration data includes two types of configuration information, a network access password and a service set identifier;

若所述入网配置数据包括入网密码一种配置信息,从所述信标帧的SSID字段中获取所述服务集标识,基于所述入网密码和所述服务集标识接入网络。If the network access configuration data includes configuration information such as a network access password, the service set identifier is obtained from the SSID field of the beacon frame, and the network is accessed based on the network access password and the service set identifier.

具体说,所述配置数据获取模块包括标识搜索模块和配置数据获取模块;Specifically, the configuration data acquisition module includes an identification search module and a configuration data acquisition module;

所述标识搜索模块,用于在包头中搜索帧标识;The identification search module is used to search the frame identification in the packet header;

所述配置数据获取模块,用于在搜索到帧标识时,基于所述包头中的包信息和所述条目头中的头信息,从各配置条目中获取相应配置信息;所述头信息至少包括各配置条目长度信息,所述包信息至少包括配置数据包长度信息。The configuration data obtaining module is configured to obtain corresponding configuration information from each configuration entry based on the packet information in the packet header and the header information in the entry header when the frame identifier is searched; the header information at least includes Length information of each configuration entry, the packet information at least includes configuration data packet length information.

具体说,所述配置包头包括私有前导码、包信息校验码和包信息;所述帧标识具体为所述私有前导码;所述条目头包括头信息校验码和头信息;各所述配置条目包括配置条目校验码和相应配置信息;Specifically, the configuration packet header includes a private preamble, a packet information check code and packet information; the frame identifier is specifically the private preamble; the entry header includes a header information check code and header information; The configuration entry includes the configuration entry check code and the corresponding configuration information;

所述所述配置数据获取模块包括:The described configuration data acquisition module includes:

第一验证模块,用于验证所述包信息校验码,在包信息校验码的验证通过后,提取所述包信息;a first verification module, configured to verify the packet information check code, and extract the packet information after the verification of the packet information check code is passed;

第二验证模块,用于验证所述头信息校验码,在头信息校验码的验证通过后,提取所述头信息;a second verification module, configured to verify the header information check code, and extract the header information after the verification of the header information check code is passed;

第三验证模块,用于分别验证各所述配置条目的条目校验码,在条目校验码的均验证通过后,根据所述包信息和所述头信息确定配置信息的位置,并从确定位置处提取相应配置信息。The third verification module is used for verifying the entry check codes of each of the configuration entries respectively, and after all the entry check codes are verified, determine the location of the configuration information according to the packet information and the header information, and determine the location of the configuration information from the The corresponding configuration information is extracted at the location.

在本发明的另一个实施方式中,所述装置还包括:In another embodiment of the present invention, the device further comprises:

请求信息组装模块,用于在与所述无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;A request information assembly module for loading the local device information and the access point information into the vendor-specific information field of the probe request frame when the wireless access point is disconnected due to a password error;

请求广播模块,用于广播所述探测请求帧;a request broadcasting module for broadcasting the probe request frame;

所述帧接收模块,还用于打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧;The frame receiving module is further configured to open the configuration state and receive a beacon frame that carries new network access configuration data broadcast by the wireless access point;

所述配置数据获取模块,还用于从所述信标帧的厂商特定信息字段中获取新的入网配置数据;The configuration data acquisition module is further configured to acquire new network access configuration data from the vendor-specific information field of the beacon frame;

所述网络连接模块,还用于基于新的入网配置数据接入网络。The network connection module is further configured to access the network based on the new network access configuration data.

当然本发明实施方式也可以单独实施,也就是说:Of course, the embodiments of the present invention can also be implemented independently, that is to say:

本发明实施例中一种设备入网配置装置,所述装置包括:In an embodiment of the present invention, a device for configuring network access for a device includes:

请求信息组装单元,用于在与所述无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;a request information assembling unit, configured to load the local device information and the access point information into the vendor-specific information field of the probe request frame when the wireless access point is disconnected due to a password error;

请求广播单元,用于广播所述探测请求帧;a request broadcasting unit for broadcasting the probe request frame;

所述帧接收单元,用于打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧;The frame receiving unit is configured to open a configuration state and receive a beacon frame that carries new network access configuration data broadcast by the wireless access point;

所述配置数据获取单元,用于从所述信标帧的厂商特定信息字段中获取新的入网配置数据;the configuration data acquisition unit, configured to acquire new network access configuration data from the vendor-specific information field of the beacon frame;

所述网络连接单元,用于基于新的入网配置数据接入网络。The network connection unit is configured to access the network based on the new network access configuration data.

本发明实施例为图6所示方法的装置实施例,在实现本发明实施例中装置时,参阅图6方法实施例。本发明实施例具有以下有益效果:The embodiment of the present invention is an apparatus embodiment of the method shown in FIG. 6 . When implementing the apparatus in the embodiment of the present invention, refer to the method embodiment of FIG. 6 . The embodiment of the present invention has the following beneficial effects:

1、该技术方案以现有的成熟技术为依托,利用beacon的自定义字段传递配置数据,兼容效果好,实现成本低。1. The technical solution relies on the existing mature technology and uses the custom fields of beacon to transmit configuration data, which has good compatibility effect and low implementation cost.

2、该技术方案中,仅需要AP端与智能物联设备端参与,减少了对第三方控制程序的依赖,简化了设备配置入网流程,优化了用户体验。2. In this technical solution, only the AP side and the intelligent IoT device side are required to participate, which reduces the dependence on the third-party control program, simplifies the network configuration process of the device, and optimizes the user experience.

3、该技术方案中,去掉了对AP端的特定配置组播/广播帧的依赖,仅扩展beaco帧即可,且配置信息全部包含在一个beacon帧内,有助于减小对网络环境的依赖,提高配置成功率。3. In this technical solution, the dependence on the multicast/broadcast frame of the specific configuration of the AP is removed, and only the beaco frame can be extended, and the configuration information is all contained in a beacon frame, which helps to reduce the dependence on the network environment. , to improve the configuration success rate.

4、该发明采用配置条目的方式来封装配置数据,依靠配置条目长度来确定条目位置,可方便扩展。4. The invention encapsulates the configuration data by means of configuration entries, and determines the location of the entry by the length of the configuration entry, which is convenient for expansion.

虽然本申请描述了本发明的特定示例,但本领域技术人员可以在不脱离本发明概念的基础上设计出来本发明的变型。While this application describes specific examples of the invention, those skilled in the art can devise variations of the invention without departing from the inventive concept.

本领域技术人员在本发明技术构思的启发下,在不脱离本发明内容的基础上,还可以对本发明的方法做出各种改进,这仍落在本发明的保护范围之内。Under the inspiration of the technical concept of the present invention, those skilled in the art can also make various improvements to the method of the present invention without departing from the content of the present invention, which still falls within the protection scope of the present invention.

Claims (18)

1.一种设备入网配置方法,其特征在于,用于无线访问接入点,所述方法包括以下步骤:1. A device network access configuration method, characterized in that, for wireless access point, the method comprises the following steps: 接收设备配置入网的请求信息;Receive the request information for the device to configure the network; 将入网配置数据装载进信标帧的厂商特定信息字段中;Load the network access configuration data into the vendor-specific information field of the beacon frame; 广播所述信标帧;在所述广播所述信标帧的步骤之前,还包括:broadcasting the beacon frame; before the step of broadcasting the beacon frame, further comprising: 获取需要配置入网的设备的厂商信息,根据所述厂商信息,确定用于标识所述信标帧携带入网配置数据的帧标识,将所述帧标识装载进所述信标帧的厂商特定信息字段中;Obtain the manufacturer information of the device that needs to be configured to access the network, determine the frame identifier used to identify the network access configuration data carried in the beacon frame according to the manufacturer information, and load the frame identifier into the manufacturer-specific information field of the beacon frame middle; 所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,其中:The vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header, and each of the configuration information entries, wherein: 将所述入网配置数据中配置信息分别封装在对应类型的配置信息条目中;Encapsulating the configuration information in the network access configuration data in corresponding types of configuration information entries; 将各所述配置信息条目的长度信息,封装在条目头中;Encapsulate the length information of each of the configuration information entries in the entry header; 确定各所述配置信息条目和所述条目头的长度总和;determining the total length of each of the configuration information entries and the entry header; 将长度总和信息和所述帧标识封装在包头中;Encapsulate the length sum information and the frame identification in the packet header; 将所述包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目装载进所述信标帧的厂商特定信息字段中。The packet header, the type of the configuration information entry, the entry header and each of the configuration information entries are loaded into a vendor specific information field of the beacon frame. 2.如权利要求1所述的方法,其特征在于,所述入网配置数据包括入网密码和服务集标识两种配置信息;或者,2. The method according to claim 1, wherein the network access configuration data comprises two types of configuration information: a network access password and a service set identifier; or, 所述入网配置数据包括入网密码一种配置信息,所述信标帧的SSID字段中携带有所述服务集标识。The network access configuration data includes configuration information of a network access password, and the service set identifier is carried in the SSID field of the beacon frame. 3.如权利要求1所述的方法,其特征在于,所述配置信息条目的类型包括方式一:入网密码类型和服务集标识类型;或者方式二:入网密码类型。3 . The method according to claim 1 , wherein the type of the configuration information entry includes the first method: the network access password type and the service set identification type; or the second method: the network access password type. 4 . 4.如权利要求1-3中任意一项所述的方法,其特征在于,所述广播所述信标帧的步骤之后,还包括:4. The method according to any one of claims 1-3, wherein after the step of broadcasting the beacon frame, the method further comprises: 记录入网成功的设备的设备信息;Record the device information of the devices successfully connected to the network; 在与所述无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;After the password of the wireless access point is changed, the probe request frame sent by the device is received, and the device information and the access point information are obtained from the vendor-specific information field of the probe request frame; 将获取的接入点信息与本端接入点信息进行比对;Compare the obtained access point information with the local access point information; 在比对一致时,将获取的设备信息与记录的设备信息进行匹配;When the comparison is consistent, match the acquired device information with the recorded device information; 在匹配成功时,将新的入网配置数据装载进所述信标帧的厂商特定信息字段中后,广播装载有新的入网配置数据的信标帧。When the matching is successful, after the new network access configuration data is loaded into the vendor-specific information field of the beacon frame, the beacon frame loaded with the new network access configuration data is broadcast. 5.一种设备入网配置方法,其特征在于,用于无线访问接入点,所述方法包括以下步骤:5. A device network access configuration method, characterized in that it is used for wireless access to an access point, the method comprising the following steps: 记录入网成功的设备的设备信息;Record the device information of the devices successfully connected to the network; 在与所述无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;After the password of the wireless access point is changed, the probe request frame sent by the device is received, and the device information and the access point information are obtained from the vendor-specific information field of the probe request frame; 将获取的接入点信息与本端接入点信息进行比对;Compare the obtained access point information with the local access point information; 在比对一致时,将获取的设备信息与记录的设备信息进行匹配;When the comparison is consistent, match the acquired device information with the recorded device information; 在匹配成功时,将新的入网配置数据装载进信标帧的厂商特定信息字段中后,广播装载有新的入网配置数据的信标帧;When the matching is successful, after loading the new network access configuration data into the vendor-specific information field of the beacon frame, broadcast the beacon frame loaded with the new network access configuration data; 所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,其中:The vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header, and each of the configuration information entries, wherein: 将所述入网配置数据中配置信息分别封装在对应类型的配置信息条目中;Encapsulating the configuration information in the network access configuration data in corresponding types of configuration information entries; 将各所述配置信息条目的长度信息,封装在条目头中;Encapsulate the length information of each of the configuration information entries in the entry header; 确定各所述配置信息条目和所述条目头的长度总和;determining the total length of each of the configuration information entries and the entry header; 将长度总和信息和帧标识封装在包头中;Encapsulate the length sum information and frame identification in the packet header; 将所述包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目装载进所述信标帧的厂商特定信息字段中。The packet header, the type of the configuration information entry, the entry header and each of the configuration information entries are loaded into a vendor specific information field of the beacon frame. 6.一种设备入网配置方法,其特征在于,用于设备端,所述方法包括以下步骤:6. A device network access configuration method, characterized in that, for the device side, the method comprises the following steps: 在处于配置状态时,接收路由器发送的信标帧;In the configuration state, receive the beacon frame sent by the router; 从所述信标帧的厂商特定信息字段中获取所述入网配置数据;obtaining the network access configuration data from the vendor-specific information field of the beacon frame; 基于获取的所述入网配置数据接入网络;Access the network based on the acquired network access configuration data; 接收路由器发送的信标帧前,还包括:向所述路由器发送配置入网的请求信息;Before receiving the beacon frame sent by the router, the method further includes: sending request information for configuring network access to the router; 所述从所述信标帧的厂商特定信息字段中获取所述入网配置数据的步骤之前,还包括:Before the step of acquiring the network access configuration data from the vendor-specific information field of the beacon frame, the method further includes: 从所述信标帧的厂商特定信息字段中搜索用于标识所述信标帧携带入网配置数据的帧标识;Searching from the vendor-specific information field of the beacon frame for a frame identifier used to identify the network access configuration data carried by the beacon frame; 在搜索到所述帧标识时,从所述厂商特定信息字段中获取所述入网配置数据;Obtaining the network access configuration data from the vendor-specific information field when the frame identifier is searched; 所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,所述包头包括包信息,所述条目头包括头信息,从各配置条目中获取相应配置信息的步骤,具体包括:The vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header, and each of the configuration information entries, the packet header includes packet information, and the entry header includes header information, obtained from each configuration entry The steps for corresponding configuration information include: 提取所述包信息;extract the package information; 提取所述头信息;extract the header information; 根据所述包信息和所述头信息确定配置信息的位置,并从确定位置处提取相应配置信息。The location of the configuration information is determined according to the packet information and the header information, and corresponding configuration information is extracted from the determined location. 7.如权利要求6所述的方法,其特征在于,所述从所述厂商特定信息字段中获取所述入网配置数据;基于获取的所述入网配置数据接入网络的步骤,包括:7. The method of claim 6, wherein the acquiring the network access configuration data from the vendor-specific information field; the step of accessing a network based on the acquired network access configuration data, comprising: 从所述信标帧的厂商特定信息字段中获取所述入网配置数据;obtaining the network access configuration data from the vendor-specific information field of the beacon frame; 若所述入网配置数据包括入网密码和服务集标识两种配置信息,基于所述入网密码和所述服务集标识接入网络;If the network access configuration data includes two types of configuration information, a network access password and a service set identifier, access the network based on the network access password and the service set identifier; 若所述入网配置数据包括入网密码一种配置信息,从所述信标帧的SSID字段中获取所述服务集标识,基于所述入网密码和所述服务集标识接入网络。If the network access configuration data includes configuration information such as a network access password, the service set identifier is obtained from the SSID field of the beacon frame, and the network is accessed based on the network access password and the service set identifier. 8.如权利要求6-7中任意一项所述的方法,其特征在于,所述基于获取的所述入网配置数据接入网络的步骤之后,还包括:8. The method according to any one of claims 6-7, wherein after the step of accessing the network based on the acquired network access configuration data, the method further comprises: 在与无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;When the wireless access point is disconnected due to a wrong password, load the local device information and the access point information into the vendor-specific information field of the probe request frame; 广播所述探测请求帧;broadcasting the probe request frame; 打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧,从所述信标帧的厂商特定信息字段中获取新的入网配置数据;Turn on the configuration state, receive a beacon frame that carries new network access configuration data broadcast by the wireless access point, and obtain new network access configuration data from the vendor-specific information field of the beacon frame; 基于新的入网配置数据接入网络。The data access network is based on the new network access configuration. 9.一种设备入网配置方法,其特征在于,用于设备端,所述方法包括以下步骤:9. A device network access configuration method, characterized in that, for a device end, the method comprises the following steps: 在与无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;When the wireless access point is disconnected due to a wrong password, load the local device information and the access point information into the vendor-specific information field of the probe request frame; 广播所述探测请求帧;broadcasting the probe request frame; 打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧,从所述信标帧的厂商特定信息字段中获取新的入网配置数据;Turn on the configuration state, receive a beacon frame that carries new network access configuration data broadcast by the wireless access point, and obtain new network access configuration data from the vendor-specific information field of the beacon frame; 基于新的入网配置数据接入网络;Based on the new network access configuration data access network; 所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,所述包头包括包信息,所述条目头包括头信息,从各配置条目中获取相应配置信息的步骤,具体包括:The vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header, and each of the configuration information entries, the packet header includes packet information, and the entry header includes header information, obtained from each configuration entry The steps for corresponding configuration information include: 提取所述包信息;extract the package information; 提取所述头信息;extract the header information; 根据所述包信息和所述头信息确定配置信息的位置,并从确定位置处提取相应配置信息。The location of the configuration information is determined according to the packet information and the header information, and corresponding configuration information is extracted from the determined location. 10.如权利要求9所述的方法,其特征在于,所述设备信息包括设备的MAC地址;所述接入点信息包括接入点的MAC地址。10. The method of claim 9, wherein the device information comprises a MAC address of the device; the access point information comprises a MAC address of the access point. 11.一种设备入网配置装置,其特征在于,所述装置包括:11. A device network access configuration device, wherein the device comprises: 请求接收模块,用于接收设备配置入网的请求信息;The request receiving module is used to receive the request information for the device to configure the network; 数据组装模块,用于将入网配置数据装载进信标帧的厂商特定信息字段中;The data assembly module is used to load the network access configuration data into the vendor-specific information field of the beacon frame; 广播模块,用于广播所述信标帧;所述数据组装模块,还用于获取需要配置入网的设备的厂商信息,根据所述厂商信息,确定用于标识所述信标帧携带入网配置数据的帧标识,将所述帧标识装载进所述信标帧的厂商特定信息字段中;The broadcasting module is used to broadcast the beacon frame; the data assembly module is also used to obtain the manufacturer information of the equipment that needs to be configured to enter the network, and according to the manufacturer information, it is determined that the beacon frame carries the network connection configuration data. The frame identification, the frame identification is loaded into the vendor-specific information field of the beacon frame; 所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,所述数据组装模块还用于:The vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header and each of the configuration information entries, and the data assembly module is further configured to: 将所述入网配置数据中配置信息分别封装在对应类型的配置信息条目中;Encapsulating the configuration information in the network access configuration data in corresponding types of configuration information entries; 将各所述配置信息条目的长度信息,封装在条目头中;Encapsulate the length information of each of the configuration information entries in the entry header; 确定各所述配置信息条目和所述条目头的长度总和;determining the total length of each of the configuration information entries and the entry header; 将长度总和信息和所述帧标识封装在包头中;Encapsulate the length sum information and the frame identification in the packet header; 将所述包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目装载进所述信标帧的厂商特定信息字段中。The packet header, the type of the configuration information entry, the entry header and each of the configuration information entries are loaded into a vendor specific information field of the beacon frame. 12.如权利要求11所述的装置,其特征在于,所述入网配置数据包括入网密码和服务集标识两种配置信息;或者,12. The apparatus according to claim 11, wherein the network access configuration data includes two types of configuration information: a network access password and a service set identifier; or, 所述入网配置数据包括入网密码一种配置信息,所述信标帧的SSID字段中携带有所述服务集标识。The network access configuration data includes configuration information of a network access password, and the service set identifier is carried in the SSID field of the beacon frame. 13.如权利要求11-12中任意一项所述的装置,其特征在于,所述装置还包括:13. The apparatus of any one of claims 11-12, wherein the apparatus further comprises: 记录模块,用于记录入网成功的设备的设备信息;The recording module is used to record the device information of the device that successfully accesses the network; 探测请求接收模块,用于在与无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;The detection request receiving module is used to receive the detection request frame sent by the device after the password of the wireless access point changes, and obtain the device information and the access point information from the manufacturer-specific information field of the detection request frame; 识别模块,用于将获取的接入点信息与本端接入点信息进行比对;在比对一致时,将获取的设备信息与记录的设备信息进行匹配;在匹配成功时,触发所数据组装模块将新的入网配置数据装载进所述信标帧的厂商特定信息字段中后,使所述广播模块广播装载有新的入网配置数据的信标帧。The identification module is used to compare the obtained access point information with the local access point information; when the comparison is consistent, match the obtained device information with the recorded device information; when the matching is successful, trigger the data After the assembly module loads the new network access configuration data into the vendor-specific information field of the beacon frame, the broadcasting module broadcasts the beacon frame loaded with the new network access configuration data. 14.一种设备入网配置装置,其特征在于,所述装置包括:14. A device network access configuration device, characterized in that the device comprises: 记录单元,用于记录入网成功的设备的设备信息;A recording unit, used to record the device information of the device that successfully accesses the network; 探测请求接收单元,用于在与无线访问接入点的密码发生变化后,接收到设备发送的探测请求帧,从所述探测请求帧的厂商特定信息字段中获取设备信息和接入点信息;a probe request receiving unit, configured to receive the probe request frame sent by the device after the password of the wireless access point changes, and obtain device information and access point information from the vendor-specific information field of the probe request frame; 识别单元,用于将获取的接入点信息与本端接入点信息进行比对;在比对一致时,将获取的设备信息与记录的设备信息进行匹配;在匹配成功时,将新的入网配置数据装载进信标帧的厂商特定信息字段中后,广播装载有新的入网配置数据的信标帧;The identification unit is used to compare the acquired access point information with the local access point information; when the comparison is consistent, the acquired device information is matched with the recorded device information; when the matching is successful, the new After the network access configuration data is loaded into the vendor-specific information field of the beacon frame, the beacon frame loaded with the new network access configuration data is broadcast; 所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,所述识别单元还用于:The vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header and each of the configuration information entries, and the identification unit is further configured to: 将所述入网配置数据中配置信息分别封装在对应类型的配置信息条目中;Encapsulating the configuration information in the network access configuration data in corresponding types of configuration information entries; 将各所述配置信息条目的长度信息,封装在条目头中;Encapsulate the length information of each of the configuration information entries in the entry header; 确定各所述配置信息条目和所述条目头的长度总和;determining the total length of each of the configuration information entries and the entry header; 将长度总和信息和帧标识封装在包头中;Encapsulate the length sum information and frame identification in the packet header; 将所述包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目装载进所述信标帧的厂商特定信息字段中。The packet header, the type of the configuration information entry, the entry header and each of the configuration information entries are loaded into a vendor specific information field of the beacon frame. 15.一种设备入网配置装置,其特征在于,所述装置包括:15. A device network access configuration device, characterized in that the device comprises: 帧接收模块,用于在处于配置状态时,接收路由器发送的信标帧;The frame receiving module is used to receive the beacon frame sent by the router when it is in the configuration state; 配置数据获取模块,用于从所述信标帧的厂商特定信息字段中获取所述入网配置数据;a configuration data acquisition module, configured to acquire the network access configuration data from the vendor-specific information field of the beacon frame; 网络连接模块,用于基于获取的所述入网配置数据接入网络接收路由器发送的信标帧前,还包括:向所述路由器发送配置入网的请求信息;所述配置数据获取模块,还用于从所述信标帧的厂商特定信息字段中搜索用于标识所述信标帧携带入网配置数据的帧标识;The network connection module is used for, before accessing the network to receive the beacon frame sent by the router based on the acquired network access configuration data, further comprising: sending request information for configuring network access to the router; the configuration data acquisition module is further configured to: Searching from the vendor-specific information field of the beacon frame for a frame identifier used to identify the network access configuration data carried by the beacon frame; 在搜索到所述帧标识时,从所述厂商特定信息字段中获取所述入网配置数据;Obtaining the network access configuration data from the vendor-specific information field when the frame identifier is searched; 所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,所述包头包括包信息,所述条目头包括头信息,从各配置条目中获取相应配置信息的步骤,所述配置数据获取模块具体用于:The vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header, and each of the configuration information entries, the packet header includes packet information, and the entry header includes header information, obtained from each configuration entry The steps of corresponding configuration information, the configuration data acquisition module is specifically used for: 提取所述包信息;extract the package information; 提取所述头信息;extract the header information; 根据所述包信息和所述头信息确定配置信息的位置,并从确定位置处提取相应配置信息。The location of the configuration information is determined according to the packet information and the header information, and corresponding configuration information is extracted from the determined location. 16.如权利要求15所述的装置,其特征在于,所述入网配置数据包括入网密码和服务集标识两种配置信息,或者所述入网配置数据包括入网密码一种种配置信息,16. The apparatus according to claim 15, wherein the network access configuration data includes two kinds of configuration information, a network access password and a service set identifier, or the network access configuration data includes one kind of configuration information of a network access password, 所述网络连接模块,用于若所述入网配置数据包括入网密码和服务集标识两种配置信息,基于所述入网密码和所述服务集标识接入网络;the network connection module, configured to access the network based on the network access password and the service set identifier if the network access configuration data includes two types of configuration information, a network access password and a service set identifier; 若所述入网配置数据包括入网密码一种配置信息,从所述信标帧的SSID字段中获取所述服务集标识,基于所述入网密码和所述服务集标识接入网络。If the network access configuration data includes configuration information such as a network access password, the service set identifier is obtained from the SSID field of the beacon frame, and the network is accessed based on the network access password and the service set identifier. 17.如权利要求15-16中任意一项所述的装置,其特征在于,所述装置还包括:17. The apparatus of any one of claims 15-16, wherein the apparatus further comprises: 请求信息组装模块,用于在与无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;The request information assembly module is used to load the local device information and the access point information into the vendor-specific information field of the probe request frame when the wireless access point is disconnected due to a password error; 请求广播模块,用于广播所述探测请求帧;a request broadcasting module for broadcasting the probe request frame; 所述帧接收模块,还用于打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧;The frame receiving module is further configured to open a configuration state and receive a beacon frame that carries new network access configuration data broadcast by the wireless access point; 所述配置数据获取模块,还用于从所述信标帧的厂商特定信息字段中获取新的入网配置数据;The configuration data acquisition module is further configured to acquire new network access configuration data from the vendor-specific information field of the beacon frame; 所述网络连接模块,还用于基于新的入网配置数据接入网络。The network connection module is further configured to access the network based on the new network access configuration data. 18.一种设备入网配置装置,其特征在于,所述装置包括:18. A device network access configuration device, characterized in that the device comprises: 请求信息组装单元,用于在与无线访问接入点因密码错误断开连接时,将本端设备信息和接入点信息装载进探测请求帧的厂商特定信息字段中;The request information assembly unit is used to load the local device information and the access point information into the vendor-specific information field of the probe request frame when the wireless access point is disconnected due to a password error; 请求广播单元,用于广播所述探测请求帧;a request broadcasting unit for broadcasting the probe request frame; 帧接收模块,用于打开配置状态,接收无线访问接入点广播的携带有新的入网配置数据的信标帧;The frame receiving module is used to open the configuration state and receive the beacon frame that carries the new network access configuration data broadcast by the wireless access point; 配置数据获取单元,用于从所述信标帧的厂商特定信息字段中获取新的入网配置数据;a configuration data acquisition unit, configured to acquire new network access configuration data from the vendor-specific information field of the beacon frame; 网络连接单元,用于基于新的入网配置数据接入网络;a network connection unit for accessing the network based on the new network access configuration data; 所述厂商特定信息字段包括包头、所述配置信息条目的类型、所述条目头和各所述配置信息条目,所述包头包括包信息,所述条目头包括头信息,从各配置条目中获取相应配置信息的步骤,所述配置数据获取模块具体用于:The vendor-specific information field includes a packet header, the type of the configuration information entry, the entry header, and each of the configuration information entries, the packet header includes packet information, and the entry header includes header information, obtained from each configuration entry The steps of corresponding configuration information, the configuration data acquisition module is specifically used for: 提取所述包信息;extract the package information; 提取所述头信息;extract the header information; 根据所述包信息和所述头信息确定配置信息的位置,并从确定位置处提取相应配置信息。The location of the configuration information is determined according to the packet information and the header information, and corresponding configuration information is extracted from the determined location.
CN201610852540.1A 2016-09-26 2016-09-26 Equipment network access configuration method and device Active CN106304245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610852540.1A CN106304245B (en) 2016-09-26 2016-09-26 Equipment network access configuration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610852540.1A CN106304245B (en) 2016-09-26 2016-09-26 Equipment network access configuration method and device

Publications (2)

Publication Number Publication Date
CN106304245A CN106304245A (en) 2017-01-04
CN106304245B true CN106304245B (en) 2020-09-01

Family

ID=57715551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610852540.1A Active CN106304245B (en) 2016-09-26 2016-09-26 Equipment network access configuration method and device

Country Status (1)

Country Link
CN (1) CN106304245B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106686690A (en) * 2017-02-16 2017-05-17 深圳市欣博跃电子有限公司 Network node networking method and network node networking device
CN108391238A (en) * 2018-02-01 2018-08-10 乐鑫信息科技(上海)有限公司 Wireless MESH network matches network method
CN109275196A (en) * 2018-09-20 2019-01-25 广东美的制冷设备有限公司 Wireless communication control method, device and household appliance
CN111935681A (en) * 2019-05-13 2020-11-13 阿里巴巴集团控股有限公司 Intelligent equipment network configuration implementation system, method and equipment
CN113099440A (en) * 2019-12-23 2021-07-09 阿里巴巴集团控股有限公司 Network configuration method, device, equipment and system
CN111586691A (en) * 2020-05-20 2020-08-25 青岛海尔科技有限公司 Method and device for configuring wireless connection and wireless connectable equipment
CN113347580B (en) * 2021-06-07 2023-03-31 美的集团股份有限公司 Intelligent device network distribution method and device, electronic device and storage medium
CN116017506A (en) * 2022-11-30 2023-04-25 普联技术有限公司 Network access method, device and communication equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103415030A (en) * 2013-06-20 2013-11-27 北京傲天动联技术股份有限公司 WIFI terminal configuration updating method and system, WIFI terminal and access point
CN104540126A (en) * 2014-05-16 2015-04-22 生迪光电科技股份有限公司 Method and system for multiple pieces of WI-FI equipment to automatically access specified access point (AP)
CN105813115A (en) * 2016-03-10 2016-07-27 腾讯科技(深圳)有限公司 WIFI network configuration method and device
CN105848250A (en) * 2016-03-14 2016-08-10 上海斐讯数据通信技术有限公司 Method and device for adding icon for service mark set, and terminal for displaying icon

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103415030A (en) * 2013-06-20 2013-11-27 北京傲天动联技术股份有限公司 WIFI terminal configuration updating method and system, WIFI terminal and access point
CN104540126A (en) * 2014-05-16 2015-04-22 生迪光电科技股份有限公司 Method and system for multiple pieces of WI-FI equipment to automatically access specified access point (AP)
CN105813115A (en) * 2016-03-10 2016-07-27 腾讯科技(深圳)有限公司 WIFI network configuration method and device
CN105848250A (en) * 2016-03-14 2016-08-10 上海斐讯数据通信技术有限公司 Method and device for adding icon for service mark set, and terminal for displaying icon

Also Published As

Publication number Publication date
CN106304245A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN106304245B (en) Equipment network access configuration method and device
US10165446B2 (en) Methods and systems for enabling communication with a receiver device in a network
CN106254147B (en) It is a kind of for the configuration method of Wi-Fi network, internet-of-things terminal and control terminal
US10542458B2 (en) Data communication via data packet headers
CN110417840B (en) An information processing method and device
US20150303966A1 (en) Method and apparatus for provisioning profiles
CN108513283A (en) One kind matching network method, equipment, terminal, medium and computer equipment
WO2013104287A1 (en) Method, device, and system for data communication
EP2571224B1 (en) Method for processing messages on m2m platform and m2m platform system
US9635711B1 (en) Mobile broadband management over plurality of operating systems and media
KR20170028298A (en) Data transmission
CN104683994A (en) Wireless network configuration method and wireless network devices
EP2369791B1 (en) Apparatus and method for establishing connections with a plurality of virtual networks
CN112804146B (en) Message transmission method, communication device and system
WO2025001299A1 (en) Security control method and device for electric power communication network, and central coordinator and node
CN105120454B (en) Information transmission method, networking access method and corresponding terminal
CN103458392B (en) A kind of across apply shop time user registering method and system
CN101964976B (en) Terminal authentication method and base station
CN105704710A (en) Wi-Fi (Wireless Fidelity) parameter configuration method
CN103812841A (en) Bypass authentication method, device and system
WO2010097001A1 (en) Data service processing method, system and access network
KR20170119098A (en) Apparatus and method for bluetooth communication
CN112019358A (en) Network configuration method, device, equipment and system
CN115150797A (en) Intelligent device and network connection method thereof, routing device and storage medium
CN102843663B (en) method and system for providing WLAN user access information

Legal Events

Date Code Title Description
C06 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210205

Address after: Room 601-606, 6 / F, Pacific International Building, 106 Zhichun Road, Haidian District, Beijing 100086

Patentee after: HAIER UPLUS INTELLIGENT TECHNOLOGY (BEIJING) Co.,Ltd.

Patentee after: Haier Smart Home Co., Ltd.

Address before: Room 601-606, 6 / F, Pacific International Building, 106 Zhichun Road, Haidian District, Beijing 100086

Patentee before: HAIER UPLUS INTELLIGENT TECHNOLOGY (BEIJING) Co.,Ltd.