WO2018157500A1 - Plc设备的连接方法及plc设备 - Google Patents
Plc设备的连接方法及plc设备 Download PDFInfo
- Publication number
- WO2018157500A1 WO2018157500A1 PCT/CN2017/087747 CN2017087747W WO2018157500A1 WO 2018157500 A1 WO2018157500 A1 WO 2018157500A1 CN 2017087747 W CN2017087747 W CN 2017087747W WO 2018157500 A1 WO2018157500 A1 WO 2018157500A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- plc
- network
- peer device
- key
- authentication
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B3/00—Line transmission systems
- H04B3/54—Systems for transmission via power distribution lines
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
Definitions
- the embodiments of the present application relate to power line communication, and in particular, to a connection method of a PLC device and a PLC device.
- Power Line Communication (PLC) technology refers to a communication method that uses power lines to transmit data and media signals.
- Power cats are terminal communication devices that use this principle, similar to home gateways, except that home gateways use telephone lines or network lines to transmit data, while power cats use power lines to transmit data.
- the power cat modulates the digital wideband signal within a certain signal frequency range and loads it into the 220V mains for transmission, so that at any node in the power grid, the modulated signal in the power grid can be demodulated by another power cat.
- the original wideband digital signal has the purpose of turning the power network into a broadband network.
- the power cat in the prior art has three connection modes.
- the first type is paired by the user pressing the buttons of the two power cats to be connected respectively; the second type is manually input by the user on the configuration IE page of the power cat.
- Another Power Cat's Device Password (DPW), DPW can usually be read from the nameplate of the Power Cat device; the third is manually entered by the user on the Power IE's Configuration IE page.
- the network password (NPW) of a power cat however, the NPW of another power cat also requires the user to read and fill in the configuration page of the power cat connected to the power cat's configuration IE page.
- the above connection process is cumbersome and requires manual operation by the user, causing troubles for the user.
- the embodiment of the present application provides a connection method of a PLC device and a PLC device, which are used to solve the technical problem that the connection of the PLC device in the prior art requires manual operation by the user, the connection efficiency is low, and the operability is poor.
- the embodiment of the present application provides a method for connecting a PLC device, including: determining, according to a first network packet broadcasted by the peer device, whether the peer device is a PLC device;
- the first network is a non-PLC network; if yes, the key device is authenticated with the peer device, and the authentication is passed to establish a power line communication link with the peer device.
- performing secret key authentication with the peer device including: randomly generating a dynamic secret key TK, and encrypting the dynamic secret key TK based on the preset first primary key MK;
- generating an authentication key according to the dynamic key TK includes: encrypting attribute information of the PLC device based on the dynamic key TK to obtain an authentication key.
- generating the authentication key according to the dynamic key TK includes: encrypting the network password NPW of the PLC network of the device based on the dynamic key TK to obtain an authentication key.
- the attribute information of the PLC device includes: the device password DPW of the PLC device, and/or the MAC address of the PLC device.
- the authentication is passed, including: if the second primary key MK preset by the peer device is the same as the first primary key MK, the peer device decrypts the authentication key to obtain the authentication information, and determines Certification passed.
- determining whether the peer device is a PLC device according to the first network packet broadcasted by the peer device includes: detecting a packet on the first network, where the packet includes the identifier peer device The field of the PLC device determines that the peer device is a PLC device.
- the first network includes: a WiFi network, a Bluetooth network, or a wired broadband network.
- the first network comprises a WiFi network
- the first network packet includes: the identifier information of the power line communication included in the custom field of the WiFi message.
- the method further includes broadcasting the first network message on the first network.
- the method further includes: receiving key authentication information broadcast by the peer device;
- the key authentication is performed on the peer device according to the key authentication information, and the authentication is passed to establish a power line communication link with the standby device.
- the secret key authentication information includes: the encrypted dynamic key TK is generated by the peer device encrypting the randomly generated dynamic key TK according to the preset first primary key MK, and further includes: The authentication key generated according to the dynamic secret key TK;
- performing secret key authentication with the peer device includes: decrypting the authentication key according to the encrypted dynamic key TK, and obtaining the authentication information.
- the authentication key is decrypted according to the encrypted dynamic key TK, including: decrypting the encrypted dynamic key TK according to the preset second primary key MK, according to the decrypted
- the dynamic key TK decrypts the authentication key
- the authentication information is obtained after decryption, and the authentication is passed.
- the authentication information is obtained after decryption, including: obtaining the attribute information of the peer device after decryption, and the attribute information includes: the device password DPW of the peer device, and/or the MAC address of the peer device. .
- the method further includes: obtaining the MAC address and the secret obtained after decryption
- the key authentication information identifies the source MAC address of the peer device. If they match, the authentication is confirmed.
- the authentication information is obtained after decryption, including: obtaining the network password NPW of the peer device after decryption.
- the method before determining whether the peer device is a PLC device according to the first network packet broadcasted by the peer device, the method further includes: determining whether the network identifier NID is the same as the network identifier on the PLC network. a peer device; if present, establish a power line communication link with the peer device;
- step of determining whether the peer device is a PLC device according to the first network packet broadcasted by the peer device If it does not exist, perform the step of determining whether the peer device is a PLC device according to the first network packet broadcasted by the peer device.
- the method before performing secret key authentication with the peer device, the method further includes: acquiring a signal strength of the first network of the peer device;
- the key device is authenticated with the peer device.
- the method further includes: determining that the peer device with the same network identifier NID does not exist on the PLC network, Then the historical power line communication link record of the PLC device on the PLC network is cleared.
- the method further includes: sending a request message for establishing a power line communication link with the peer device on the PLC network;
- the method further includes: receiving a request message sent by the peer device to establish a power line communication link;
- the method further includes: determining that the peer device with the same network identifier NID does not exist on the PLC network, And determining, according to the MAC address of the peer device, whether a power line communication link is established with the peer device, and if yes, sending a request message for establishing a power line communication link with the peer device;
- an embodiment of the present application provides a power line communication PLC device, including:
- the determining module is configured to determine, according to the first network packet broadcasted by the peer device, whether the peer device is a PLC device, where the first network is a non-PLC network;
- the authentication module is configured to perform secret key authentication with the peer device when the determining module determines that the peer device is a PLC device;
- the authentication module includes:
- An encryption sub-module configured to randomly generate a dynamic secret key TK, encrypt the dynamic secret key TK based on the preset first primary key MK; generate an authentication key according to the dynamic secret key TK;
- the sending submodule is configured to broadcast the encrypted dynamic key TK and the authentication key, so that the peer device decrypts the authentication key according to the encrypted dynamic key TK.
- the encryption sub-module is specifically used for the genus of the PLC device based on the dynamic key TK.
- the sexual information is encrypted to obtain the authentication key.
- the encryption sub-module is specifically used to encrypt the network password NPW of the PLC network of the device based on the dynamic key TK to obtain an authentication key.
- the attribute information of the PLC device includes:
- the device password DPW of the PLC device, and/or the MAC address of the PLC device are used to store the PLC data.
- the authentication module is specifically configured to: when the second master key MK preset by the peer device is the same as the first master key MK, the peer device decrypts the authentication key to obtain the authentication information. , to determine the certification passed.
- the decision module includes:
- a detecting submodule configured to detect a packet on the first network
- the determining submodule is configured to determine that the peer device is a PLC device when the detecting module detects that the message includes a field identifying that the peer device is a PLC device.
- the first network includes: a WiFi network, a Bluetooth network, or a wired broadband network.
- the first network includes a WiFi network; correspondingly, the first network message includes: the identification information including the power line communication in the custom field of the WiFi message.
- the PLC device is a device that does not establish a power line communication link with any PLC device, the PLC device further includes:
- the broadcast module is configured to broadcast the first network packet on the first network.
- the PLC device also includes:
- a receiving module configured to receive secret key authentication information broadcast by the peer device
- the authentication module is further configured to perform secret key authentication with the peer device according to the key authentication information.
- the secret key authentication information includes: the encrypted dynamic key TK is generated by the peer device encrypting the randomly generated dynamic key TK according to the preset first primary key MK, and further includes: The authentication key generated according to the dynamic key TK; correspondingly, the authentication module includes:
- the decryption sub-module is configured to decrypt the authentication key according to the encrypted dynamic key TK to obtain the authentication information.
- the decryption sub-module is specifically configured to decrypt the encrypted dynamic key TK according to the preset second primary key MK, and perform the authentication key according to the decrypted dynamic key TK. Decryption; when the second master key MK is the same as the first master key MK, the authentication information is obtained after decryption, and the authentication is passed.
- the decryption sub-module is specifically used to obtain the attribute information of the peer device after decryption, and the attribute information includes: the device password DPW of the peer device, and/or the MAC address of the peer device.
- the authentication module further includes:
- the comparison sub-module is configured to compare the MAC address obtained after the decryption with the source MAC address of the peer device in the key authentication information. If they are consistent, the authentication is confirmed.
- the decryption sub-module is specifically used to obtain the network password NPW of the peer device after decryption.
- the PLC device further includes:
- the establishing module is further configured to: after the determining module determines that the peer device with the same network identifier NID exists on the PLC network, establish a power line communication link with the peer device;
- the determining module is further configured to: after the determining module determines that the peer device that is the same as the network identifier NID of the network is not present on the PLC network, perform the first network packet broadcasted according to the peer device, and determine whether the peer device is a PLC device. .
- the PLC device further includes:
- An acquiring module configured to acquire a signal strength of the first network of the peer device
- the authentication module is further configured to perform secret key authentication with the peer device when the signal strength of the first network of the peer device meets the preset threshold.
- the PLC device further includes:
- the clearing module is configured to clear the historical power line communication link record of the PLC device on the PLC network after determining that there is no peer device with the same network identifier NID on the PLC network.
- the PLC device further includes:
- a sending module configured to send, on the PLC network, a request message for establishing a power line communication link with the peer device;
- the receiving module is configured to receive a response message of the accept request message fed back by the peer device, so that the establishing module establishes a power line communication link with the peer device.
- the receiving module is further configured to receive a request message for establishing a power line communication link sent by the peer device, and to open a waiting indication identifier for waiting to establish a power line communication link with the peer device;
- the peer device establishes a trigger message of the power line communication link, and closes the waiting indication flag;
- the sending module is further configured to send a response message accepting the request message, so that the establishing module establishes a power line communication link with the peer device.
- the determining module is further configured to: after determining that the peer device that is the same as the network identifier NID of the network is not present on the PLC network, determine whether the pair has been paired according to the MAC address of the peer device.
- the end device establishes a power line communication link; if yes, sends a request message for establishing a power line communication link with the peer device; if not, detecting whether the signal strength of the peer device is within a preset threshold range, and if so, sending and correcting
- the end device establishes a request message for the power line communication link.
- the PLC device includes at least one of the following: a PLC device of an integrated router, a PLC device integrated with a wireless network card, and a PLC device integrated with a wired network interface.
- connection method of the PLC device and the PLC device provided by the embodiment of the present application confirm the identity of each other as a PLC device according to the message exchanged between the PLC devices, and perform mutual key authentication after confirming the identity.
- Information after successful authentication, automatically realize the connection between PLC devices. Therefore, the prior art needs to confirm that the PLC devices need to be connected, and manually complete the connection between the PLC devices, the connection efficiency is low, the operability is poor, and the rapid connection between the PLC devices is realized. It ensures the accuracy and safety of the connection between PLC devices and improves the efficiency of successful connection of PLC devices.
- various key authentication methods provided by the embodiments of the present application can meet diverse connection requirements.
- the embodiment of the present application provides a solution for determining whether to connect a PLC device according to the strength of the network signal, thereby further ensuring the accuracy of the connection between the PLC devices.
- FIG. 1 is a schematic diagram of a networking environment of a connection method of a PLC device provided by the present application
- FIG. 2 is a schematic flowchart of a connection method of a PLC device according to an embodiment of the present disclosure
- FIG. 3 is a schematic flowchart of a connection method of a PLC device according to another embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a frame of a WiFi packet in the embodiment shown in FIG. 3;
- FIG. 5 is a standard protocol flow for connecting a PLC device on a PLC network in the embodiment shown in FIG. 3;
- FIG. 6 is a schematic flowchart of a connection method of a PLC device according to another embodiment of the present application.
- FIG. 7 is a schematic diagram of an interaction process of a PLC device connection in the embodiment shown in FIG. 3 and FIG. 6;
- FIG. 8 is a schematic structural diagram of a PLC device according to an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of a PLC device according to another embodiment of the present application.
- the networking environment of the present application is introduced.
- the PLC device 1 power cat
- the solution of the present application can be disposed in a plurality of rooms having compartments, and the PLC device 1 is inserted in the power source of the power line 2.
- network data is transmitted between the respective PLC devices 1 through the power line 2.
- the user's Internet terminal device 3 such as a computer, a PAD, a mobile phone, etc., can receive the power line network data transmitted by the PLC device 1 through the network cable 4 or the wireless network card 5, wherein the PLC device 1 integrates at least one of the following functions, and is integrated on the PLC device 1
- a router 6 a wired network interface is integrated on the PLC device 1, and a wireless network card 5 is integrated on the PLC device, which can perform wired or wireless WiFi communication.
- FIG. 2 is a schematic flowchart of a connection method of a PLC device according to an embodiment of the present invention. As shown in FIG. 2, the embodiment provides a connection method of a PLC device, including:
- Step 201 The PLC device determines, according to the first network packet broadcasted by the peer device, whether the peer device is a PLC device.
- the packet on the first network is detected, for example, the beacon beacon is detected, wherein the first network is a non-PLC network, for example, through a WiFi network.
- a Bluetooth network or the like is connected to the power line network. Therefore, the PLC device can not only connect through the power line, but also can connect through other networks to achieve fast connection in multiple ways. If the PLC device detects the message of the first network, it can judge whether the device that sent the message is a PLC device according to the information in the message, and if it is a PLC device, select to connect with the device, if not, the PLC device does not select the message. Respond to a targeted and fast target to the target PLC device.
- Step 202 The peer device is a PLC device, and performs secret key authentication with the peer device, and the authentication establishes a power line communication link with the peer device.
- the identity of the peer device needs to be verified, and the key communication can be performed with the peer device to establish a PLC communication chain with the peer device that passes the authentication. road.
- the key authentication is required to ensure the security of the PLC network connection.
- the PLC device automatically recognizes the broadcast message, and determines that the opposite end is the PLC device.
- the authentication information is sent, and the quick connection of the connection relationship is automatically established after the authentication is completed, thereby solving the cumbersome connection process in which the user needs to manually input the identification information of the peer PLC device in the prior art.
- the connection method of the PLC device is to determine whether the peer device is a PLC device according to the first network packet broadcasted by the peer device; wherein, the first network is a non-PLC network; if yes, performing with the peer device Key authentication, the authentication pass establishes a power line communication link with the peer device.
- the PLC devices can communicate with each other through the message, confirm the identity and automatically complete the key authentication, and automatically establish the connection of the PLC device automatically without the user's manual operation, thereby improving the efficiency of the connection of the PLC device.
- FIG. 3 is a schematic flowchart of a connection method of a PLC device according to another embodiment of the present invention. As shown in FIG. 3, on the basis of the foregoing embodiment, the embodiment provides a connection method of a PLC device, including:
- Step 301 Detect a packet on the first network. If the packet includes a field identifying that the peer device is a PLC device, determine that the peer device is a PLC device.
- Step 302 Randomly generate a dynamic secret key TK, and encrypt the dynamic secret key TK based on the preset first primary key MK.
- the master key is the Manufacture Key (MK), which is usually the key that is preset by the manufacturer in the PLC device before the PLC device leaves the factory.
- MK Manufacture Key
- PLC devices of the same model may have the same MK, or PLC devices shipped from the same manufacturer have the same MK. Therefore, it is not safe to perform identification of PLC devices based solely on MK. Because neighbors are likely to have the same brand of PLC equipment as their own, the MKs of the two companies are likely to be the same. Therefore, it is also necessary to carry further authentication information in step 303.
- the traffic key (TK) is a randomly generated temporary key. The preset MK is used to encrypt the TK, and the encrypted TK is sent to the peer device.
- Step 303 Generate an authentication key according to the dynamic key TK, and broadcast the encrypted dynamic key TK and the authentication key, so that the peer device decrypts the verified key according to the encrypted dynamic key TK.
- the generation of the authentication key according to the dynamic key TK may include the following two methods: 1) encrypting the attribute information of the PLC device based on the dynamic key TK to obtain an authentication key.
- the attribute information of the PLC device may include: a device password (DPW) of the PLC device, that is, information input by the user in the user interface in the prior art, and/or a MAC address of the PLC device.
- DGW device password
- NPW network password
- the preset MK is used to encrypt the TK
- the TK is used to encrypt the DPW and/or the MAC to obtain the authentication key
- the TK is used to encrypt the NPW to obtain the authentication key.
- the duration of the authentication key multicast is controlled within a preset duration. For example, the transmission duration of the key authentication information is controlled within 2 minutes.
- Step 304 After the authentication is passed, establish a power line communication link with the peer device.
- the same main key MK is pre-configured internally, that is, if the second master key MK preset by the peer device and the PLC device that broadcasts the authentication key information are If the first master key MK is the same, the peer device can correctly decrypt the authentication key with its second master key to obtain the authentication information. For example, if the peer device decrypts the device password DPW in step 303, the MAC address of the PLC device, and the network password NPW of the PLC device by using the second master key MK, the peer device can determine that the authentication is passed.
- the two PLC devices can pass the PLC standard protocol flow (as shown in Figure 5, where PLC-A and PLC-B represent the two PLC devices after the key authentication is passed.
- the standard protocol flow is prior art. , do not repeat here, to achieve the PLC communication link of the two devices. If the second master key MK cannot successfully decrypt the TK, the DPW, MAC, NPW and other information cannot be decrypted naturally. Therefore, the authentication is unsuccessful and the two PLC devices cannot be connected.
- the MK is a factory-preset factory key
- the neighboring home and the own PLC device have the same MK. Therefore, the first network of the peer device can be obtained before the key authentication information is sent. Signal strength; if the signal strength of the first network of the peer device meets the preset threshold, the key device is authenticated with the peer device. Therefore, the security of the PLC device link is further ensured, and only the PLC device within the preset range is connected.
- the preset threshold of the signal strength can be set according to the performance of the PLC product, for example, -45 dBm.
- FIG. 6 is a schematic flowchart of a connection method of a PLC device according to another embodiment of the present invention. As shown in FIG. 6 , on the basis of the foregoing embodiment, the embodiment provides a connection method of a PLC device, including:
- Step 601 Broadcast a first network packet on the first network.
- the PLC device is a device that does not establish a power line communication link with any PLC device, that is, the PLC device may be the device that accesses the PLC network for the first time, or may not have established a PLC with other PLC devices.
- the linked device may also be disconnected from the other PLC device because the network is unstable.
- the PLC device periodically broadcasts the first network message on the first network to make other PLCs listening to the channel.
- the device receives the first network packet of its unconnected state, and learns that there are other PLC devices in the channel requesting to establish a connection.
- Step 602 Receive secret key authentication information broadcast by the peer device.
- the secret key authentication information may include: the peer device encrypts the randomly generated dynamic secret key TK according to the preset first primary key MK, and generates the encrypted dynamic secret key TK; according to the dynamic secret key TK The generated authentication key.
- Step 603 Perform secret key authentication according to the secret key authentication information and the peer device.
- the authentication key needs to be decrypted according to the received encrypted dynamic key TK to obtain the authentication information.
- the encrypted dynamic key TK first needs to decrypt the encrypted dynamic key TK according to the preset second primary key MK, and decrypt the authentication key according to the decrypted dynamic key TK;
- the master key MK is the same as the first master key MK, and after decryption, the authentication information can be obtained, and the authentication is confirmed to pass.
- the same main key MK is pre-configured internally, that is, if the second master key MK preset by the peer device and the PLC device that broadcasts the authentication key information are first If the primary key MK is the same, the peer device can decrypt the authentication key with its second primary key to obtain the authentication information. For example, successfully decrypting the device password DPW of the PLC device in step 303 in the previous embodiment, and the PLC device The authentication information such as the MAC address and the network password NPW of the PLC device can be determined after the information is obtained. Next, the two PLC devices can realize the PLC communication link of the two devices through the PLC standard protocol flow shown in Figure 5.
- the authentication information may include: attribute information of the peer device obtained after the decryption, where the attribute information includes: a device password DPW of the peer device, and/or a MAC address of the peer device. If the attribute information of the peer device is obtained after the decryption, the MAC address of the peer device is compared with the source MAC address of the peer device in the key authentication information. If they are consistent, confirm that the certification is passed.
- the authentication information may further include: a network password NPW of the peer device obtained after decryption.
- Step 604 After the authentication is passed, establish a power line communication link with the peer device.
- FIG. 7 is a schematic diagram of the interaction process of the PLC device connection in the embodiment shown in FIG. 3 and FIG. 6. As shown in FIG. 7, the first network packet in the embodiment is described by taking a WiFi packet as an example.
- Step 701 determining whether the PLC network is There is a step of the same peer device as its own Network Identifier (NID); wherein, the NID is the network name formed by the PLC device on the power line, and the NID of the successfully paired PLC device is the same. If yes, a power line communication link is established with the peer device based on the PLC standard protocol flow shown in FIG. 5; if not, step 702 is performed.
- NID Network Identifier
- Step 702 Receive a first network packet broadcast by the peer device PLC2.
- Step 703 Determine whether the peer device PLC2 is a PLC device. If it is judged that the peer device PLC2 is a PLC device, and it is judged that the first network signal strength of the peer device is within the threshold range, the TK is randomly generated, the preset MK is used to encrypt the TK, and the TK is used to encrypt the DPW and the MAC. (TK can also be used to encrypt and send NPW in this step)
- Step 704 Send a Probe request IE field, where the authentication information in step 703 is carried.
- the encrypted TK and the encrypted DPW and MAC information may be sent in the same Probe request IE field, or may be sent in two frames.
- Step 705 When PLC2 detects that PLC1 is a PLC device, and its signal strength is within a preset range, the preset MK is used to decrypt TK, and TK decrypts DPW and MAC to determine whether the decrypted MAC is equal to the MAC of the PLC device.
- the MAC obtained after decryption is equal to the MAC address of the source address to which the frame is sent, it can be determined that the identity of PLC1 is correct. If it is not equal, it may be that other PLC devices intercept the authentication information being transmitted, and the impersonation is sent. Therefore, the security of the secret key authentication can be further ensured by MAC verification.
- Step 706 successfully decrypting, and confirming that the MACs are equal, execute the PLC standard protocol flow (shown in Figure 5).
- the method further includes: clearing the historical power line communication link record of the PLC device on the PLC network.
- a request message for establishing a power line communication link with the peer device is sent on the PLC network.
- Receiving a response message of the accept request message fed back by the peer device establishing a power line communication link with the peer device. Since the PLC network communication protocol stipulates that PLC network communication can only be performed between PLC devices having the same NID, therefore, for a PLC device that is not first connected to the network, the historical NID information of the previous link may be stored internally, therefore, Before sending a link request, you can clear the historical power line communication link record to improve link efficiency.
- the PLC device transmits and receives a message for establishing a PLC link on the PLC network, and the process may be performed in parallel or serially with the first network establishing link in the foregoing embodiment, whether in parallel or serial execution.
- the purpose is to establish links between PLC devices as quickly as possible and speed up the link rate.
- the PLC device that receives the request message for establishing the power line communication link sent by the peer device, after receiving the request message, turns on the waiting indication flag waiting to establish a power line communication link with the opposite device;
- the user triggers a trigger message for establishing a power line communication link with the peer device, turns off the wait indication flag, sends a response message accepting the request message, and establishes a power line communication link with the peer device.
- the waiting indication indicator can set an indicator light on the PLC device.
- the indicator light is illuminated, prompting the user to wait for waiting for connection with the opposite device, and the PLC device
- the button may also be provided to enable the user to press the button as a trigger message for accepting the power line communication link with the peer device, and the PLC device closes the waiting indication flag after receiving the trigger message of the user pressing the button, that is, the indicator light is turned off, and A response message is sent to the peer device to enable the two PLC devices to establish a PLC link.
- the method may further include: determining that the peer device that is the same as the network identifier NID of the network does not exist on the PLC network, The MAC address of the peer device determines whether a power line communication link has been established with the peer device, and if so, sends a request message for establishing a power line communication link with the peer device; if not, detecting whether the signal strength of the peer device is Within the preset threshold range, if yes, a request message is sent to establish a power line communication link with the peer device.
- the step of judging the signal strength can be eliminated, thereby speeding up the link rate.
- This step can also be performed in parallel or serially by the first network establishing link in the foregoing embodiment, whether in parallel or serial execution, and the purpose is also to establish a link between PLC devices as soon as possible, and to speed up the link rate.
- FIG. 8 is a schematic structural diagram of a PLC device according to an embodiment of the present invention.
- the power line communication PLC device includes: a determining module 81, configured to determine, according to the first network packet broadcasted by the peer device, Whether the terminal device is a PLC device; wherein, the first network is a non-PLC network; the authentication module 82 is configured to perform secret key authentication with the peer device when the determining module 81 determines that the peer device is a PLC device; After the authentication module 82 confirms that the authentication is passed, a power line communication link is established with the peer device.
- the power line communication PLC device determines whether the peer device is a PLC device according to the first network packet broadcasted by the peer device; wherein the first network is a non-PLC network; if yes, the secret device is secreted with the peer device. Key authentication, the authentication pass establishes a power line communication link with the peer device. Thereby, the PLC devices can communicate with each other through the message, confirm the identity and automatically complete the key authentication, and automatically establish the connection of the PLC device automatically without the user's manual operation, thereby improving the efficiency of the connection of the PLC device.
- FIG. 9 is a schematic structural diagram of a PLC device according to another embodiment of the present application.
- the authentication module 82 includes: an encryption submodule 821, configured to randomly generate a dynamic key. TK, based on the preset first master key MK encryption dynamic key TK; generating an authentication key according to the dynamic key TK; the sending sub-module 822 is configured to broadcast the encrypted dynamic key TK and the authentication key, so that The peer device decrypts the authentication key according to the encrypted dynamic key TK.
- the encryption submodule 821 is specifically configured to encrypt the attribute information of the PLC device based on the dynamic key TK to obtain an authentication key.
- the encryption submodule 821 is specifically configured to encrypt the network password NPW of the PLC network of the device based on the dynamic secret key TK to obtain an authentication key.
- the attribute information of the PLC device includes: a device password DPW of the PLC device, and/or a MAC address of the PLC device.
- the authentication module 82 is specifically configured to: when the second master key MK preset by the peer device is the same as the first master key MK, the peer device decrypts the authentication key to obtain the authentication information, and then determines the authentication. by.
- the determining module 81 includes: a detecting submodule 811, configured to detect a packet on the first network; and a determining submodule 812, configured to: when the detecting module detects that the packet includes a field identifying that the peer device is a PLC device When it is determined that the peer device is a PLC device.
- the first network comprises: a WiFi network, a Bluetooth network or a wired broadband network.
- the first network includes a WiFi network.
- the first network packet includes: identifier information that includes power line communication in a custom field of the WiFi packet.
- the PLC device further includes: a broadcast module 84, configured to broadcast the first network packet on the first network.
- the PLC device further includes: a receiving module 85, configured to receive the key authentication information broadcasted by the peer device; and the authentication module 82 is further configured to perform secret key authentication with the peer device according to the key authentication information.
- the key authentication information includes: the peer device encrypts the randomly generated dynamic secret key TK according to the preset first primary key MK, and the generated encrypted dynamic key TK, further includes: according to the dynamic key The authentication key generated by the TK; correspondingly, the authentication module 82 includes:
- the decryption sub-module 823 is configured to decrypt the authentication key according to the encrypted dynamic key TK to obtain authentication information.
- the decryption sub-module 823 is configured to decrypt the encrypted dynamic key TK according to the preset second primary key MK, and decrypt the authentication key according to the decrypted dynamic key TK;
- the second master key MK is the same as the first master key MK, and then the authentication information is obtained after decryption, and the authentication is passed.
- the decryption sub-module 823 is configured to obtain the attribute information of the peer device after the decryption, and the attribute information includes: a device password DPW of the peer device, and/or a MAC address of the peer device.
- the authentication module 82 further includes:
- the comparison sub-module 824 is configured to compare the MAC address obtained after decryption with the source MAC address of the peer device in the key authentication information. If they are consistent, the authentication is confirmed to pass.
- the decryption sub-module 823 is specifically configured to obtain the network password NPW of the peer device after decryption.
- the method further includes: a determining module 86, configured to determine whether there is a peer device that is the same as its own network identifier NID on the PLC network; and the establishing module 83 is further configured to determine, at the determining module 86, that the PLC network exists After the network identifier of the NID is the same as the peer device, the power line communication link is established with the peer device.
- the determining module 81 is further configured to determine, at the determining module 86, that the peer end with the same network identifier NID does not exist on the PLC network. After the device performs the first network packet broadcasted by the peer device, it is determined whether the peer device is a PLC device.
- the method further includes: an obtaining module 87, configured to acquire a signal strength of the first network of the peer device; and an authentication module 82, configured to: when the signal strength of the first network of the peer device meets a preset threshold, Peer device Perform secret key authentication.
- the method further includes: a clearing module 88, configured to clear a historical power line communication link record of the PLC device on the PLC network after determining that the peer device that is the same as the network identifier NID of the network is not present on the PLC network.
- a clearing module 88 configured to clear a historical power line communication link record of the PLC device on the PLC network after determining that the peer device that is the same as the network identifier NID of the network is not present on the PLC network.
- the sending module 89 is configured to send a request message for establishing a power line communication link with the peer device on the PLC network
- the receiving module 810 is configured to receive a response message of the accept request message fed back by the peer device, So that the setup module 83 establishes a power line communication link with the peer device.
- the receiving module 810 is further configured to receive a request message for establishing a power line communication link sent by the peer device, open a waiting indication identifier for waiting to establish a power line communication link with the peer device, and receive the user-triggered and peer device.
- the trigger message of the power line communication link is established, and the waiting indication identifier is closed.
- the sending module 89 is further configured to send a response message of the accept request message, so that the establishing module establishes a power line communication link with the peer device.
- the determining module 81 is further configured to: after determining that the peer device that is the same as the network identifier NID of the network is not present on the PLC network, determine whether the peer device is established with the peer device according to the MAC address of the peer device. a power line communication link; if yes, sending a request message for establishing a power line communication link with the peer device; if not, detecting whether the signal strength of the peer device is within a preset threshold range, and if yes, transmitting and establishing with the peer device Request message for the power line communication link.
- the PLC device comprises at least one of the following devices: a PLC device integrated with the router, a PLC device integrated with the wireless network card, and a PLC device integrated with the wired network interface.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)
- Small-Scale Networks (AREA)
Abstract
本申请公开了一种PLC设备的连接方法及PLC设备,通过根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备;其中,第一网络为非PLC网络;若是,与对端设备进行秘钥认证,认证通过则与对端设备建立电力线通信链路。从而实现PLC设备之间通过报文交互,确认身份并自动完成秘钥认证,快速建立PLC设备的连接,提高了PLC设备连接的效率。
Description
本申请要求于2017年03月03日提交中国专利局、申请号为201710124835.1、发明名称为“一种电力猫连接的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及电力线通信,尤其涉及一种PLC设备的连接方法及PLC设备。
电力线通信(Power Line Communication,PLC)技术是指利用电力线传输数据和媒体信号的一种通信方式。电力猫是利用这种原理的一种终端通信设备,和家庭网关类似,只不过家庭网关使用电话线或者网线传输数据,而电力猫使用电力线传输数据。电力猫把数字宽带信号调制在一定的信号频率范围内并加载到220V市电中进行传输,这样在电网范围内的任何一个节点上,都可以通过另一个电力猫把电网中调制信号解调成原来的宽带数字信号,达到把电源网变成宽带网络的目的。
现有技术中的电力猫有三种连接方式,第一种是通过用户分别按下需要连接的两个电力猫的按键进行配对;第二种是由用户在一电力猫的配置IE页面上手动输入另一电力猫的设备密码(Device Password,DPW),DPW通常可以从电力猫设备的铭牌上进行读取;第三种是由用户在一电力猫的配置IE页面上手动输入需要进行连接的另一电力猫的网络密码(Network Password,NPW),然而另一电力猫的NPW还需要用户在该电力猫的配置IE页面中读取并填入与之连接的电力猫的配置页面中。上述连接过程较为繁琐,都必须用户手动操作,给用户造成设置困扰。
发明内容
本申请实施例提供一种PLC设备的连接方法及PLC设备,用于解决现有技术中PLC设备连接需要用户手动操作,连接效率低,可操作性差的技术问题。
第一方面,本申请实施例提供了一种PLC设备的连接方法,包括:根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备;
其中,第一网络为非PLC网络;若是,与对端设备进行秘钥认证,认证通过则与对端设备建立电力线通信链路。
在一种可能的设计中,与对端设备进行秘钥认证,包括:随机生成动态秘钥TK,基于预置的第一主秘钥MK加密所述动态秘钥TK;
根据所述动态秘钥TK生成认证秘钥,广播加密后的动态秘钥TK和认证秘钥,以使对端设备根据所述加密后的动态秘钥TK对所述认证秘钥进行解密。
在一种可能的设计中,根据动态秘钥TK生成认证秘钥,包括:基于动态秘钥TK对PLC设备的属性信息进行加密,得到认证秘钥。
在一种可能的设计中,根据动态秘钥TK生成认证秘钥,包括:基于动态秘钥TK对设备的PLC网络的网络密码NPW进行加密,得到认证秘钥。
在一种可能的设计中,PLC设备的属性信息包括:PLC设备的设备密码DPW,和/或,PLC设备的MAC地址。
在一种可能的设计中,认证通过,包括:若对端设备预置的第二主秘钥MK与第一主秘钥MK相同,则对端设备对认证秘钥解密获取到认证信息,确定认证通过。
在一种可能的设计中,根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备,包括:检测第一网络上的报文,若报文中包含标识对端设备为PLC设备的字段,则确定对端设备是PLC设备。
在一种可能的设计中,第一网络包括:WiFi网络,蓝牙网络或有线宽带网络。
在一种可能的设计中,第一网络包括WiFi网络;
相应的,第一网络报文包括:在WiFi报文的自定义字段中包含有电力线通信的标识信息。
在一种可能的设计中,若PLC设备为未与任何PLC设备建立电力线通信链路的设备,则该方法还包括:在第一网络上广播第一网络报文。
在一种可能的设计中,在第一网络上广播第一网络报文之后,还包括:接收对端设备广播的秘钥认证信息;
根据秘钥认证信息与对端设备进行秘钥认证,认证通过则与对备建立电力线通信链路。
在一种可能的设计中,秘钥认证信息包括:对端设备根据预置的第一主秘钥MK对随机生成的动态秘钥TK加密,生成的加密后的动态秘钥TK,还包括:根据动态秘钥TK生成的认证秘钥;
相应的,与对端设备进行秘钥认证,包括:根据加密后的动态秘钥TK对认证秘钥进行解密,获取认证信息。
在一种可能的设计中,根据加密后的动态秘钥TK对认证秘钥进行解密,包括:根据预置的第二主秘钥MK对加密后的动态秘钥TK进行解密,根据解密后得到的动态秘钥TK对认证秘钥进行解密;
若第二主秘钥MK与第一主秘钥MK相同,则解密后获取到认证信息,认证通过。
在一种可能的设计中,解密后获取到认证信息,包括:解密后获取到对端设备的属性信息,属性信息包括:对端设备的设备密码DPW,和/或,对端设备的MAC地址。
在一种可能的设计中,若解密后获取到对端设备的属性信息中包括对端设备的MAC地址,则解密后获取到认证信息之后,还包括:将解密后获取到的MAC地址与秘钥认证信息中标识对端设备的源MAC地址进行比对,若一致,则确认认证通过。
在一种可能的设计中,解密后获取到认证信息,包括:解密后获取到对端设备的网络密码NPW。
在一种可能的设计中,根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备之前,还包括:确定在PLC网络上是否存在与自身的网络标识NID相同
的对端设备;若存在,则与对端设备建立电力线通信链路;
若不存在,则执行根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备的步骤。
在一种可能的设计中,与对端设备进行秘钥认证之前,还包括:获取对端设备的第一网络的信号强度;
若对端设备的第一网络的信号强度满足预设阈值,则与对端设备进行秘钥认证。
在一种可能的设计中,确定在PLC网络上是否存在与自身的网络标识NID相同的对端设备之后,还包括:确定在PLC网络上不存在与自身的网络标识NID相同的对端设备,则清除PLC设备在PLC网络上的历史电力线通信链路记录。
在一种可能的设计中,清除PLC设备在PLC网络上的历史电力线通信链路记录之后,还包括:在PLC网络上发送与对端设备建立电力线通信链路的请求消息;
接收对端设备反馈的接受请求消息的响应消息,建立与对端设备的电力线通信链路。
在一种可能的设计中,方法还包括:接收对端设备发送的建立电力线通信链路的请求消息;
开启等待与对端设备建立电力线通信链路的等待指示标识;
接收用户触发的与对端设备建立电力线通信链路的触发消息,关闭等待指示标识:
发送接受请求消息的响应消息,建立与对端设备的电力线通信链路。
在一种可能的设计中,确定在PLC网络上是否存在与自身的网络标识NID相同的对端设备之后,还包括:确定在PLC网络上不存在与自身的网络标识NID相同的对端设备,则根据对端设备的MAC地址,判断是否曾与对端设备建立电力线通信链路,若是,则发送与对端设备建立电力线通信链路的请求消息;
若不是,则检测对端设备的信号强度是否在预设阈值范围内,若是,则发送与对端设备建立电力线通信链路的请求消息。
第二方面,本申请实施例提供了一种电力线通信PLC设备,包括:
判断模块,用于根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备;其中,第一网络为非PLC网络;
认证模块,用于在判断模块判断对端设备是PLC设备时,与对端设备进行秘钥认证;
建立模块,用于在认证模块确认认证通过后,与对端设备建立电力线通信链路。
在一种可能的设计中,认证模块,包括:
加密子模块,用于随机生成动态秘钥TK,基于预置的第一主秘钥MK加密所述动态秘钥TK;根据所述动态秘钥TK生成认证秘钥;
发送子模块,用于广播加密后的动态秘钥TK和认证秘钥,以使对端设备根据加密后的动态秘钥TK对认证秘钥进行解密。
在一种可能的设计中,加密子模块,具体用于基于动态秘钥TK对PLC设备的属
性信息进行加密,得到认证秘钥。
在一种可能的设计中,加密子模块,具体用于基于动态秘钥TK对设备的PLC网络的网络密码NPW进行加密,得到认证秘钥。
在一种可能的设计中,PLC设备的属性信息包括:
PLC设备的设备密码DPW,和/或,PLC设备的MAC地址。
在一种可能的设计中,认证模块,具体用于当对端设备预置的第二主秘钥MK与第一主秘钥MK相同,则对端设备对认证秘钥解密获取到认证信息后,确定认证通过。
在一种可能的设计中,判断模块包括:
检测子模块,用于检测第一网络上的报文;
确定子模块,用于当检测模块检测到报文中包含标识对端设备为PLC设备的字段时,确定对端设备是PLC设备。
在一种可能的设计中,第一网络包括:WiFi网络,蓝牙网络或有线宽带网络。
在一种可能的设计中,第一网络包括WiFi网络;相应的,第一网络报文包括:在WiFi报文的自定义字段中包含有电力线通信的标识信息。
在一种可能的设计中,若PLC设备为未与任何PLC设备建立电力线通信链路的设备,则PLC设备还包括:
广播模块,用于在第一网络上广播第一网络报文。
在一种可能的设计中,PLC设备还包括:
接收模块,用于接收对端设备广播的秘钥认证信息;
认证模块,还用于根据秘钥认证信息与对端设备进行秘钥认证。
在一种可能的设计中,秘钥认证信息包括:对端设备根据预置的第一主秘钥MK对随机生成的动态秘钥TK加密,生成的加密后的动态秘钥TK,还包括:根据动态秘钥TK生成的认证秘钥;相应的,认证模块,包括:
解密子模块,用于根据加密后的动态秘钥TK对认证秘钥进行解密,获取认证信息。
在一种可能的设计中,解密子模块,具体用于根据预置的第二主秘钥MK对加密后的动态秘钥TK进行解密,根据解密后得到的动态秘钥TK对认证秘钥进行解密;当第二主秘钥MK与第一主秘钥MK相同,则解密后获取到认证信息,认证通过。
在一种可能的设计中,解密子模块,具体用于解密后获取到对端设备的属性信息,属性信息包括:对端设备的设备密码DPW,和/或,对端设备的MAC地址。
在一种可能的设计中,解密子模块解密后获取到对端设备的属性信息中包括对端设备的MAC地址,则认证模块还包括:
比对子模块,用于将解密后获取到的MAC地址与秘钥认证信息中标识对端设备的源MAC地址进行比对,若一致,则确认认证通过。
在一种可能的设计中,解密子模块,具体用于解密后获取到对端设备的网络密码NPW。
在一种可能的设计中,该PLC设备还包括:
确定模块,用于确定在PLC网络上是否存在与自身的网络标识NID相同的对端
设备;
建立模块,还用于在确定模块确定在PLC网络上存在与自身的网络标识NID相同的对端设备后,与对端设备建立电力线通信链路;
判断模块,还用于在确定模块确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,执行根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备。
在一种可能的设计中,该PLC设备还包括:
获取模块,用于获取对端设备的第一网络的信号强度;
认证模块,还用于当对端设备的第一网络的信号强度满足预设阈值时,与对端设备进行秘钥认证。
在一种可能的设计中,该PLC设备还包括:
清除模块,用于在确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,清除PLC设备在PLC网络上的历史电力线通信链路记录。
在一种可能的设计中,该PLC设备还包括:
发送模块,用于在PLC网络上发送与对端设备建立电力线通信链路的请求消息;
接收模块,用于接收对端设备反馈的接受请求消息的响应消息,以使建立模块建立与对端设备的电力线通信链路。
在一种可能的设计中,接收模块,还用于接收对端设备发送的建立电力线通信链路的请求消息;开启等待与对端设备建立电力线通信链路的等待指示标识;接收用户触发的与对端设备建立电力线通信链路的触发消息,关闭等待指示标识;
发送模块,还用于发送接受请求消息的响应消息,以使建立模块建立与对端设备的电力线通信链路。
在一种可能的设计中,判断模块,还用于在确定模块确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,根据对端设备的MAC地址,判断是否曾与对端设备建立电力线通信链路;若是,则发送与对端设备建立电力线通信链路的请求消息;若不是,则检测对端设备的信号强度是否在预设阈值范围内,若是,则发送与对端设备建立电力线通信链路的请求消息。
在一种可能的设计中,PLC设备包括以下设备中的至少一种:集成路由器的PLC设备、集成无线网卡的PLC设备、集成有线网络接口的PLC设备。
可见,在以上各个方面,本申请实施例提供的PLC设备的连接方法及PLC设备,通过根据PLC设备之间交互的报文,确认彼此为PLC设备的身份,并在确认身份后交互秘钥认证信息,成功认证后,自动实现PLC设备之间的连接。从而解决了现有技术中需要由用户确认哪些PLC设备需要进行连接,并手动操作完成PLC设备之间的连接,连接效率低,可操作性差的技术问题,实现了PLC设备间的快速连接,同时保证了PLC设备间连接的准确性、安全性,提高了PLC设备成功连接的效率。此外,本申请实施例所提供的多种秘钥认证方式,可以满足多样化的连接需求。同时,本申请实施例提供根据网络信号强度判断是否进行PLC设备连接的方案,进一步保证了PLC设备之间连接的准确性。
图1为本申请提供的PLC设备的连接方法的组网环境示意图;
图2为本申请一实施例提供的PLC设备的连接方法的流程示意图;
图3为本申请另一实施例提供的PLC设备的连接方法的流程示意图;
图4为图3所示实施例中WiFi报文的帧结构示意图;
图5为图3所示实施例中PLC设备在PLC网络上连接的标准协议流程;
图6为本申请另一实施例提供的PLC设备的连接方法的流程示意图;
图7为图3、图6所示实施例的PLC设备连接的交互流程示意图;
图8为本申请一实施例提供的PLC设备的结构示意图;
图9为本申请另一实施例提供的PLC设备的结构示意图。
首先对本申请的组网环境进行介绍,如图1所示,本申请方案中的PLC设备1(电力猫)可以被设置于具有隔间的多个房间中,PLC设备1插在电力线2的电源插口上,各个PLC设备1之间通过电力线2进行网络数据的传输。用户的上网终端设备3,如电脑、PAD、手机等可以通过网线4或无线网卡5接收PLC设备1传递的电力线网络数据,其中,PLC设备1集成有以下至少一种功能,PLC设备1上集成有路由器6,PLC设备1上集成有有线网络接口,PLC设备上集成有无线网卡5,能够进行有线或无线WiFi通信。
图2为本申请一实施例提供的PLC设备的连接方法的流程示意图,如图2所示,本实施例提供一种PLC设备的连接方法,包括:
步骤201、PLC设备根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备。
在本步骤中,PLC设备上电后,开始对第一网络上的报文进行检测,例如,对beacon信标进行检测,其中,该第一网络为非PLC网络,例如,可以通过WiFi网络、蓝牙网络等实现电力线网络的连接。从而使得PLC设备不仅可以通过电力线连接,还可以通过其他网络连接,达到多途径的快速连接。若PLC设备检测到第一网络的报文,则可以根据报文中的信息判断发出该报文的设备是否为PLC设备,若为PLC设备则选择与其进行连接,若不是PLC设备不对该报文进行响应,从而有针对性的快速定位到目标PLC设备。
步骤202、对端设备是PLC设备,则与对端设备进行秘钥认证,认证通过与对端设备建立电力线通信链路。
在本步骤中,若识别得到对端设备是PLC设备,还需要对对端设备的身份进行验证,具体可以通过与对端设备进行秘钥认证,从而与认证通过的对端设备建立PLC通信链路。例如图1中的多隔间的房间,若不进行秘钥认证,很有可能会与邻居家一墙之隔的PLC设备建立连接关系,因此,需要通过秘钥认证,保证PLC网络连接的安全性。
通过上述两步,实现了PLC设备自动识别广播报文,确定对端为PLC设备后自
动发送认证信息,完成认证后自动建立连接关系的快速连接,从而解决了现有技术中,需要用户将对端PLC设备的标识信息手动输入的繁琐连接过程。
本实施例提供的PLC设备的连接方法,通过根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备;其中,第一网络为非PLC网络;若是,与对端设备进行秘钥认证,认证通过则与对端设备建立电力线通信链路。从而实现PLC设备之间通过报文交互,确认身份并自动完成秘钥认证,无需用户手动操作,自动快速建立PLC设备的连接,提高了PLC设备连接的效率。
图3为本申请另一实施例提供的PLC设备的连接方法的流程示意图,如图3所示,在上述实施例的基础上,本实施例提供一种PLC设备的连接方法,包括:
步骤301、检测第一网络上的报文,若报文中包含标识对端设备为PLC设备的字段,则确定对端设备是PLC设备。其中,第一网络可以为WiFi网络,蓝牙网络或有线宽带网络。若第一网络为WiFi网络;则第一网络报文中可以包括:在WiFi报文的自定义字段中包含有电力线通信的标识信息。如图4所示,在wifi报文的Frame body的自定义帧中加入device=PLC的标识信息,以使检测到该报文的PLC设备可以快速识别出有其他PLC设备正在请求建立连接。
步骤302、随机生成动态秘钥TK,基于预置的第一主秘钥MK加密该动态秘钥TK。
主秘钥是生产秘钥(Manufacture Key,MK),其通常是在PLC设备出厂前由厂家预置在PLC设备内的秘钥。一般来说,同型号的PLC设备可能会具有相同的MK,或者同一生产厂家出厂的PLC设备具有相同的MK。因此,仅仅根据MK进行PLC设备的身份识别是不安全的。因为,邻居家很可能拥有与自家相同品牌的PLC设备,则两家的MK很可能是相同的。因此,还需要携带步骤303中的进一步的认证信息。其中,动态秘钥(Traffic Key,TK),是随机生成的临时秘钥,使用预置的MK加密TK,并将加密后的TK发送给对端设备。
步骤303、根据动态秘钥TK生成认证秘钥,广播加密后的动态秘钥TK和认证秘钥,以使对端设备根据所述加密后的动态秘钥TK对所证秘钥进行解密。
在本步骤中,根据动态秘钥TK生成认证秘钥可以包括以下两种方式,1)基于动态秘钥TK对PLC设备的属性信息进行加密,得到认证秘钥。该PLC设备的属性信息可以包括:PLC设备的设备密码(Device Password,DPW),也就是现有技术中用户在用户界面输入的信息,和/或,PLC设备的MAC地址。2)基于动态秘钥TK对设备的PLC网络的网络密码(Network Password,NPW),也就是现有技术中用户在用户界面输入的信息,进行加密,得到认证秘钥。
也就是说随机生成TK后,使用预置的MK加密TK,使用TK加密DPW和/或MAC得到认证秘钥;或者使用TK加密NPW得到认证秘钥。步骤302和步骤303中的认证信息可以通过Probe request IE字段:device=PLC,type=TK,content=MK(TK);device=PLC,type=DPW,content=TK(NewSTA_DPW+MAC);device=PLC,type=NPW,content=TK(NPW),发送到对端的PLC设备。一般来说,每次PLC设备上电后,基于安全考虑,认证秘钥组播的时长控制在预设时长范围内,例如,上述秘钥认证信息的发送时长控制在2分钟内。
步骤304、认证通过后与对端设备建立电力线通信链路。
对于能够建立连接关系的PLC设备来说,其内部都预先配置有相同的主秘钥MK,也就是说若对端设备预置的第二主秘钥MK与广播认证秘钥信息的PLC设备的第一主秘钥MK相同,则对端设备就可以用其第二主秘钥对认证秘钥正确解密从而获取到认证信息。例如,对端设备采用自己的第二主秘钥MK解密得到步骤303中的设备密码DPW、PLC设备的MAC地址、PLC设备的网络密码NPW等认证信息,则可以确定认证通过。接下来,两个PLC设备就可以通过PLC标准协议流程(如图5所示,其中,PLC-A与PLC-B代表秘钥认证通过后的两个PLC设备,该标准协议流程为现有技术,在此不做赘述)实现两个设备的PLC通信链接。若第二主秘钥MK无法成功解密出TK,也自然解密不出DPW、MAC、NPW等信息,因此,认证不成功,两个PLC设备无法实现连接。
进一步地,由于MK是出厂时预置的出厂秘钥,因此,存在邻居家与自家PLC设备具有相同MK的情况,因此,可以在发送秘钥认证信息前,获取对端设备的第一网络的信号强度;若对端设备的第一网络的信号强度满足预设阈值,则与对端设备进行秘钥认证。从而进一步地保证PLC设备链接的安全性,仅对预设范围内的PLC设备进行连接操作。其中,该信号强度的预设阈值可以根据PLC产品的性能自行设定,例如,-45dBm。
图6为本申请另一实施例提供的PLC设备的连接方法的流程示意图,如图6所示,在上述实施例的基础上,本实施例提供一种PLC设备的连接方法,包括:
步骤601、在第一网络上广播第一网络报文。
在本步骤中,对于PLC设备为未与任何PLC设备建立电力线通信链路的设备,也就是说,该PLC设备可能是首次接入PLC网络的设备,也可能是还未与其他PLC设备建立PLC链接的设备,还可能是因为网络不稳定而断开了与其他PLC设备链接的设备,则该PLC设备会在第一网络上周期性地广播第一网络报文,以使监听信道的其他PLC设备接收到自己的未连接状态的第一网络报文,获知信道中有其他PLC设备请求建立连接的信息。
步骤602、接收对端设备广播的秘钥认证信息。
在本步骤中,秘钥认证信息可以包括:对端设备根据预置的第一主秘钥MK对随机生成的动态秘钥TK加密,生成的加密后的动态秘钥TK;根据动态秘钥TK生成的认证秘钥。
步骤603、根据秘钥认证信息与对端设备进行秘钥认证。
在本步骤中,需要根据接收到的加密后的动态秘钥TK对认证秘钥进行解密,以获取认证信息。而加密后的动态秘钥TK首先需要根据预置的第二主秘钥MK对加密后的动态秘钥TK进行解密,根据解密后得到的动态秘钥TK对认证秘钥进行解密;若第二主秘钥MK与第一主秘钥MK相同,则解密后能够获取到认证信息,确认认证通过。对于能够连接的PLC设备来说,其内部都预先配置有相同的主秘钥MK,也就是说若对端设备预置的第二主秘钥MK与广播认证秘钥信息的PLC设备的第一主秘钥MK相同,则对端设备就可以用其第二主秘钥对认证秘钥解密获取到认证信息。例如,成功解密出前一实施例中步骤303中的PLC设备的设备密码DPW、PLC设备的
MAC地址、PLC设备的网络密码NPW等认证信息,获取到这些信息后,可以确定认证通过。接下来,两个PLC设备就可以通过图5所示的PLC标准协议流程实现两个设备的PLC通信链接。
其中,认证信息可以包括:解密后获取到的对端设备的属性信息,该属性信息包括:对端设备的设备密码DPW,和/或,对端设备的MAC地址。若解密后获取到对端设备的属性信息中包括对端设备的MAC地址,则将解密后获取到的MAC地址与所述秘钥认证信息中标识对端设备的源MAC地址进行比对,若一致,则确认认证通过。
认证信息还可以包括:解密后获取到的对端设备的网络密码NPW。
步骤604、认证通过后与对端设备建立电力线通信链路。
图7为图3、图6所示实施例的PLC设备连接的交互流程示意图,如图7所示,该实施例中的第一网络报文以WiFi报文为例进行说明。
在上述实施例的基础上,可选的,在PLC设备根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备之前,还可以包括:步骤701、确定在PLC网络上是否存在与自身的网络标识(Network Identifier,NID)相同的对端设备的步骤;其中,NID是PLC设备在电力线上形成的网络名称,配对成功的PLC设备的NID相同。若存在,基于图5所示的PLC标准协议流程与对端设备建立电力线通信链路;若不存在,执行步骤702。
步骤702、接收对端设备PLC2广播的第一网络报文。
步骤703、判断对端设备PLC2是否是PLC设备。若判断对端设备PLC2是PLC设备,并判断对端设备的第一网络信号强度在阈值范围内,随机生成TK,使用预置的MK加密TK,使用TK加密DPW和MAC。(本步骤中也可以采用TK对NPW进行加密并发送)
步骤704、发送Probe request IE字段,其中,携带步骤703中的认证信息。其中,加密后的TK和加密后的DPW和MAC信息可以在同一个Probe request IE字段中发送,或者分为前后两个帧发送。
步骤705、PLC2检测到PLC1为PLC设备,并且其信号强度在预设范围内,则使用预置的MK解密TK,TK解密DPW和MAC,判断解密得到的MAC与PLC设备的MAC是否相等。
若解密后得到的MAC与发送该帧的源地址MAC相等,则可以确定PLC1的身份正确,若不相等,则可能是其他PLC设备截取到正在传输中的认证信息,冒名发送的。因此,通过MAC验证,可以进一步地确保秘钥认证的安全性。
步骤706、成功解密,且确认MAC相等,则执行PLC标准协议流程(图5所示)。
可选的,在确定在PLC网络上不存在与自身的网络标识NID相同的对端设备之后,还可以包括:清除PLC设备在PLC网络上的历史电力线通信链路记录。在PLC网络上发送与对端设备建立电力线通信链路的请求消息。接收对端设备反馈的接受请求消息的响应消息,建立与对端设备的电力线通信链路。由于PLC网络通信协议规定了,只有具有相同NID的PLC设备之间才可以进行PLC网络通信,因此,对于非首次接入网络的PLC设备,其内部可能储存了之前链接的历史NID信息,因此,
在发送链接请求前,可以先清除历史电力线通信链路记录,以提升链接效率。对于上述步骤,PLC设备是在PLC网络上发送和接收建立PLC链路的消息,该过程可以与前述实施例中的通过第一网络建立链接并行或串行进行,无论是并行还是串行执行,其目的都是为了尽快建立PLC设备之间的链接,加快链接速率。
进一步地,对于接收到对端设备发送的建立电力线通信链路的请求消息的PLC设备来说,其接收到该请求消息后,开启等待与对端设备建立电力线通信链路的等待指示标识;接收用户触发的与对端设备建立电力线通信链路的触发消息,关闭等待指示标识;发送接受请求消息的响应消息,建立与对端设备的电力线通信链路。通常来说,该等待指示标识可以通过在PLC设备上设置指示灯,当PLC设备接收到请求消息后,指示灯被点亮,提示用户目前处于等待与对端设备进行连接的等待状态,PLC设备上还可以设置有按键,以使用户按压按键,作为接受与对端设备建立电力线通信链路的触发消息,PLC设备接收到用户按压按键的触发消息后关闭等待指示标识,即指示灯关闭,并向对端设备发送响应消息,以使两个PLC设备建立PLC链路。
可选的,在确定在PLC网络上不存在与自身的网络标识NID相同的对端设备之后,还可以包括:确定在PLC网络上不存在与自身的网络标识NID相同的对端设备,则根据对端设备的MAC地址,判断是否曾与对端设备建立电力线通信链路,若是,则发送与对端设备建立电力线通信链路的请求消息;若不是,则检测对端设备的信号强度是否在预设阈值范围内,若是,则发送与对端设备建立电力线通信链路的请求消息。通过对曾经有过链接关系的PLC设备的MAC地址进行判断,可以免去对其信号强度进行判断的步骤,从而加快链接速率。该步骤也可以前述实施例中的通过第一网络建立链接并行或串行进行,无论是并行还是串行执行,其目的也都是为了尽快建立PLC设备之间的链接,加快链接速率。
图8为本申请一实施例提供的PLC设备的结构示意图,如图8所示,该电力线通信PLC设备,包括:判断模块81,用于根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备;其中,第一网络为非PLC网络;认证模块82,用于在判断模块81判断对端设备是PLC设备时,与对端设备进行秘钥认证;建立模块83,用于在认证模块82确认认证通过后,与对端设备建立电力线通信链路。
本实施例提供的电力线通信PLC设备,通过根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备;其中,第一网络为非PLC网络;若是,与对端设备进行秘钥认证,认证通过则与对端设备建立电力线通信链路。从而实现PLC设备之间通过报文交互,确认身份并自动完成秘钥认证,无需用户手动操作,自动快速建立PLC设备的连接,提高了PLC设备连接的效率。
图9为本申请另一实施例提供的PLC设备的结构示意图,如图9所示,在上一实施例的基础上,认证模块82,包括:加密子模块821,用于随机生成动态秘钥TK,基于预置的第一主秘钥MK加密动态秘钥TK;根据动态秘钥TK生成认证秘钥;发送子模块822,用于广播加密后的动态秘钥TK和认证秘钥,以使对端设备根据加密后的动态秘钥TK对认证秘钥进行解密。
可选的,加密子模块821,具体用于基于动态秘钥TK对PLC设备的属性信息进行加密,得到认证秘钥。
可选的,加密子模块821,具体用于基于动态秘钥TK对设备的PLC网络的网络密码NPW进行加密,得到认证秘钥。
可选的,PLC设备的属性信息包括:PLC设备的设备密码DPW,和/或,PLC设备的MAC地址。
可选的,认证模块82,具体用于当对端设备预置的第二主秘钥MK与第一主秘钥MK相同,则对端设备对认证秘钥解密获取到认证信息后,确定认证通过。
可选的,判断模块81包括:检测子模块811,用于检测第一网络上的报文;确定子模块812,用于当检测模块检测到报文中包含标识对端设备为PLC设备的字段时,确定对端设备是PLC设备。
可选的,第一网络包括:WiFi网络,蓝牙网络或有线宽带网络。
可选的,第一网络包括WiFi网络;相应的,第一网络报文包括:在WiFi报文的自定义字段中包含有电力线通信的标识信息。
可选的,若PLC设备为未与任何PLC设备建立电力线通信链路的设备,则PLC设备还包括:广播模块84,用于在第一网络上广播第一网络报文。
可选的,PLC设备还包括:接收模块85,用于接收对端设备广播的秘钥认证信息;认证模块82,还用于根据秘钥认证信息与对端设备进行秘钥认证。
可选的,秘钥认证信息包括:对端设备根据预置的第一主秘钥MK对随机生成的动态秘钥TK加密,生成的加密后的动态秘钥TK,还包括:根据动态秘钥TK生成的认证秘钥;相应的,认证模块82,包括:
解密子模块823,用于根据加密后的动态秘钥TK对所述认证秘钥进行解密,获取认证信息。
可选的,解密子模块823,具体用于根据预置的第二主秘钥MK对加密后的动态秘钥TK进行解密,根据解密后得到的动态秘钥TK对认证秘钥进行解密;当第二主秘钥MK与第一主秘钥MK相同,则解密后获取到认证信息,认证通过。
可选的,解密子模块823,具体用于解密后获取到对端设备的属性信息,属性信息包括:对端设备的设备密码DPW,和/或,对端设备的MAC地址。
可选的,解密子模块823解密后获取到对端设备的属性信息中包括对端设备的MAC地址,则认证模块82还包括:
比对子模块824,用于将解密后获取到的MAC地址与秘钥认证信息中标识对端设备的源MAC地址进行比对,若一致,则确认认证通过。
可选的,解密子模块823,具体用于解密后获取到对端设备的网络密码NPW。
可选的,还包括:确定模块86,用于确定在PLC网络上是否存在与自身的网络标识NID相同的对端设备;建立模块83,还用于在确定模块86确定在PLC网络上存在与自身的网络标识NID相同的对端设备后,与对端设备建立电力线通信链路;判断模块81,还用于在确定模块86确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,执行根据对端设备广播的第一网络报文,判断对端设备是否为PLC设备。
可选的,还包括:获取模块87,用于获取对端设备的第一网络的信号强度;认证模块82,还用于当对端设备的第一网络的信号强度满足预设阈值时,与对端设备
进行秘钥认证。
可选的,还包括:清除模块88,用于在确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,清除PLC设备在PLC网络上的历史电力线通信链路记录。
可选的,还包括:发送模块89,用于在PLC网络上发送与对端设备建立电力线通信链路的请求消息;接收模块810,用于接收对端设备反馈的接受请求消息的响应消息,以使建立模块83建立与对端设备的电力线通信链路。
可选的,接收模块810,还用于接收对端设备发送的建立电力线通信链路的请求消息;开启等待与对端设备建立电力线通信链路的等待指示标识;接收用户触发的与对端设备建立电力线通信链路的触发消息,关闭等待指示标识;发送模块89,还用于发送接受请求消息的响应消息,以使建立模块建立与对端设备的电力线通信链路。
可选的,判断模块81,还用于在确定模块确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,根据对端设备的MAC地址,判断是否曾与对端设备建立电力线通信链路;若是,则发送与对端设备建立电力线通信链路的请求消息;若不是,则检测对端设备的信号强度是否在预设阈值范围内,若是,则发送与对端设备建立电力线通信链路的请求消息。
可选的,PLC设备包括以下设备中的至少一种:集成路由器的PLC设备、集成无线网卡的PLC设备、集成有线网络接口的PLC设备。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (45)
- 一种PLC设备的连接方法,其特征在于,包括:根据对端设备广播的第一网络报文,判断所述对端设备是否为PLC设备;其中,所述第一网络为非PLC网络;若是,与所述对端设备进行秘钥认证,认证通过则与所述对端设备建立电力线通信链路。
- 根据权利要求1所述的方法,其特征在于,所述与所述对端设备进行秘钥认证,包括:随机生成动态秘钥TK,基于预置的第一主秘钥MK加密所述动态秘钥TK;根据所述动态秘钥TK生成认证秘钥,广播加密后的动态秘钥TK和认证秘钥,以使对端设备根据所述加密后的动态秘钥TK对所述认证秘钥进行解密。
- 根据权利要求2所述的方法,其特征在于,所述根据所述动态秘钥TK生成认证秘钥,包括:基于所述动态秘钥TK对PLC设备的属性信息进行加密,得到认证秘钥。
- 根据权利要求2所述的方法,其特征在于,所述根据所述动态秘钥TK生成认证秘钥,包括:基于所述动态秘钥TK对设备的PLC网络的网络密码NPW进行加密,得到认证秘钥。
- 根据权利要求3所述的方法,其特征在于,所述PLC设备的属性信息包括:所述PLC设备的设备密码DPW,和/或,所述PLC设备的MAC地址。
- 根据权利要求2~5任一项所述的方法,其特征在于,所述认证通过,包括:若所述对端设备预置的第二主秘钥MK与所述第一主秘钥MK相同,则所述对端设备对所述认证秘钥解密获取到认证信息,确定认证通过。
- 根据权利要求1所述的方法,其特征在于,所述根据对端设备广播的第一网络报文,判断所述对端设备是否为PLC设备,包括:检测第一网络上的报文,若报文中包含标识对端设备为PLC设备的字段,则确定所述对端设备是PLC设备。
- 根据权利要求7所述的方法,其特征在于,所述第一网络包括:WiFi网络,蓝牙网络或有线宽带网络。
- 根据权利要求8所述的方法,其特征在于,所述第一网络包括WiFi网络;相应的,所述第一网络报文包括:在WiFi报文的自定义字段中包含有所述电力线通信的标识信息。
- 根据权利要求1所述的方法,其特征在于,若所述PLC设备为未与任何PLC设备建立电力线通信链路的设备,则所述方法还包括:在所述第一网络上广播所述第一网络报文。
- 根据权利要求10所述的方法,其特征在于,所述在所述第一网络上广播所述第一网络报文之后,还包括:接收对端设备广播的秘钥认证信息;根据所述秘钥认证信息与所述对端设备进行秘钥认证,认证通过则与所述对端 设备建立电力线通信链路。
- 根据权利要求11所述的方法,其特征在于,所述秘钥认证信息包括:对端设备根据预置的第一主秘钥MK对随机生成的动态秘钥TK加密,生成的加密后的动态秘钥TK,还包括:根据所述动态秘钥TK生成的认证秘钥;相应的,所述与所述对端设备进行秘钥认证,包括:根据所述加密后的动态秘钥TK对所述认证秘钥进行解密,获取认证信息。
- 据权利要求12所述的方法,其特征在于,所述根据所述加密后的动态秘钥TK对所述认证秘钥进行解密,包括:根据预置的第二主秘钥MK对所述加密后的动态秘钥TK进行解密,根据解密后得到的动态秘钥TK对所述认证秘钥进行解密;若所述第二主秘钥MK与所述第一主秘钥MK相同,则解密后获取到所述认证信息,认证通过。
- 根据权利要求13所述的方法,其特征在于,所述解密后获取到认证信息,包括:解密后获取到对端设备的属性信息,所述属性信息包括:对端设备的设备密码DPW,和/或,对端设备的MAC地址。
- 根据权利要求14所述的方法,其特征在于,若解密后获取到对端设备的属性信息中包括所述对端设备的MAC地址,则所述解密后获取到认证信息之后,还包括:将解密后获取到的MAC地址与所述秘钥认证信息中标识对端设备的源MAC地址进行比对,若一致,则确认认证通过。
- 根据权利要求13所述的方法,其特征在于,所述解密后获取到认证信息,包括:解密后获取到对端设备的网络密码NPW。
- 根据权利要求1所述的方法,其特征在于,所述根据对端设备广播的第一网络报文,判断所述对端设备是否为PLC设备之前,还包括:确定在PLC网络上是否存在与自身的网络标识NID相同的对端设备;若存在,则与所述对端设备建立电力线通信链路;若不存在,则执行所述根据对端设备广播的第一网络报文,判断所述对端设备是否为PLC设备的步骤。
- 根据权利要求1所述的方法,其特征在于,所述与所述对端设备进行秘钥认证之前,还包括:获取所述对端设备的第一网络的信号强度;若所述对端设备的第一网络的信号强度满足预设阈值,则与所述对端设备进行秘钥认证。
- 根据权利要求17所述的方法,其特征在于,所述确定在PLC网络上是否存在与自身的网络标识NID相同的对端设备之后,还包括:确定在PLC网络上不存在与自身的网络标识NID相同的对端设备,则清除所述PLC设备在PLC网络上的历史电力线通信链路记录。
- 根据权利要求19所述的方法,其特征在于,所述清除所述PLC设备在PLC网络上的历史电力线通信链路记录之后,还包括:在PLC网络上发送与对端设备建立电力线通信链路的请求消息;接收所述对端设备反馈的接受所述请求消息的响应消息,建立与所述对端设备的电力线通信链路。
- 根据权利要求20所述的方法,其特征在于,所述方法还包括:接收对端设备发送的所述建立电力线通信链路的请求消息;开启等待与所述对端设备建立电力线通信链路的等待指示标识;接收用户触发的与对端设备建立电力线通信链路的触发消息,关闭所述等待指示标识;发送所述接受所述请求消息的响应消息,建立与所述对端设备的电力线通信链路。
- 根据权利要求17所述的方法,其特征在于,所述确定在PLC网络上是否存在与自身的网络标识NID相同的对端设备之后,还包括:确定在PLC网络上不存在与自身的网络标识NID相同的对端设备,则根据所述对端设备的MAC地址,判断是否曾与所述对端设备建立电力线通信链路,若是,则发送与所述对端设备建立电力线通信链路的请求消息;若不是,则检测所述对端设备的信号强度是否在预设阈值范围内,若是,则发送与所述对端设备建立电力线通信链路的请求消息。
- 一种电力线通信PLC设备,其特征在于,包括:判断模块,用于根据对端设备广播的第一网络报文,判断所述对端设备是否为PLC设备;其中,所述第一网络为非PLC网络;认证模块,用于在所述判断模块判断所述对端设备是PLC设备时,与所述对端设备进行秘钥认证;建立模块,用于在所述认证模块确认认证通过后,与所述对端设备建立电力线通信链路。
- 根据权利要求23所述的PLC设备,其特征在于,所述认证模块,包括:加密子模块,用于随机生成动态秘钥TK,基于预置的第一主秘钥MK加密所述动态秘钥TK;根据所述动态秘钥TK生成认证秘钥;发送子模块,用于广播加密后的动态秘钥TK和认证秘钥,以使对端设备根据所述加密后的动态秘钥TK对所述认证秘钥进行解密。
- 根据权利要求24所述的PLC设备,其特征在于,所述加密子模块,具体用于基于所述动态秘钥TK对PLC设备的属性信息进行加密,得到认证秘钥。
- 根据权利要求24所述的PLC设备,其特征在于,所述加密子模块,具体用于基于所述动态秘钥TK对设备的PLC网络的网络密码NPW进行加密,得到认证秘钥。
- 根据权利要求25所述的PLC设备,其特征在于,所述PLC设备的属性信息包括:所述PLC设备的设备密码DPW,和/或,所述PLC设备的MAC地址。
- 根据权利要求24~27任一项所述的PLC设备,其特征在于,所述认证模块,具体用于当所述对端设备预置的第二主秘钥MK与所述第一主秘钥MK相同,则所述对端设备对所述认证秘钥解密获取到认证信息后,确定认证通过。
- 根据权利要求23所述的PLC设备,其特征在于,所述判断模块包括:检测子模块,用于检测第一网络上的报文;确定子模块,用于当检测模块检测到报文中包含标识对端设备为PLC设备的字段时,确定所述对端设备是PLC设备。
- 根据权利要求29所述的PLC设备,其特征在于,所述第一网络包括:WiFi网络,蓝牙网络或有线宽带网络。
- 根据权利要求30所述的PLC设备,其特征在于,所述第一网络包括WiFi网络;相应的,所述第一网络报文包括:在WiFi报文的自定义字段中包含有所述电力线通信的标识信息。
- 根据权利要求23所述的PLC设备,其特征在于,若所述PLC设备为未与任何PLC设备建立电力线通信链路的设备,则所述PLC设备还包括:广播模块,用于在所述第一网络上广播所述第一网络报文。
- 根据权利要求32所述的PLC设备,其特征在于,所述PLC设备还包括:接收模块,用于接收对端设备广播的秘钥认证信息;所述认证模块,还用于根据所述秘钥认证信息与所述对端设备进行秘钥认证。
- 根据权利要求33所述的PLC设备,其特征在于,所述秘钥认证信息包括:对端设备根据预置的第一主秘钥MK对随机生成的动态秘钥TK加密,生成的加密后的动态秘钥TK,还包括:根据所述动态秘钥TK生成的认证秘钥;相应的,所述认证模块,包括:解密子模块,用于根据所述加密后的动态秘钥TK对所述认证秘钥进行解密,获取认证信息。
- 据权利要求34所述的PLC设备,其特征在于,所述解密子模块,具体用于根据预置的第二主秘钥MK对所述加密后的动态秘钥TK进行解密,根据解密后得到的动态秘钥TK对所述认证秘钥进行解密;当所述第二主秘钥MK与所述第一主秘钥MK相同,则解密后获取到所述认证信息,认证通过。
- 根据权利要求35所述的PLC设备,其特征在于,所述解密子模块,具体用于解密后获取到对端设备的属性信息,所述属性信息包括:对端设备的设备密码DPW,和/或,对端设备的MAC地址。
- 根据权利要求36所述的PLC设备,其特征在于,所述解密子模块解密后获取到对端设备的属性信息中包括所述对端设备的MAC地址,则所述认证模块还包括:比对子模块,用于将解密后获取到的MAC地址与所述秘钥认证信息中标识对端设备的源MAC地址进行比对,若一致,则确认认证通过。
- 根据权利要求35所述的PLC设备,其特征在于,所述解密子模块,具体用于解密后获取到对端设备的网络密码NPW。
- 根据权利要求23所述的PLC设备,其特征在于,还包括:确定模块,用于确定在PLC网络上是否存在与自身的网络标识NID相同的对端设备;所述建立模块,还用于在所述确定模块确定在PLC网络上存在与自身的网络标识NID相同的对端设备后,与所述对端设备建立电力线通信链路;所述判断模块,还用于在所述确定模块确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,执行根据对端设备广播的第一网络报文,判断所述对端设备是否为PLC设备。
- 根据权利要求23所述的PLC设备,其特征在于,还包括:获取模块,用于获取所述对端设备的第一网络的信号强度;所述认证模块,还用于当所述对端设备的第一网络的信号强度满足预设阈值时,与所述对端设备进行秘钥认证。
- 根据权利要求39所述的PLC设备,其特征在于,还包括:清除模块,用于在确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,清除所述PLC设备在PLC网络上的历史电力线通信链路记录。
- 根据权利要求41所述的PLC设备,其特征在于,还包括:发送模块,用于在PLC网络上发送与对端设备建立电力线通信链路的请求消息;接收模块,用于接收所述对端设备反馈的接受所述请求消息的响应消息,以使所述建立模块建立与所述对端设备的电力线通信链路。
- 根据权利要求43所述的PLC设备,其特征在于,所述接收模块,还用于接收对端设备发送的所述建立电力线通信链路的请求消息;开启等待与所述对端设备建立电力线通信链路的等待指示标识;接收用户触发的与对端设备建立电力线通信链路的触发消息,关闭所述等待指示标识;所述发送模块,还用于发送所述接受所述请求消息的响应消息,以使所述建立模块建立与所述对端设备的电力线通信链路。
- 根据权利要求39所述的PLC设备,其特征在于,所述判断模块,还用于在所述确定模块确定在PLC网络上不存在与自身的网络标识NID相同的对端设备后,根据所述对端设备的MAC地址,判断是否曾与所述对端设备建立电力线通信链路;若是,则发送与所述对端设备建立电力线通信链路的请求消息;若不是,则检测所述对端设备的信号强度是否在预设阈值范围内,若是,则发送与所述对端设备建立电力线通信链路的请求消息。
- 根据权利要求23所述的PLC设备,其特征在于,所述PLC设备包括以下设备中的至少一种:集成路由器的PLC设备、集成无线网卡的PLC设备、集成有线网络接口的PLC设备。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201780048201.0A CN109565298A (zh) | 2017-03-03 | 2017-06-09 | Plc设备的连接方法及plc设备 |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710124835 | 2017-03-03 | ||
CN201710124835.1 | 2017-03-03 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018157500A1 true WO2018157500A1 (zh) | 2018-09-07 |
Family
ID=63369626
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/087747 WO2018157500A1 (zh) | 2017-03-03 | 2017-06-09 | Plc设备的连接方法及plc设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109565298A (zh) |
WO (1) | WO2018157500A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111526510B (zh) * | 2020-04-29 | 2023-02-10 | 华为技术有限公司 | 路由器组网方法、系统、子路由器和母路由器 |
CN112584338B (zh) * | 2020-12-09 | 2023-07-04 | 深圳市智路由科技有限公司 | 一种电力线扩展物联网自动组网方法 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103988533A (zh) * | 2011-12-12 | 2014-08-13 | 索尼公司 | 用于在网络中传输数据信号的系统、移动传输设备以及网络设备 |
CN104113491A (zh) * | 2013-04-22 | 2014-10-22 | 中兴通讯股份有限公司 | 一种数据传输方法及装置 |
US20140355610A1 (en) * | 2013-05-31 | 2014-12-04 | Qualcomm Incorporated | Switched power line communication |
CN104488303A (zh) * | 2014-04-16 | 2015-04-01 | 华为终端有限公司 | 接入无线网络的装置及方法 |
CN104756410A (zh) * | 2012-10-26 | 2015-07-01 | 高通股份有限公司 | 多实例电力线通信系统 |
CN105636040A (zh) * | 2015-12-17 | 2016-06-01 | 美的集团股份有限公司 | 设备入网的方法及系统 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104579428B (zh) * | 2015-01-12 | 2017-06-09 | 上海泓亚通信技术有限公司 | 一种plc设备自动配对方法 |
CN104967466A (zh) * | 2015-04-29 | 2015-10-07 | 普联技术有限公司 | 一种宽带电力线通信设备的组网方法及装置 |
-
2017
- 2017-06-09 CN CN201780048201.0A patent/CN109565298A/zh active Pending
- 2017-06-09 WO PCT/CN2017/087747 patent/WO2018157500A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103988533A (zh) * | 2011-12-12 | 2014-08-13 | 索尼公司 | 用于在网络中传输数据信号的系统、移动传输设备以及网络设备 |
CN104756410A (zh) * | 2012-10-26 | 2015-07-01 | 高通股份有限公司 | 多实例电力线通信系统 |
CN104113491A (zh) * | 2013-04-22 | 2014-10-22 | 中兴通讯股份有限公司 | 一种数据传输方法及装置 |
US20140355610A1 (en) * | 2013-05-31 | 2014-12-04 | Qualcomm Incorporated | Switched power line communication |
CN104488303A (zh) * | 2014-04-16 | 2015-04-01 | 华为终端有限公司 | 接入无线网络的装置及方法 |
CN105636040A (zh) * | 2015-12-17 | 2016-06-01 | 美的集团股份有限公司 | 设备入网的方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN109565298A (zh) | 2019-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101084687B (zh) | 用于无线客户端连接和远程配置的系统及方法 | |
CN104010352B (zh) | 路由器与智能设备之间的连接方法以及相应装置 | |
US11863541B2 (en) | System and method for end-to-end secure communication in device-to-device communication networks | |
KR101560416B1 (ko) | 근거리 통신에서 보안 채널 형성 방법 및 장치 | |
JP6727292B2 (ja) | セキュリティ認証方法、構成方法、および関連デバイス | |
TW201442543A (zh) | 用於無線簡易連線之方法 | |
US9485093B2 (en) | Push button configuration pairing | |
WO2018090829A1 (zh) | 一种智能终端设备接入互联网的方法及装置 | |
US20170111799A1 (en) | A Method for Barrier-free Access to Wireless Network | |
US20110188657A1 (en) | Method for connecting wireless communications, wireless communications terminal and wireless communications system | |
US11109206B2 (en) | Security method and system for supporting discovery and communication between proximity based service terminals in mobile communication system environment | |
TWI424727B (zh) | 網路連線方法 | |
WO2021213463A1 (zh) | 智能设备的配网方法及装置、电子设备、计算机可读介质 | |
JP2016515369A5 (zh) | ||
WO2014180352A1 (zh) | 无线设备的配置方法及装置、系统 | |
US20160080889A1 (en) | Provisioning of multiple wireless devices by an access point | |
US8862096B1 (en) | Provisioning of multiple wireless devices by an access point | |
WO2012019466A1 (zh) | 邻居用户终端间保密通信方法、终端、交换设备及系统 | |
CN108601093B (zh) | 一种无线通信方法及系统 | |
WO2015100974A1 (zh) | 一种终端认证的方法、装置及系统 | |
WO2014176743A1 (zh) | 一种配置无线终端的方法、设备及系统 | |
CN108306793B (zh) | 智能设备、智能家居网关、建立连接的方法及系统 | |
TWI430674B (zh) | 用於具有中繼節點之無線通訊系統的安全性方法 | |
CN113965916A (zh) | 一种设备配网方法、装置、设备及计算机可读存储介质 | |
CN104284331A (zh) | 一种连接便携式wlan热点的方法及系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17898684 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17898684 Country of ref document: EP Kind code of ref document: A1 |