CN106231589B - method and device for hiding SSID broadcast based on Android system Soft AP - Google Patents
method and device for hiding SSID broadcast based on Android system Soft AP Download PDFInfo
- Publication number
- CN106231589B CN106231589B CN201610814315.9A CN201610814315A CN106231589B CN 106231589 B CN106231589 B CN 106231589B CN 201610814315 A CN201610814315 A CN 201610814315A CN 106231589 B CN106231589 B CN 106231589B
- Authority
- CN
- China
- Prior art keywords
- ssid
- broadcast
- soft
- configuration file
- attribute
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 title abstract 8
- 230000006872 improvement Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/02—Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/02—Access restriction performed under specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/20—Selecting an access point
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a method for hiding SSID broadcast based on an Android system Soft AP, which is characterized by comprising the following steps: receiving the information of hiding the SSID input by a user; generating a Wiconfiguration object with corresponding hidden/broadcast SSID attributes according to the information of the yes/no hidden SSID input by the user, and sending the Wiconfiguration object to a corresponding software interface; and if the SSID attribute in the WifiConfiguration object is judged to be the hidden SSID attribute, transmitting corresponding parameters to the Netd service to generate a corresponding configuration file, thereby starting the Soft AP in the non-broadcast SSID mode.
Description
Technical Field
The invention relates to the technical field of wireless networks, in particular to a method for hiding SSID broadcast based on an Android system Soft AP.
background
with the development of wireless network technology, many smart home systems, internet of things systems and sensor network systems begin to use wireless network communication technology. At present, a wireless network uses a wireless access point ap (access point) within a certain range to implement communication between a terminal and a wired lan. In the range covered by the AP, the terminal acquires an SSID (Service Set Identifier) by detecting the received wireless signal, and can access the network through the wireless AP.
some wireless network access points may need to hide their own network information based on security or other considerations, in which case only terminal devices that know the SSID of the wireless network in advance can connect to the wireless network. Similarly, in the wireless Soft AP in the Android system, the hidden function of the SSID needs to be set to meet the requirement of the user for privacy.
Disclosure of Invention
The embodiment of the invention aims to provide a method for hiding an SSID (service set identifier) of a Soft AP (access point) based on an Android system, which can effectively solve the problem of SSID hiding of the wireless Soft AP and is beneficial to secrecy protection of network information.
In order to achieve the above object, an embodiment of the present invention provides a method for hiding an SSID based on a Soft AP in an Android system, including:
Receiving the information of hiding the SSID input by a user;
generating a Wiconfiguration object with corresponding hidden/broadcast SSID attributes according to the information of the yes/no hidden SSID input by the user, and sending the Wiconfiguration object to a corresponding software interface;
And if the SSID attribute in the WifiConfiguration object is judged to be the hidden SSID attribute, transmitting corresponding parameters to the Netd service to generate a corresponding configuration file, and starting the SoftAP in the non-broadcast SSID mode.
compared with the prior art, the Android system based method for hiding the SSID of the Soft AP disclosed by the invention has the advantages that by receiving the information whether the SSID is hidden or not input by a user, a Wificfiguration object with a hidden/broadcast SSID attribute is further generated, and a corresponding Soft AP configuration file is further generated, so that the Soft AP with a corresponding function is started, the problem that the network information needs to be protected in the process of sharing the AP by the user is solved, the network safety of equipment is protected, and the power consumption of the equipment is reduced.
As an improvement of the above scheme, the configuration file includes a "hidden SSID broadcast" parameter; when the judging module judges that the SSID attribute in the Wifi configuration object is a hidden attribute, the parameter value of the hidden SSID broadcast is 1; and when the judging module judges that the SSID attribute in the Wifi configuration object is a broadcast attribute, the parameter value of the hidden SSID broadcast is 0.
as an improvement of the above scheme, the Soft AP which starts the non-broadcast SSID mode specifically is:
Transmitting a 'Soft AP starting' parameter to a network service through a Framework, and calling a hostapd service; wherein the parameter value of the starting Soft AP is 1.
starting a Soft AP in a non-broadcast SSID mode by the hostapd service according to the configuration file.
As an improvement of the above, the method further comprises the steps of: and if the SSID attribute in the WifiConfiguration object is judged to be a broadcast attribute, transmitting corresponding parameters to the Netd service to generate a corresponding configuration file, and starting a Soft AP in a broadcast SSID mode.
as an improvement of the above scheme, the Soft AP which starts the broadcast SSID mode specifically is:
transmitting a 'Soft AP starting' parameter to a network service through a Framework, and calling a hostapd service;
And starting a Soft AP in a broadcast SSID mode by the hostapd service according to the configuration file.
The invention correspondingly provides a device for hiding SSID broadcast based on an Android system Soft AP, which comprises the following steps:
the information receiving module is used for receiving the information of hiding the SSID (service set identifier) input by a user;
A Wificonfiguration object generating module, configured to generate a Wificonfiguration object with a hidden/broadcast SSID attribute, and transmit the Wificonfiguration object to a corresponding software interface;
A judging module, configured to judge an SSID attribute in the WifiConfiguration object;
And the configuration file generation module is used for transmitting corresponding parameters to the Netd service to generate a corresponding configuration file when the judgment module judges that the SSID attribute in the Wifi configuration object is the hidden SSID attribute, so that the Soft AP in the non-broadcast SSID mode is started.
As an improvement of the above solution, the configuration file generating module is further configured to, when the determining module determines that the SSID attribute in the WifiConfiguration object is a broadcast SSID attribute, transmit corresponding parameters to a Netd service to generate a corresponding configuration file, and start a Soft AP in a broadcast SSID mode.
as an improvement of the above solution, the configuration file generated by the configuration file generation module includes a "hidden SSID broadcast" parameter.
As an improvement of the above solution, the apparatus further includes a hostapd calling module, where the hostapd calling module is configured to call a hostapd service according to the configuration file generated by the configuration file module and start a Soft AP in a non-broadcast SSID mode when the determination module determines that the SSID attribute in the WifiConfiguration object is a hidden attribute.
as an improvement of the foregoing solution, the hostapd invoking module is further configured to invoke a hostapd service according to the configuration file generated by the configuration file generating module and start a Soft AP in a broadcast SSID mode when the determining module determines that the SSID attribute in the WifiConfiguration object is a broadcast attribute.
drawings
fig. 1 is a flowchart of a method for hiding an SSID based on a Soft AP in an Android system in embodiment 1 of the present invention.
fig. 2 is a flowchart of a method for hiding SSID based on Android system Soft AP provided in embodiment 2 of the present invention
Fig. 3 is a schematic structural diagram of a device for hiding SSID based on Soft AP in Android system according to embodiment 3 of the present invention
Detailed Description
the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for hiding an SSID based on a Soft AP in an Android system according to embodiment 1 of the present invention. As shown in fig. 1, a method for hiding SSID based on Android system Soft AP includes the steps of:
s11, receiving the information of yes/no hidden SSID input by the user;
S12, generating a configuration object with corresponding hidden/broadcast SSID attribute according to the information of the yes/no hidden SSID input by the user, and sending the configuration object to a corresponding software interface;
s13, if the SSID attribute in the WifiConfiguration object is judged to be the hidden SSID attribute, transmitting corresponding parameters to the Net d service to generate a corresponding configuration file, and starting the Soft AP in the non-broadcast SSID mode.
the Soft AP is a virtual AP, after the virtual AP function is started on the wireless network card through a driver, the Soft AP can replace a wireless network AP to provide the functions of signal switching, routing and the like as those of the AP, and other wireless clients and the virtual AP are in wireless connection to share wireless internet access. Soft AP has low cost, can realize a shared network only by a standard wireless network card and integrated driving software, and is widely applied to terminal equipment such as mobile phones, tablet computers and the like.
In this embodiment, a corresponding software interface is implemented through an Android Framework, the wiconfiguration object is transmitted to a net service to generate a corresponding configuration file, and when an SSID attribute in the wiconfiguration object is a hidden SSID attribute, the configuration file contains information that a "hidden SSID" parameter value is 1, so that a Soft AP in a non-broadcast SSID mode is started. The method for hiding the SSID based on the Android system Soft AP is simple in process and easy to implement.
fig. 2 is a flowchart of a method for hiding an SSID based on a Soft AP in an Android system according to embodiment 2 of the present invention. As shown in fig. 1, a method for hiding SSID based on Android system Soft AP includes the steps of:
S21, receiving the information of yes/no hidden SSID input by the user;
s22, generating a configuration object with corresponding hidden/broadcast SSID attribute according to the information of the yes/no hidden SSID input by the user, and sending the configuration object to a corresponding software interface;
S23, judging the SSID attribute in the WifiConfiguration object;
s24, if the SSID attribute in the Wificonfiguration object is judged to be a hidden SSID attribute, transmitting corresponding parameters to a network service to generate a corresponding configuration file, simultaneously transmitting a 'Soft AP starting' parameter to the network service through a Framework, calling a hostapd service, and starting a Soft AP in a non-broadcast SSID mode by the hostapd service according to the configuration file;
S25, if the SSID attribute in the Wificonfiguration object is judged to be the broadcast attribute, corresponding parameters are transmitted to the Net service to generate a corresponding configuration file, meanwhile, a 'Soft AP starting' parameter is transmitted to the Net service through the Framework, a hostapd service is called, and the hostapd service starts the Soft AP in the broadcast SSID mode according to the configuration file.
The Netd service is a background daemon specially responsible for network management and control in the Android system, and a central module for forwarding and processing network related messages and commands in the Android system, and is mainly responsible for realizing functions related to network operation of some physical ports. The hostapd service is a daemon process of a user space, and the hostapd service has a function of serving as an authentication server of the AP and is responsible for controlling and managing access and authentication of the terminal equipment. According to the configuration file, the hostapd service can set various parameters of the wireless network card.
In this embodiment, first, receiving information of whether the SSID is hidden or not input by a user, generating a configuration object with a corresponding hidden/broadcast SSID attribute, and transmitting the configuration object to enable the Netd service to generate a corresponding configuration file, where the configuration file contains parameter information of a "hidden SSID"; meanwhile, when the frame is used for transferring 'Soft AP starting' to the Net service, a hostapd service is called, and the hostapd service starts the Soft AP with the corresponding function according to the generated configuration file. In this embodiment, broadcast mode and non-broadcast mode of Soft AP can be set using hostapd.
fig. 3 is a schematic structural diagram of a device for hiding an SSID based on a Soft AP in an Android system according to embodiment 3 of the present invention. As shown in fig. 3, the apparatus 100 for hiding an SSID based on a Soft AP in an Android system provided in embodiment 3 of the present invention includes an information receiving module 101, a configuration object generating module 102, a determining module 103, a configuration file generating module 104, and a hostapd calling module 105. Wherein:
The information receiving module 101 is configured to receive information on whether the SSID is hidden or not, which is input by a user; the configuration object generating module 102 is configured to generate a configuration object with hidden/broadcast SSID attributes, and send the configuration object to a corresponding software interface; the determining module 103 is configured to determine an SSID attribute in the WifiConfiguration object; the configuration file generating module 104 is configured to generate a corresponding configuration file generating module according to the result output by the judging module 103, so as to start a Soft AP with a corresponding function; the hostapd calling module 105 is configured to call a hostapd service according to the configuration file, and start SoftAP with a corresponding function.
next, the operation of the device 100 for hiding the SSID based on the Android system Soft AP in this embodiment will be described in detail. After the receiving information receiving module 101 receives the information of yes/no hidden SSID input by the user, the wiconfiguration object generating module 102 correspondingly generates a wiconfiguration object with a hidden/broadcast SSID attribute, and sends the wiconfiguration object to a corresponding software interface. The determination module 103 receives the WifiConfiguration object and determines the SSID attribute in the WifiConfiguration object. When the determining module 103 determines that the SSID attribute in the WifiConfiguration object is a hidden SSID attribute, the configuration file generating module 104 generates a corresponding configuration file for corresponding parameters transmitted to the Netd service, where the corresponding parameters include a "start Soft AP" parameter, the configuration file includes a "hidden SSID" parameter, and the parameter value of the "hidden SSID" and the parameter value of the "start Soft AP" are both 1. According to the above parameter values, the hostapd calling module 105 calls hostapd service according to the configuration file, and starts Soft AP in non-broadcast SSID mode. When the determining module 103 determines that the SSID attribute in the WifiConfiguration object is a broadcast SSID attribute, the configuration file generating module 104 generates a corresponding configuration file for corresponding parameters transferred to the Netd service, where the corresponding parameters include a "start Soft AP" parameter, the configuration file includes a "hidden SSID" parameter, a parameter value of the "start Soft AP" is 1, and a parameter value of the "hidden SSID" of the configuration file is 0. According to the above parameter values, the hostapd calling module 105 calls hostapd service according to the configuration file, and starts Soft AP broadcasting SSID mode.
In summary, in the embodiment of the present invention, the information of whether the SSID is hidden and inputted by the user is received in the Android system, so that the Netd service is controlled to generate the corresponding configuration file, thereby starting the Soft AP in the broadcast/non-broadcast SSID mode, and the method and the device are simple in process, can effectively solve the SSID hiding problem of the wireless Soft AP, and are beneficial to protecting the privacy of the user network information.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.
Claims (6)
1. a method for hiding SSID broadcast based on Android system Soft AP is characterized by comprising the following steps:
Receiving the information of hiding the SSID input by a user;
Generating a Wiconfiguration object with corresponding hidden/broadcast SSID attributes according to the information of the yes/no hidden SSID input by the user, and sending the Wiconfiguration object to a corresponding software interface;
If the SSID attribute in the WifiConfiguration object is judged to be a hidden SSID attribute, transmitting corresponding parameters to the Netd service to generate a corresponding configuration file, and starting a Soft AP in a non-broadcast SSID mode;
Wherein the configuration file comprises a "hidden SSID broadcast" parameter; and the parameter value of the hidden SSID broadcast is 1;
the Soft AP starting the non-broadcast SSID mode specifically includes:
Transmitting a 'Soft AP starting' parameter to a network service through a Framework, and calling a hostapd service;
starting a Soft AP in a non-broadcast SSID mode by the hostapd service according to the configuration file.
2. The Android system Soft AP hidden SSID broadcast-based method of claim 1, further comprising the steps of:
And if the SSID attribute in the WifiConfiguration object is judged to be a broadcast attribute, transmitting corresponding parameters to the Netd service to generate a corresponding configuration file, and starting a Soft AP in a broadcast SSID mode.
3. the Android system Soft AP hidden SSID broadcasting method of claim 2, wherein the Soft AP starting up the broadcast SSID mode specifically comprises:
transmitting a 'Soft AP starting' parameter to a network service through a Framework, and calling a hostapd service;
And starting a Soft AP in a broadcast SSID mode by the hostapd service according to the configuration file.
4. The utility model provides a device based on Android system Soft AP hides SSID broadcast which characterized in that includes:
the information receiving module is used for receiving the information of hiding the SSID (service set identifier) input by a user;
A Wiconfiguration object generation module: generating a WifiConfiguration object with a hidden/broadcast SSID attribute, and transmitting the WifiConfiguration object to a corresponding software interface;
A judging module, configured to judge an SSID attribute in the WifiConfiguration object;
A configuration file generation module, configured to, when the determination module determines that the SSID attribute in the WifiConfiguration object is a hidden SSID attribute, transmit corresponding parameters to a Netd service to generate a corresponding configuration file, so as to start a Soft AP in a non-broadcast SSID mode; wherein the configuration file comprises a "hidden SSID broadcast" parameter; and the parameter value of the hidden SSID is 1;
The device also comprises a hostapd calling module, wherein the hostapd calling module is used for calling hostapd service according to the configuration file generated by the configuration file module and starting Soft AP in a non-broadcast SSID mode when the judgment module judges that the SSID attribute in the Wificonfiguration object is the hidden SSID attribute.
5. the device for hiding SSID broadcast based on Android system Soft AP of claim 4, wherein the configuration file generating module is further configured to, when the determining module determines that the SSID attribute in the Wificonfiguration object is a broadcast SSID attribute, transmit corresponding parameters to a Net d service to generate a corresponding configuration file, thereby starting the Soft AP in broadcast SSID mode.
6. the device for hiding SSID broadcast based on Android system Soft AP of claim 4, wherein the hostapd calling module is further configured to call a hostapd service according to the configuration file generated by the configuration file generating module and start a Soft AP in a broadcast SSID mode when the judging module judges that the SSID attribute in the Wificonfiguration object is a broadcast SSID attribute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610814315.9A CN106231589B (en) | 2016-09-09 | 2016-09-09 | method and device for hiding SSID broadcast based on Android system Soft AP |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610814315.9A CN106231589B (en) | 2016-09-09 | 2016-09-09 | method and device for hiding SSID broadcast based on Android system Soft AP |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106231589A CN106231589A (en) | 2016-12-14 |
CN106231589B true CN106231589B (en) | 2019-12-17 |
Family
ID=58074848
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610814315.9A Active CN106231589B (en) | 2016-09-09 | 2016-09-09 | method and device for hiding SSID broadcast based on Android system Soft AP |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106231589B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140095687A1 (en) * | 2011-12-09 | 2014-04-03 | Huawei Device Co., Ltd. | Method, device, and system for managing mobile broadband device |
-
2016
- 2016-09-09 CN CN201610814315.9A patent/CN106231589B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140095687A1 (en) * | 2011-12-09 | 2014-04-03 | Huawei Device Co., Ltd. | Method, device, and system for managing mobile broadband device |
Also Published As
Publication number | Publication date |
---|---|
CN106231589A (en) | 2016-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11310239B2 (en) | Network connection method, hotspot terminal and management terminal | |
EP3627777B1 (en) | Message transmission method and device, terminal and storage medium | |
CN104080086B (en) | Wireless connecting establishment method and wireless connection establish device | |
CN106358265B (en) | Method and device for accessing intelligent terminal equipment to Internet | |
CN109842924B (en) | Position acquisition control method, user terminal and device | |
CN102685025B (en) | A kind of multiple terminals business switch method, terminal and system | |
CN107567017B (en) | Wireless connection system, device and method | |
CA2871994C (en) | Short-range wireless communication device | |
KR102005998B1 (en) | Method, apparatus, and system for joining nodes to a network | |
CN104009925A (en) | Method and device for establishing bridge connection with router and router | |
WO2020252958A1 (en) | Intercom communication method, device and system, storage medium and intercom | |
CN106850703B (en) | Communication method based on social identity and server | |
CN107948178A (en) | Intelligent domestic system and information ciphering method and device, terminal | |
CN110944406A (en) | Link establishment method of sidelink and terminal | |
CN108012270B (en) | Information processing method, equipment and computer readable storage medium | |
CN110958308B (en) | Method for network distribution, Internet of things equipment and access equipment | |
CN103345828A (en) | Method and system for controlling computer through intelligent terminal | |
CN111752289B (en) | Unmanned aerial vehicle control method and related device | |
WO2016082107A1 (en) | Interface sharing method and terminal device | |
WO2017031661A1 (en) | Device association method and related device | |
CN108702288A (en) | Data transmission method, equipment and system | |
CN104158954B (en) | Method and system for controlling mobile terminals | |
CN106231589B (en) | method and device for hiding SSID broadcast based on Android system Soft AP | |
CN112583920B (en) | Push method, push device, electronic equipment and storage medium | |
CN111615143A (en) | Information reporting method, information receiving method, terminal and network control entity |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |