CN107396358B - Wireless hotspot connection control method, device and equipment and computer storage medium - Google Patents

Wireless hotspot connection control method, device and equipment and computer storage medium Download PDF

Info

Publication number
CN107396358B
CN107396358B CN201710551694.1A CN201710551694A CN107396358B CN 107396358 B CN107396358 B CN 107396358B CN 201710551694 A CN201710551694 A CN 201710551694A CN 107396358 B CN107396358 B CN 107396358B
Authority
CN
China
Prior art keywords
hotspot
wireless
ssid
mac address
ssids
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
CN201710551694.1A
Other languages
Chinese (zh)
Other versions
CN107396358A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201710551694.1A priority Critical patent/CN107396358B/en
Publication of CN107396358A publication Critical patent/CN107396358A/en
Application granted granted Critical
Publication of CN107396358B publication Critical patent/CN107396358B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • H04L63/0846Network architectures or network communication protocols for network security for authentication of entities using passwords using time-dependent-passwords, e.g. periodically changing passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a wireless hotspot connection control method, device, equipment and computer storage medium, wherein if the number of SSIDs of wireless hotspots of the same WiFi module is determined to be larger than 1 based on a configuration instruction of the wireless hotspots, the MAC address of the WiFi module is obtained; acquiring BSSIDs of the wireless hotspots based on the MAC addresses, generating hotspot configuration information of each wireless hotspot by combining SSIDs and hotspot passwords of at least two wireless hotspots acquired based on the configuration instruction, and storing the hotspot configuration information in a hotspot configuration file; determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file; and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs. By applying the embodiment of the invention, one WiFi module is utilized to provide a plurality of wireless hotspots, and a plurality of SSIDs are provided without a corresponding number of WiFi modules, thereby saving the cost.

Description

Wireless hotspot connection control method, device and equipment and computer storage medium
Technical Field
The invention relates to the technical field of intelligent equipment, in particular to a wireless hotspot connection control method, device, equipment and computer storage medium.
Background
WiFi (Wireless-Fidelity) technology is used more and more widely as a Wireless communication method. Most of the existing devices have a wireless fidelity function, and can be connected with nearby wireless hotspots by starting a wireless communication module. A device providing a wireless hotspot may Set a Service Set Identifier (SSID) name and a hotspot password for accessing the wireless hotspot, and broadcast the SSID name. The connecting device may access the wireless hotspot by searching for the SSID name and entering the hotspot password.
In a certain scenario, multiple wireless hotspots are required, however, each WiFi module only provides one SSID, and multiple SSIDs need to be provided through a corresponding number of WiFi modules, which is relatively high in cost.
Disclosure of Invention
The invention provides a wireless hotspot connection control method, a wireless hotspot connection control device, wireless hotspot connection control equipment and a computer storage medium, and aims to solve the problem of high cost caused by the realization of a plurality of SSIDs in the prior art.
According to a first aspect of the embodiments of the present invention, there is provided a wireless hotspot connection control method, including:
if the number of SSIDs of wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots, obtaining the MAC address of the WiFi module;
acquiring BSSIDs of wireless hotspots based on the MAC addresses, generating hotspot configuration information of each wireless hotspot by combining SSIDs and hotspot passwords of at least two wireless hotspots acquired based on the configuration instruction, and storing the hotspot configuration information in a hotspot configuration file;
determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file;
and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
In an optional implementation manner, a hotspot setting interface for setting at least two wireless hotspots is preconfigured, and determining that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1 based on the configuration instruction of the wireless hotspots includes:
and if at least two SSID input controls in the hotspot setting interface are not empty, determining that the number of SSIDs of the wireless hotspots of the same WiFi module is more than 1, wherein the SSID input controls are controls for inputting the SSIDs.
In an optional implementation manner, the obtaining the BSSID of the wireless hotspot based on the MAC address includes:
converting the MAC address into a MAC address with a specified format, wherein the MAC address with the specified format satisfies the following conditions: the BSSID obtained by the wireless hotspot service based on the MAC address with the specified format can be expanded into different BSSIDs;
and resetting the MAC address of the WiFi module by using the converted MAC address, and acquiring a BSSID corresponding to one SSID based on the reset MAC address, so that the wireless hotspot service expands the BSSIDs corresponding to other SSIDs based on the acquired BSSID.
In an optional implementation manner, the hotspot setting interface includes a designated original SSID and at least one extended SSID, and the method further includes:
and if the hotspot password corresponding to the extended SSID in the hotspot setting interface is empty and the hotspot password corresponding to the original SSID is not empty, taking the hotspot password corresponding to the original SSID as the hotspot password corresponding to the extended SSID.
In an alternative implementation, different segments of the IP address are configured with different permissions to access network resources.
According to a second aspect of the embodiments of the present invention, there is provided a wireless hotspot connection control device, the device comprising:
the address acquisition module is used for acquiring the MAC address of the WiFi module if the SSID number of the wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots;
the first information storage module is used for obtaining BSSIDs of the wireless hotspots based on the MAC addresses, generating hotspot configuration information of each wireless hotspot by combining SSIDs and hotspot passwords of at least two wireless hotspots obtained based on the configuration instructions, and storing the hotspot configuration information in a hotspot configuration file;
the second information storage module is used for determining the IP address field of each wireless hotspot based on the hotspot configuration information and storing the IP address field in a DHCP configuration file;
and the service starting module is used for respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connecting equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
In an optional implementation manner, a hotspot setting interface for setting at least two wireless hotspots is preconfigured, and the address obtaining module is specifically configured to:
and if at least two SSID input controls in the hotspot setting interface are not empty, determining that the number of SSIDs of the wireless hotspots of the same WiFi module is more than 1, wherein the SSID input controls are controls for inputting the SSIDs.
In an optional implementation manner, the first information storage module is specifically configured to:
converting the MAC address into a MAC address with a specified format, wherein the MAC address with the specified format satisfies the following conditions: the BSSID obtained by the wireless hotspot service based on the MAC address with the specified format can be expanded into different BSSIDs;
and resetting the MAC address of the WiFi module by using the converted MAC address, and acquiring a BSSID corresponding to one SSID based on the reset MAC address, so that the wireless hotspot service expands the BSSIDs corresponding to other SSIDs based on the acquired BSSID.
According to a third aspect of embodiments of the present invention, there is provided an electronic apparatus, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
if the number of SSIDs of wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots, obtaining the MAC address of the WiFi module;
acquiring BSSIDs of wireless hotspots based on the MAC addresses, generating hotspot configuration information of each wireless hotspot by combining SSIDs and hotspot passwords of at least two wireless hotspots acquired based on the configuration instruction, and storing the hotspot configuration information in a hotspot configuration file;
determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file;
and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
According to a fourth aspect of embodiments of the present invention, there is provided a computer storage medium having stored therein program instructions, the program instructions including:
if the number of SSIDs of wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots, obtaining the MAC address of the WiFi module;
acquiring BSSIDs of wireless hotspots based on the MAC addresses, generating hotspot configuration information of each wireless hotspot by combining SSIDs and hotspot passwords of at least two wireless hotspots acquired based on the configuration instruction, and storing the hotspot configuration information in a hotspot configuration file;
determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file;
and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
By applying the scheme of the embodiment of the invention, when the SSID number of the wireless hotspots of the same WiFi module is determined to be more than 1, the MAC address of the WiFi module can be obtained, the BSSID of the wireless hotspots is obtained based on the MAC address, and hotspot configuration information of each wireless hotspot is generated and stored in a hotspot configuration file by combining the SSID and the hotspot password obtained based on the configuration instruction; the IP address field of each wireless hotspot is determined based on the hotspot configuration information and is stored in the DHCP configuration file, and then the wireless hotspot service and the DHCP service are respectively started according to the hotspot configuration file and the DHCP configuration file, so that a plurality of wireless hotspots are provided by one WiFi module, a plurality of SSIDs are provided without the WiFi modules with corresponding numbers, and the cost is saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1A is a flowchart illustrating a method for controlling a wireless hotspot connection according to an exemplary embodiment of the invention.
FIG. 1B is a schematic diagram of a hotspot setting interface according to an exemplary embodiment of the invention.
FIG. 1C is a schematic diagram of another hotspot setting interface shown in accordance with an exemplary embodiment of the present invention.
Fig. 2 is a flowchart illustrating another method for controlling a wireless hotspot connection according to an exemplary embodiment of the present invention.
Fig. 3 is a block diagram illustrating a wireless hotspot connection control device in accordance with an exemplary embodiment of the present invention.
Fig. 4 is a hardware structure diagram of an electronic device where a wireless hotspot connection control device is located according to an exemplary embodiment of the invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
WiFi technology is used more and more widely as a wireless communication method. Many electronic devices can connect to a wireless hotspot through a wireless communication module to achieve networking. For devices providing a wireless hotspot, some devices only have an AP (Access Point) mode, and some devices include both an AP (Access Point) mode and an STA (Station) mode. In the AP mode, the device may provide a wireless hotspot to share traffic or a wired network, and in the STA mode, the device is used to connect to the wireless hotspot to implement an internet access function. For example, a router is often provided with only an AP module, and a smartphone, a smart set-top box, and the like are often dual-mode. For example, the existing Android smart device has an STA mode and an AP mode. When the Android device works in the STA mode, the Android device serves as a connection device, and the wireless internet access function of the Android device is achieved by connecting wireless hotspots provided by other devices; when the wireless access device works in the AP mode, the Android device provides wireless access service as a device for providing wireless hotspots, so that other connecting devices with WiFi functions can be connected with the wireless hotspots provided by the Android device, and the wireless internet access function of the connecting devices is achieved.
In certain scenarios multiple wireless hotspots are required, e.g. different classes of visitors on the same occasion connect different wireless hotspots. However, each WiFi module only provides one SSID, multiple SSIDs need to be provided through a corresponding number of WiFi modules, which is relatively high in cost.
In order to avoid the problem of high cost, embodiments of the present invention provide a method, an apparatus, a device, and a computer storage medium for controlling a wireless hotspot connection. According to the embodiment of the invention, the same WiFi module provides a plurality of SSIDs, so that a plurality of wireless hotspots are provided, and the cost is further reduced. Embodiments of the present invention are described below with reference to the accompanying drawings.
As shown in fig. 1A, fig. 1A is a flowchart illustrating a method for controlling a wireless hotspot connection according to an exemplary embodiment of the present invention, which may include the following steps 101 to 104:
in step 101, if it is determined that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1 based on the configuration instruction of the wireless hotspots, the MAC address of the WiFi module is obtained.
In step 102, BSSIDs of the wireless hotspots are obtained based on the MAC addresses, and hotspot configuration information of each wireless hotspot is generated and stored in a hotspot configuration file in combination with SSIDs and hotspot passwords of at least two wireless hotspots obtained based on the configuration instruction.
In step 103, an IP address field of each wireless hotspot is determined based on the hotspot configuration information and stored in a DHCP configuration file.
In step 104, a wireless hotspot service and a DHCP service are respectively started according to the hotspot configuration file and the DHCP configuration file, where the wireless hotspot service allows the connection device to connect to a corresponding wireless hotspot by using a hotspot password corresponding to each SSID.
The embodiment of the invention can be applied to electronic equipment with a function of providing wireless hot spots, for example, the invention can be applied to electronic equipment such as routing equipment, set top boxes, flat panels, smart phones and the like. Specifically, the method can be applied to equipment such as an Android set top box, an Android game box, an Android smart television, an Android intelligent advertising machine, an Android conference machine and an Android education machine.
Wherein, the configuration instruction of the wireless hot point can be an instruction for setting configuration information of the wireless hot point. The configuration instructions may be generated based on user-operated triggers.
In an alternative implementation, a hotspot setting interface for setting at least two wireless hotspots is provided in advance. In the hotspot setting interface, configuration information of different wireless hotspots of the same WiFi module can be set. For example, not only the SSID of the wireless hotspot (i.e., the name of the wireless hotspot, which is used for searching for connection by other connected devices) but also a hotspot password of the wireless hotspot (the hotspot password is a connection password that needs to be input when the wireless hotspot is connected) may be set, so that the wireless hotspot with the name of SSID is connected by using the hotspot password. Further, other related information of the wireless hotspot may also be set, for example, SSID broadcast status, security encryption mode, and the like. The SSID broadcast state is used to indicate whether the corresponding SSID name is in a visible state. The security encryption mode comprises an open state and an encryption state and is used for indicating whether a password needs to be input when the corresponding WiFi module is connected.
As shown in fig. 1B, fig. 1B is a schematic diagram of a hotspot setting interface according to an exemplary embodiment of the invention. In the hotspot setting interface, configuration information of three wireless hotspots can be set, and the configuration information can include SSID, hotspot password and security of the wireless hotspots. It is understood that other configuration information of the wireless hotspot may be set in the hotspot setting interface, and fig. 1B only illustrates some of the information.
And acquiring a configuration instruction of the wireless hotspot based on the hotspot setting interface, and setting the configuration information of the wireless hotspot according to the configuration instruction. Setting a plurality of wireless hotspots based on a hotspot setting interface may have various situations, for example, different SSIDs and different passwords of different wireless hotspots; the SSIDs of different wireless hotspots are different, but the passwords are the same; the SSIDs of different wireless hotspots are the same, but the passwords are different; the SSIDs of different wireless hotspots are the same and the passwords are the same.
In the embodiment of the invention, as the hotspot setting interface is an interface for setting the wireless hotspots of the same WiFi module, when at least two SSIDs of the wireless hotspots are determined according to the setting instruction, the number of the SSIDs of the wireless hotspots of the same WiFi module can be determined to be more than 1. In one example, the number of SSIDs may be determined according to whether the SSID control in the hotspot setting interface is empty. Specifically, if at least two SSID input controls in the hotspot setting interface are not empty, it is determined that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1.
The SSID input control may be a control for inputting an SSID, and the number of the SSID input controls may be determined based on a preset number of available SSIDs. In an example, whether the SSID input control is empty may be whether the SSID input control corresponding to the SSID inputs a valid SSID, and if a valid SSID is input, it is determined that the SSID input control is not empty, otherwise, it is determined that the SSID input control is empty. By a legitimate SSID is meant an SSID that meets the requirements of a specified format. In another example, whether the SSID input control is empty or not may be whether the SSID input control corresponding to the SSID inputs information or not, and if the information is input, it is determined that the input control is not empty, otherwise, it is determined that the input control is empty. The SSID format is not limited in this example.
The SSID is the name of the wireless hotspot, so that the number of the SSIDs can represent the number of the wireless hotspots, and the number of the SSIDs can be quickly judged according to whether the SSID input control is empty or not, so that the number of the wireless hotspots can be quickly judged.
In some application scenarios, there is not much need to set the same SSID with the same WiFi mode, and in view of this, in an alternative implementation, it is also limited whether the SSIDs are the same. Specifically, if at least two SSID input controls in the hotspot setting interface are not empty and SSIDs in the SSID input controls are different, it is determined that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1, and the SSID input controls are controls for inputting SSIDs.
Therefore, whether the SSID input control is empty or not is considered, and whether the information in the SSID input control is the same or not is also considered, so that the scheme of the invention is executed only when at least two different SSIDs are determined. Further, if the input information of the current SSID input control is detected to be the same as the input information of the set SSID input control, the reminding information with the same SSID is output to remind a user of setting different SSIDs.
Regarding the case that the SSID input control is empty, in an example, if the SSID input control is used to determine whether the SSID number of the wireless hotspot is empty, it may indicate that the hotspot service is not enabled when the SSID input control is empty. Further, in order to remind the user, reminding information can be displayed in the input control corresponding to the SSID: "clear means not enabled". For example, the prompt may be prompted in the input box by way of a placeholder (also referred to as a shading word). In another example, the number of SSIDs of the wireless hotspot is determined without using whether the SSID input control is empty, but rather, the number of SSIDs of the wireless hotspot is determined according to the number of SSID input controls in the hotspot setting interface. In view of this, the default assignment of the value in the SSID input control that is empty in the hotspot setting interface is the SSID in the SSID input control that is not empty. In order to specify the SSID for default assignment, an SSID input control may be pre-designated, and the designated SSID input control is used as the original SSID input control, and the other SSID input controls are used as the extended SSID input controls. For example, the first SSID input control is used as the original SSID input control, and the other SSID input controls are used as the extended SSID input controls. And taking the SSID in the original SSID input control as the SSID for default assignment, and taking the original SSID as the SSID of the extended SSID input control when other extended SSID input controls are empty. For convenience of description, the SSID in the original SSID entry control can be referred to as the original SSID, which is the name of the original wireless hotspot. The SSID in the extended SSID entry control may be referred to as an extended SSID, which is the name of an extended wireless hotspot.
Because different wireless hotspots can be allocated with different IP address segments, when the input control for inputting the extended SSID is empty, the extended SSID of the extended wireless hotspot is indicated to be the same as the original SSID, so that the name of the extended wireless hotspot can be the same as that of the original wireless hotspot, the IP address segment corresponding to the extended wireless hotspot is utilized, and the full utilization of the network is realized.
Further, in order to remind the user, reminding information can be displayed in the input control corresponding to the SSID: "clear" means the same as SSID name 1. For example, the prompt may be presented in the input box by means of a shading word.
Correspondingly, the hotspot setting interface also comprises a hotspot password corresponding to the SSID. The hotspot passwords corresponding to different SSIDs may be the same or different.
In one example, one SSID input control may be pre-designated, and the designated SSID input control is used as the original SSID input control, and the other SSID input controls are used as the extended SSID input controls. For example, the first SSID input control is used as the original SSID input control, and the other SSID input controls are used as the extended SSID input controls. For convenience of description, the SSID in the original SSID entry control can be referred to as the original SSID, which is the name of the original wireless hotspot. The SSID in the extended SSID entry control may be referred to as an extended SSID, which is the name of an extended wireless hotspot.
Regarding the situation that the password input control is empty, if the hotspot setting interface comprises the original SSID and at least one extended SSID, when the hotspot password corresponding to the extended SSID is empty, the prompt message that the password is empty can be output.
In an example, if the hotspot password corresponding to the extended SSID in the hotspot setting interface is empty and the hotspot password corresponding to the original SSID is not empty, the hotspot password corresponding to the original SSID is used as the hotspot password corresponding to the extended SSID. When the hot spot password corresponding to the extended SSID is empty, the hot spot password corresponding to the original SSID is automatically set as the hot spot password corresponding to the extended SSID, and therefore password setting time is saved.
As shown in fig. 1C, fig. 1C is a schematic diagram of another hotspot setting interface according to an exemplary embodiment of the invention. In the hotspot setting interface, configuration information of three wireless hotspots can be set, wherein the configuration information comprises an SSID (service set identifier) of the wireless hotspot, a hotspot password and security. And if the SSID input control is null, it may indicate that the hotspot service is not enabled. In order to remind the user, reminding information can be displayed in the SSID input control: "clear means not enabled". The SSID1 is used as an original SSID, the SSID2 and the SSID3 are used as extended SSIDs, when the hotspot password corresponding to the extended SSID is empty, the hotspot password corresponding to the SSID1 can be set as the hotspot password corresponding to the extended SSID, and the reminder information is displayed in the password input control: a null indicates the same as 'code 1'. Therefore, the method and the device can be conveniently and quickly set by a manager.
When the SSID number of the wireless hotspot of the same WiFi module is determined to be greater than 1, a Media Access Control Address (MAC Address or physical Address) of the WiFi module may be acquired.
The MAC address may be referred to as a media access control address, also referred to as an ethernet ID or a physical address, which is an address used to confirm the location of the network device. The MAC address is 48 bits (6 bytes) in total and is typically expressed in hexadecimal. The first 24 bits of the MAC address are determined by the IEEE as to how to assign, and the last 24 bits of the MAC address are specified by the vendor who actually produces the network device.
The MAC address of the WiFi module may be obtained in various ways, for example, the MAC address of the WiFi module may be obtained by reading/sys/class/net/wlan 0/address, for example, the obtained MAC address is 44:2c:05: b9: a2: d 2.
Since each wireless hotspot needs to be configured with a BSSID (Basic Service Set Identifier), BSSIDs of different wireless hotspots are different, and BSSIDs can be obtained based on MAC addresses, BSSIDs of wireless hotspots can be obtained based on the MAC addresses.
In an optional implementation manner, the obtaining the BSSID of the wireless hotspot based on the MAC address includes:
converting the MAC address into a MAC address with a specified format;
and resetting the MAC address of the WiFi module by using the converted MAC address, and acquiring a BSSID corresponding to one SSID based on the reset MAC address, so that the wireless hotspot service expands the BSSIDs corresponding to other SSIDs based on the acquired BSSID.
Wherein the MAC address of the specified format satisfies: the BSSID obtained by the wireless hotspot service based on the MAC address of the specified format may be extended to a different BSSID, for example, the specified format may be a local administration (Locally Administered) format, under which the user may administer the definition by himself. The MAC Address in the local management format may be called a local managed Address (LAA). Specifically, the first byte of the MAC address may be converted to the byte required for the specified format. For example, the first byte 44 of the MAC address 44:2c:05: b9: a2: d2 is modified to byte 02 as required by the specified format, and the converted MAC address is 02:2c:05: b9: a2: d 2.
And resetting the MAC address of the WiFi module by using the converted MAC address. For example, the MAC address of the WiFi module is reset with a configuration command and the translated MAC address. The configuration command may be an ifconfig command, and in particular, the WiFi module MAC address may be reset using an ifconfig wlan0 hw ether 02:2c:05: b9: a2: d2 command.
And under the default condition, the BSSID is generally the MAC address of the WiFi module, and the BSSID corresponding to one SSID can be obtained. For example, when hotspot configuration information of a first wireless hotspot is generated, a configuration item such as BSSID 02:2c:05: b9: a2: d2 may be generated, and the hostapd service may automatically configure BSSID of a subsequent extended wireless hotspot according to the configuration item of BSSID, and extend BSSID corresponding to other SSIDs. Taking the converted MAC address as 02: xx: xx: xx: xx:00 as an example, the BSSID corresponding to the first SSID is 02: xx: xx: xx: xx:00, the BSSID corresponding to the second SSID is 02: xx: xx: xx: xx:01, the BSSID corresponding to the third SSID is 02: xx: xx: xx: xx:02, and the BSSIDs are automatically accumulated to expand the BSSIDs corresponding to other SSIDs.
Assuming that the number of SSIDs of wireless hotspots of the same WiFi module is determined to be 3 based on the hotspot setting interface, and the 3 SSIDs are SSID1, SSID2, and SSID3, respectively, then the 3 BSSIDs are obtained based on the MAC address, the BSSID corresponding to SSID1 is 02:2c:05: b9: a2: d2, and the BSSIDs corresponding to SSID2 and SSID3 can be obtained by automatically accumulating and expanding on the basis of 02:2c:05: b9: a2: d2, so hotspot configuration information does not need to be reflected. Combining the BSSID, the SSID in the hotspot setting interface and the hotspot password to generate hotspot configuration information of each wireless hotspot, which is as follows:
interface wlan0
bssid=02:2c:05:b9:a2:d2
driver=nl80211
ssid=SSID1
wpa=2
wpa_passphrase=password1
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
bss=wlan0_0
ssid=SSID2
wpa=2
wpa_passphrase=password2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
bss=wlan0_1
ssid=SSID3
wpa=2
wpa_passphrase=password3
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
the hot spot configuration information is the hot spot configuration information when the SSID1, the SSID2 and the SSID3 are all enabled and have independent passwords, and the hot spot configuration information is separated by empty lines. In one example, if the SSID input control is empty, which indicates that the wireless hotspot is not enabled, then when a certain SSID input control is empty, no corresponding hotspot configuration information is generated. For example, if the SSID2 corresponds to an SSID input control null, the hotspot configuration information is as follows:
interface wlan0
bssid=02:2c:05:b9:a2:d2
driver=nl80211
ssid=SSID1
wpa=2
wpa_passphrase=password1
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
bss=wlan0_1
ssid=SSID3
wpa=2
wpa_passphrase=password3
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
if the password input control is null, indicating that the hotspot password of the wireless hotspot is the same as the hotspot password of the first wireless hotspot, the 4-row configuration items of wpa 2 to rsn _ password CCMP are not generated when the password input control is null. For example, if the hotspot password corresponding to SSID2 is null, the hotspot configuration information is as follows:
interface wlan0
bssid=02:2c:05:b9:a2:d2
driver=nl80211
ssid=SSID1
wpa=2
wpa_passphrase=password1
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
bss=wlan0_0
ssid=SSID2
bss=wlan0_1
ssid=SSID3
wpa=2
wpa_passphrase=password3
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
in addition, if the number of the SSIDs of the wireless hotspots of the same WiFi module is determined to be 1 based on the hotspot setting interface, hotspot configuration information of a single SSID can be generated. For example, if the case is a single SSID, hotspot configuration information corresponding to SSID2 and SSID3 is not generated, and a bssid-02: 2c:05: b9: a2: d2 configuration item is not included in the hotspot configuration information corresponding to SSID 1. For example, if the input controls corresponding to SSID2 and SSID3 are both empty, the hotspot configuration information is as follows:
interface wlan0
driver=nl80211
ssid=SSID1
wpa=2
wpa_passphrase=password1
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
and after the hotspot configuration information of each wireless hotspot is generated, storing the hotspot configuration information in a hotspot configuration file. The hotspot configuration file is a configuration file which needs to be loaded when the wireless hotspot service is started. The hotspot configuration file may include WiFi hotspot status, SSID broadcast status, SSID name, hotspot password, security encryption mode, working channel, working frequency band, and other hotspot configuration information. The WiFi hotspot state is used for indicating whether the AP function corresponding to the WiFi module is started or not. The SSID name refers to a WiFi hotspot name corresponding to the WiFi module and is used for searching and connecting the network connection equipment. The SSID broadcast state is used to indicate whether the corresponding SSID name is in a visible state. The security encryption mode comprises an open state and an encryption state and is used for indicating whether a password needs to be input when the corresponding WiFi module is connected. The operating frequency band may be a 2.4GHz (hertz) band, a 5.8GHz band, or the like.
For example, the wireless hotspot service may be a hostapd hotspot service, which is a user-mode daemon for the AP and the authentication server. The hotspot configuration file may be a hostapd.
When the connection device connects to the wireless hotspot, the connection device needs to be allocated with a corresponding IP address and DNS information through a DHCP service, and therefore an IP address field of each wireless hotspot needs to be configured and corresponding DHCP configuration information is generated.
The Dynamic Host Configuration Protocol (DHCP) is a network Protocol of a local area network, works using a UDP Protocol, and can be used for an internal network or a network service provider to automatically allocate an IP address to a user.
In view of this, after determining the hotspot configuration information, corresponding DHCP configuration information may be set according to the hotspot configuration information. The IP address field in the DHCP configuration information may be preconfigured by the designer. Different IP address segments are configured for different wireless hotspots. The DHCP configuration information can be changed along with the change of the hotspot configuration information, corresponding DHCP configuration information exists only when the wireless hotspot is in a starting state, and the DHCP configuration information does not exist if the wireless hotspot is not started.
Assuming that the number of SSIDs of the wireless hotspot of the same WiFi module is determined to be 3 based on the hotspot setting interface, and the 3 SSIDs are SSID1, SSID2, and SSID3, respectively, the DHCP configuration information is as follows:
interface=wlan0
dhcp-range=wlan0,192.168.66.110,192.168.66.220,12h
interface=wlan0_0
dhcp-range=wlan0_0,192.168.67.110,192.168.67.220,12h
interface=wlan0_1
dhcp-range=wlan0_1,192.168.68.110,192.168.68.220,12h
the above-mentioned corresponding item is changed following the change of hot configuration information, if the name of corresponding SSID is null, the corresponding interface and dhcp-range items are deleted, if it is single SSID case, only the first two rows are retained.
After determining the IP address segment for each wireless hotspot, the information may be stored in a DHCP configuration file. Conf may be stored in a dnssmasq. conf configuration file, for example.
And respectively starting wireless hotspot service and DHCP service according to the hotspot configuration file and the DHCP configuration file. Since the wireless hotspot service is often required to be restarted each time the hotspot configuration file is changed, the wireless hotspot service can be started according to the hotspot configuration file after the hotspot configuration file is updated. When the wireless hotspot service is started, the service can load a hotspot configuration file and then start the hotspot service supporting the corresponding function according to configuration items in the hotspot configuration file. And simultaneously, the DHCP service can be started based on the DHCP configuration file, when the DHCP service is started, the service can load the DHCP configuration file, and then the service supporting the corresponding function is started according to the configuration items in the DHCP configuration file so as to allocate the corresponding IP address, DNS information and the like to the connection equipment.
When the wireless hotspot service and the DHCP service are started, an IP address setting command is required to be executed to set the IP address of the WiFi module. The IP address setting command is determined based on DHCP configuration information corresponding to the SSID in the DHCP configuration file. The IP address setting commands correspond to the SSIDs, when the DHCP configuration file comprises the DHCP configuration information corresponding to the N SSIDs, the DHCP configuration file comprises N IP address setting commands, and each IP address setting command is used for setting the IP address of the corresponding wireless hotspot. For example, if the DHCP configuration file includes the DHCP configuration information corresponding to the SSID1, the SSID12, and the SSID3, the following commands are executed:
ifconfig wlan0 192.168.66.1up
ifconfig wlan0_0 192.168.67.1up
ifconfig wlan0_1 192.168.68.1up
therefore, the setting of the IP address of the WiFi module can be realized through the command.
As can be seen from the above embodiments, when it is determined that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1, the MAC address of the WiFi module may be obtained, the BSSID of the wireless hotspot is obtained based on the MAC address, hotspot configuration information of each wireless hotspot is generated in combination with the SSID and the hotspot password obtained based on the configuration instruction, and is stored in a hotspot configuration file; the IP address field of each wireless hotspot is determined based on the hotspot configuration information and is stored in the DHCP configuration file, and then the wireless hotspot service and the DHCP service are respectively started according to the hotspot configuration file and the DHCP configuration file, so that a plurality of wireless hotspots are provided by one WiFi module, a plurality of SSIDs are provided without the WiFi modules with corresponding numbers, and the cost is saved.
In one example, since multiple SSIDs can be partitioned for the same WiFi module, multiple wireless hotspots can be provided, and different users can be classified by roles, for example, into a corporate internal group, a customer group, a provider group, and the like. And informing users of different role groups of different SSIDs, thereby realizing that the users of different role groups are connected with different wireless hotspots.
Furthermore, different authorities for accessing network resources can be configured for different IP address segments, so that different authorities for connecting different wireless hotspots to access network resources are realized, and users of different role groups have different network access authorities.
The various technical features in the above embodiments can be arbitrarily combined, so long as there is no conflict or contradiction between the combinations of the features, but the combination is limited by the space and is not described one by one, and therefore, any combination of the various technical features in the above embodiments also belongs to the scope disclosed in the present specification.
The following is illustrated in one combination.
As shown in fig. 2, fig. 2 is a flowchart illustrating another wireless hotspot connection control method according to an exemplary embodiment of the present invention, which may include the following steps 201 to 206:
in step 201, if it is determined whether the SSID number of the wireless hotspot of the same WiFi module is greater than 1 based on the hotspot setting interface, if the SSID number is greater than 1, step 202 is entered, and if the SSID number is equal to 1, step 205 is entered.
In step 202, the MAC address of the WiFi module is obtained, and the MAC address is converted into a MAC address in a specified format, and step 203 is performed.
The MAC address of the specified format satisfies: the BSSID obtained by the wireless hotspot service based on the MAC address in the specified format may be extended by a different BSSID.
In step 203, the MAC address of the WiFi module is reset using the converted MAC address, and step 204 is entered.
In step 204, generating hotspot configuration information of each wireless hotspot by combining the converted MAC address and the SSID and hotspot password in the hotspot setting interface, and storing the hotspot configuration information in a hotspot configuration file; and determining the IP address field of each wireless hotspot based on the hotspot configuration information, generating corresponding DHCP configuration information, storing the DHCP configuration information in a DHCP configuration file, and entering step 206.
In step 205, hotspot configuration information and DHCP configuration information of a single SSID are generated and stored in a hotspot configuration file and a DHCP configuration file, respectively, and the process proceeds to step 206.
The process of generating the hotspot configuration information and the DHCP configuration information of the single SSID is the same as the process of generating the single SSID configuration information in the related art, and is not described herein again.
In step 206, a wireless hotspot service and a DHCP service are respectively started according to the hotspot configuration file and the DHCP configuration file, where the wireless hotspot service allows the connection device to connect to a corresponding wireless hotspot by using a hotspot password corresponding to the SSID.
As can be seen from the above embodiments, according to the fact that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1, single SSID configuration information or multiple SSID configuration information is generated, so that the same WiFi module provides a wireless hotspot with a single SSID or a plurality of SSID wireless hotspots, multiple functions are achieved, and cost can be saved when multiple wireless hotspots are provided.
Corresponding to the embodiment of the wireless hotspot connection control method, the invention also provides embodiments of a wireless hotspot connection control device, electronic equipment applied by the wireless hotspot connection control device and a computer storage medium.
As shown in fig. 3, fig. 3 is a block diagram of a wireless hotspot connection control device according to an exemplary embodiment of the present invention, the device comprising:
the address obtaining module 320 is configured to obtain the MAC address of the WiFi module if it is determined that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1 based on the configuration instruction of the wireless hotspots.
The first information storage module 340 is configured to obtain BSSIDs of the wireless hotspots based on the MAC addresses, generate hotspot configuration information of each wireless hotspot by combining SSIDs and hotspot passwords of at least two wireless hotspots obtained based on the configuration instruction, and store the hotspot configuration information in a hotspot configuration file.
And a second information storage module 360, configured to determine an IP address field of each wireless hotspot based on the hotspot configuration information, and store the IP address field in a DHCP configuration file.
And a service starting module 380, configured to respectively start a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, where the wireless hotspot service allows the connection device to connect a corresponding wireless hotspot by using a hotspot password corresponding to each SSID.
As can be seen from the above embodiments, when it is determined that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1, the MAC address of the WiFi module may be obtained, the BSSID of the wireless hotspot is obtained based on the MAC address, hotspot configuration information of each wireless hotspot is generated in combination with the SSID and the hotspot password obtained based on the configuration instruction, and is stored in a hotspot configuration file; the IP address field of each wireless hotspot is determined based on the hotspot configuration information and is stored in the DHCP configuration file, and then the wireless hotspot service and the DHCP service are respectively started according to the hotspot configuration file and the DHCP configuration file, so that a plurality of wireless hotspots are provided by one WiFi module, a plurality of SSIDs are provided without the WiFi modules with corresponding numbers, and the cost is saved.
In an optional implementation manner, a hotspot setting interface for setting at least two wireless hotspots is preconfigured, and the address obtaining module 320 is specifically configured to:
and if at least two SSID input controls in the hotspot setting interface are not empty, determining that the number of SSIDs of the wireless hotspots of the same WiFi module is more than 1, wherein the SSID input controls are controls for inputting the SSIDs.
In an optional implementation manner, the first information storage module 340 is specifically configured to:
converting the MAC address into a MAC address with a specified format, wherein the MAC address with the specified format satisfies the following conditions: the BSSID obtained by the wireless hotspot service based on the MAC address with the specified format can be expanded into different BSSIDs;
and resetting the MAC address of the WiFi module by using the converted MAC address, and acquiring a BSSID corresponding to one SSID based on the reset MAC address, so that the wireless hotspot service expands the BSSIDs corresponding to other SSIDs based on the acquired BSSID.
In an optional implementation manner, the hotspot setting interface includes a specified original SSID and at least one extended SSID, and the first information storage module 340 is further configured to: and if the hotspot password corresponding to the extended SSID in the hotspot setting interface is empty and the hotspot password corresponding to the original SSID is not empty, taking the hotspot password corresponding to the original SSID as the hotspot password corresponding to the extended SSID.
In an alternative implementation, different rights to access network resources are configured for different segments of the IP address.
Correspondingly, the invention also provides electronic equipment, which comprises a processor; a memory for storing processor-executable instructions; wherein the processor is configured to:
if the number of SSIDs of wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots, obtaining the MAC address of the WiFi module;
acquiring BSSIDs of wireless hotspots based on the MAC addresses, generating hotspot configuration information of each wireless hotspot by combining SSIDs and hotspot passwords of at least two wireless hotspots acquired based on the configuration instruction, and storing the hotspot configuration information in a hotspot configuration file;
determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file;
and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
Accordingly, an embodiment of the present invention provides a computer storage medium, where program instructions are stored in the storage medium, where the program instructions include:
if the number of SSIDs of wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots, obtaining the MAC address of the WiFi module;
acquiring BSSIDs of wireless hotspots based on the MAC addresses, generating hotspot configuration information of each wireless hotspot by combining SSIDs and hotspot passwords of at least two wireless hotspots acquired based on the configuration instruction, and storing the hotspot configuration information in a hotspot configuration file;
determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file;
and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
The present invention may take the form of a computer program product embodied on one or more storage media including, but not limited to, disk storage, CD-ROM, optical storage, and the like, having program code embodied therein. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the storage medium of the computer include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
The specific details of the implementation process of the functions and actions of each module in the device are referred to the implementation process of the corresponding step in the method, and are not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
The embodiment of the wireless hotspot connection control device can be applied to electronic equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 4, a hardware structure diagram of an electronic device where a wireless hotspot connection control apparatus 432 is shown according to an exemplary embodiment of the present invention is shown, except for the processor 410, the memory 430, the network interface 420, and the nonvolatile memory 440 shown in fig. 4, the electronic device where the apparatus 432 is located in the embodiment may also include other hardware generally according to the actual function of the electronic device, which is not described again.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. A method for controlling wireless hotspot connection, the method comprising:
if the number of SSIDs of wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots, obtaining the MAC address of the WiFi module;
converting the MAC address into a MAC address with a specified format, wherein the MAC address with the specified format satisfies the following conditions: the BSSID obtained by the wireless hotspot service based on the MAC address with the specified format can be expanded into different BSSIDs;
the MAC address of the WiFi module is reset by using the converted MAC address, and a BSSID corresponding to one SSID is obtained based on the reset MAC address, so that the BSSID corresponding to other SSIDs is expanded by the wireless hotspot service based on the obtained BSSID;
combining the obtained BSSID of the wireless hotspot and the SSID and hotspot password of at least two wireless hotspots obtained based on the configuration instruction to generate hotspot configuration information of each wireless hotspot, and storing the hotspot configuration information in a hotspot configuration file;
determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file;
and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
2. The method of claim 1, wherein a hotspot configuration interface is preconfigured for setting at least two wireless hotspots, and wherein determining that the number of SSIDs of wireless hotspots of the same WiFi module is greater than 1 based on the configuration instructions for the wireless hotspots comprises:
and if at least two SSID input controls in the hotspot setting interface are not empty, determining that the number of SSIDs of the wireless hotspots of the same WiFi module is more than 1, wherein the SSID input controls are controls for inputting the SSIDs.
3. The method of claim 2, wherein the hotspot provisioning interface includes a specified original SSID and at least one extended SSID, the method further comprising:
and if the hotspot password corresponding to the extended SSID in the hotspot setting interface is empty and the hotspot password corresponding to the original SSID is not empty, taking the hotspot password corresponding to the original SSID as the hotspot password corresponding to the extended SSID.
4. A method according to any one of claims 1 to 3, wherein different IP address segments are configured with different rights to access network resources.
5. A wireless hotspot connection control apparatus, the apparatus comprising:
the address acquisition module is used for acquiring the MAC address of the WiFi module if the SSID number of the wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots;
a first information storage module, configured to convert the MAC address into a MAC address in a specified format, where the MAC address in the specified format satisfies: the BSSID obtained by the wireless hotspot service based on the MAC address with the specified format can be expanded into different BSSIDs; the MAC address of the WiFi module is reset by using the converted MAC address, and a BSSID corresponding to one SSID is obtained based on the reset MAC address, so that the BSSID corresponding to other SSIDs is expanded by the wireless hotspot service based on the obtained BSSID; combining the obtained BSSID of the wireless hotspot and the SSID and hotspot password of at least two wireless hotspots obtained based on the configuration instruction to generate hotspot configuration information of each wireless hotspot, and storing the hotspot configuration information in a hotspot configuration file;
the second information storage module is used for determining the IP address field of each wireless hotspot based on the hotspot configuration information and storing the IP address field in a DHCP configuration file;
and the service starting module is used for respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connecting equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
6. The apparatus according to claim 5, wherein a hotspot setting interface for setting at least two wireless hotspots is preconfigured, and the address obtaining module is specifically configured to:
and if at least two SSID input controls in the hotspot setting interface are not empty, determining that the number of SSIDs of the wireless hotspots of the same WiFi module is more than 1, wherein the SSID input controls are controls for inputting the SSIDs.
7. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
if the number of SSIDs of wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots, obtaining the MAC address of the WiFi module;
converting the MAC address into a MAC address with a specified format, wherein the MAC address with the specified format satisfies the following conditions: the BSSID obtained by the wireless hotspot service based on the MAC address with the specified format can be expanded into different BSSIDs;
the MAC address of the WiFi module is reset by using the converted MAC address, and a BSSID corresponding to one SSID is obtained based on the reset MAC address, so that the BSSID corresponding to other SSIDs is expanded by the wireless hotspot service based on the obtained BSSID;
combining the obtained BSSID of the wireless hotspot and the SSID and hotspot password of at least two wireless hotspots obtained based on the configuration instruction to generate hotspot configuration information of each wireless hotspot, and storing the hotspot configuration information in a hotspot configuration file;
determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file;
and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
8. A computer storage medium having stored therein program instructions, the program instructions comprising:
if the number of SSIDs of wireless hotspots of the same WiFi module is larger than 1 based on the configuration instruction of the wireless hotspots, obtaining the MAC address of the WiFi module;
converting the MAC address into a MAC address with a specified format, wherein the MAC address with the specified format satisfies the following conditions: the BSSID obtained by the wireless hotspot service based on the MAC address with the specified format can be expanded into different BSSIDs;
the MAC address of the WiFi module is reset by using the converted MAC address, and a BSSID corresponding to one SSID is obtained based on the reset MAC address, so that the BSSID corresponding to other SSIDs is expanded by the wireless hotspot service based on the obtained BSSID;
combining the obtained BSSID of the wireless hotspot and the SSID and hotspot password of at least two wireless hotspots obtained based on the configuration instruction to generate hotspot configuration information of each wireless hotspot, and storing the hotspot configuration information in a hotspot configuration file;
determining an IP address field of each wireless hotspot based on the hotspot configuration information, and storing the IP address field in a DHCP configuration file;
and respectively starting a wireless hotspot service and a DHCP service according to the hotspot configuration file and the DHCP configuration file, wherein the wireless hotspot service allows the connection equipment to connect corresponding wireless hotspots by using hotspot passwords corresponding to the SSIDs.
CN201710551694.1A 2017-07-07 2017-07-07 Wireless hotspot connection control method, device and equipment and computer storage medium Active CN107396358B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710551694.1A CN107396358B (en) 2017-07-07 2017-07-07 Wireless hotspot connection control method, device and equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710551694.1A CN107396358B (en) 2017-07-07 2017-07-07 Wireless hotspot connection control method, device and equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN107396358A CN107396358A (en) 2017-11-24
CN107396358B true CN107396358B (en) 2020-07-07

Family

ID=60335478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710551694.1A Active CN107396358B (en) 2017-07-07 2017-07-07 Wireless hotspot connection control method, device and equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN107396358B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109587665B (en) * 2018-11-20 2023-06-06 陕西师范大学 WiFi networking method and device without SSID broadcasting
CN111246454A (en) * 2018-11-29 2020-06-05 千寻位置网络有限公司 Internet access method and device for iOS device, iOS device and interaction system
CN111328116A (en) * 2020-01-20 2020-06-23 广州华欣电子科技有限公司 Control method and system for dual-mode coexistence of wireless equipment and wireless equipment
CN112688811B (en) * 2020-12-22 2023-03-24 北京天融信网络安全技术有限公司 Wireless local area network management method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160254941A1 (en) * 2013-10-09 2016-09-01 Beijing Qihoo Technology Company Limited Apparatus And Method For Managing Network Access Device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160254941A1 (en) * 2013-10-09 2016-09-01 Beijing Qihoo Technology Company Limited Apparatus And Method For Managing Network Access Device

Also Published As

Publication number Publication date
CN107396358A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN107396358B (en) Wireless hotspot connection control method, device and equipment and computer storage medium
EP3327992B1 (en) Method of selecting network slice and system utilizing same
US11089476B2 (en) Network access control method and apparatus
JP6995189B2 (en) Data transmission methods, devices, and systems
EP3496427B1 (en) Method and device for networking devices
US11337147B2 (en) Dynamic roaming partner prioritization based on service quality feedback
EP3883188A1 (en) Network function nf management method and nf management device
CN105188056A (en) Method and device for connecting WiFi (Wireless Fidelity) equipment with access point
CN101310549A (en) Access network, gateway and management server for a cellular wireless communication system
US20190334766A1 (en) Wireless communication equipment and method for configuring mesh network thereof
KR20220045943A (en) Apparatus and Method for connecting to WiFi based on BLE beacon
US20170034704A1 (en) Wireless local area network user-side device and information processing method
CN105101274A (en) Configuration method and device of message forwarding mode
KR20160007631A (en) System and method of anqp querying using a common anqp group version
EP3637859B1 (en) Hidden hotspot scanning based on a match of mac addresses
US20150109958A1 (en) Transmission path control device
WO2022067813A1 (en) Cell search method applied to terminal, and communication apparatus
CN112566286B (en) Set top box AP mode realization method and device, set top box and storage medium
CN111510467B (en) Screen projection code generation method, equipment connection code generation method and device
CN106714177B (en) Method for distinguishing wireless hotspots with same name and electronic equipment
US20220329600A1 (en) Fast access to local area network (lan) graphical user interface (gui) by client device
CN103999407A (en) Method, device and system for automatically accessing network system
US20230232320A1 (en) Method and system for enhanced channel map advertisements
JP7060823B2 (en) Communication systems, communication devices and programs
CN116647847A (en) Communication method and intelligent device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200319

Address after: 510530 Guangdong city of Guangzhou province YUNPU Whampoa district four Road No. 6

Applicant after: Guangzhou Shiyuan Electronic Technology Company Limited

Address before: 510530 Guangdong city of Guangzhou province YUNPU Whampoa district four Road No. 6

Applicant before: Guangzhou Shiyuan Electronic Technology Company Limited

Applicant before: SHENZHEN KAISHI ELECTRONIC TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant