CN107370621A - Focus sharing method, readable storage medium storing program for executing and focus sharing means - Google Patents
Focus sharing method, readable storage medium storing program for executing and focus sharing means Download PDFInfo
- Publication number
- CN107370621A CN107370621A CN201710549432.1A CN201710549432A CN107370621A CN 107370621 A CN107370621 A CN 107370621A CN 201710549432 A CN201710549432 A CN 201710549432A CN 107370621 A CN107370621 A CN 107370621A
- Authority
- CN
- China
- Prior art keywords
- equipment
- focus
- configuration
- configuration file
- hotspot
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000000605 extraction Methods 0.000 claims description 21
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 2
- 238000013461 design Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Classifications
-
- 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
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0823—Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a kind of focus sharing method, readable storage medium storing program for executing and focus sharing means, method to include:The AP information of equipment to be connected is obtained, focus connection profile, hotspot service configuration file and host configuration and domain name service configuration file are generated according to AP information respectively;Hotspot service configuration file is loaded, the configuration information in hotspot service configuration file configures to default port, so as to preset port open focus function and generate network equipment node;Host configuration and domain name service configuration file are loaded, to start main frame configuration service, and network equipment node is arranged to bridge coil equipment;Load focus connection profile, configuration information in focus connection profile configures to bridge coil equipment, so that bridge coil equipment is connected with equipment to be connected, the present invention realizes single equipment under WiFi module with Wi-Fi hotspot bridging functionality between another equipment on the basis of existing hardware by the expansion to software function.
Description
Technical field
The present invention relates to communication technical field, more particularly to a kind of focus sharing method, readable storage medium storing program for executing and focus are total to
Enjoy device.
Background technology
With the development people's living standards continue to improve in epoch, the use of smart machine is also more and more extensive, and
In the network function of smart machine, its WiFi linkage function and focus sharing function play vital effect, WiFi connections
Function is used to smart machine and the WiFi network of outside being attached, so that smart machine is carried out by the WiFi network of outside
Data forwarding, and focus function is used to share miscellaneous equipment progress network.
In existing focus sharing method, single terminal equipment passes through between the real-time performance of itself and another terminal device
Hot spot networks share.
Existing focus sharing method when single terminal end equipment under WiFi module to another terminal share Wi-Fi hotspot when,
Two sets of hotspot devices must be used on hardware, and then make it that cost is higher and increases the volume of device, and due to using two
Set hotspot device increases the data processing step of system, and then reduces the shared efficiency of focus.
The content of the invention
Based on this, the purpose of the embodiment of the present invention is to provide a kind of realizes that the focus under WiFi patterns is shared by software
Method, readable storage medium storing program for executing and focus sharing means.
A kind of focus sharing method, methods described include:
The AP information of equipment to be connected is obtained, and focus connection profile, focus are generated according to the AP information respectively
Service profiles and host configuration and domain name service configuration file;
The hotspot service configuration file is loaded, and the configuration information in the hotspot service configuration file is to default
Port is configured, so as to the default port open Wi-Fi hotspot function and generate network equipment node;
The host configuration and domain name service configuration file are loaded, to start main frame configuration service, and by the net
Network device node is arranged to bridge coil equipment;
The focus connection profile is loaded, and the configuration information in the focus connection profile is to described
Bridge coil equipment is configured, so that the bridge coil equipment is connected with the equipment to be connected.
Above-mentioned focus sharing method, by obtaining the AP information of the equipment to be connected, so as to generate institute respectively
Focus connection profile, the hotspot service configuration file and the host configuration and domain name service configuration file are stated,
The hotspot service configuration file is used to configure the default port, so that the default port open WiFi linkage functions and life
Into the network equipment node, the host configuration and domain name service configuration file are used to start the main frame configuration clothes
Business, so as to proceed by the information configuration of network ip address, and is arranged to the bridge coil by the network equipment node and sets
Standby, the focus connection profile is used for the address information that the equipment to be connected is provided for the bridge coil equipment, with
The bridge coil equipment is connected with the equipment to be connected, reach bridging functionality between two Wi-Fi hotspots, above-mentioned side
Method realizes single terminal end equipment under WiFi module with another on the basis of existing hardware by the expansion to software function
Wi-Fi hotspot bridging functionality between terminal, and flow simply without adding other equipment and then having saved cost in addition.
Further, methods described also includes:
The support instruction being locally stored is inquired about and performed, forwarded function is supported to open;
The forwarding instruction being locally stored is inquired about and performs, to open the route forwarding function of the bridge coil equipment;
The rule addition instruction being locally stored is inquired about and performs, to open the rule addition work(of the bridge coil equipment
Energy.
Further, the loading hotspot service configuration file, and according in the hotspot service configuration file
The step of configuration information configures to default port includes:
The network configuration item in the hotspot service configuration file is extracted, and obtains the port address of the default port,
The network configuration item is wds_sta=1, and the default port is device node wlan0;
Hotspot service is started to the port address according to the network configuration item information.
Further, it is described and include the step of the network equipment node is arranged into bridge coil equipment:
Extract the pre-set commands being locally stored;
The pre-set commands are sent to the network equipment node, and performed on the network equipment node described pre-
If order, so as to which the network equipment node is arranged into the bridge coil equipment.
Further, the loading focus connection profile, and according in the focus connection profile
The step of configuration information configures to the bridge coil equipment includes:
Extract the SSID configuration informations and password configuration information to be connected in the focus configuration file;
The SSID configuration informations to be connected and the password configuration information are sent to the bridge coil equipment.
A kind of readable storage medium storing program for executing, is stored thereon with computer program, is realized as described above when the program is executed by processor
The step of method described in any one.
A kind of focus sharing means, including:
Acquisition module, focus connection is generated respectively for obtaining the AP information of equipment to be connected, and according to the AP information
Configuration file, hotspot service configuration file and host configuration and domain name service configuration file;
First load-on module, for loading the hotspot service configuration file, and according to the hotspot service configuration file
In configuration information default port is configured, so as to the default port open Wi-Fi hotspot function and generate the network equipment
Node;
Second load-on module, for loading the host configuration and domain name service configuration file, matched somebody with somebody with starting main frame
The service of putting, and the network equipment node is arranged to bridge coil equipment;
3rd load-on module, for loading the focus connection profile, and according to the focus connection profile
In configuration information the bridge coil equipment is configured so that the bridge coil equipment connects with the equipment to be connected
Connect.
Above-mentioned focus sharing means, can be by obtaining the AP information to obtain by the design of the acquisition module
Focus connection profile, the hotspot service configuration file and the host configuration and domain name service configuration file are stated,
By the design of first load-on module, the focus function of the default port can be opened and generate the network equipment section
Point, by the design of second load-on module, the main frame configuration service can be opened and the network equipment node is set
For the bridge coil equipment, by the design of the 3rd load-on module, IP address can be carried out to the bridge coil equipment
Configuration, so that the bridge coil equipment is connected with the equipment to be connected, has reached bridging functionality between two Wi-Fi hotspots,
The above method realizes single terminal end equipment under WiFi module on the basis of existing hardware by the expansion to software function
With Wi-Fi hotspot bridging functionality between another terminal, and flow simply without adding other equipment and then having saved cost in addition.
Further, the focus sharing means also include:
First execution module, for inquiring about and performing the support being locally stored instruction, forwarded work(is supported so as to open
Energy;
Second execution module, for inquiring about and performing the forwarding being locally stored instruction, to open the bridge coil equipment
Route forwarding function;
3rd execution module, for inquiring about and performing the rule addition instruction being locally stored, to open the bridge coil
The rule addition function of equipment.
Further, first load-on module includes:
First extraction module, for extracting the network configuration item in the hotspot service configuration file, and obtain described pre-
If the port address of port, the network configuration item is wds_sta=1, and the default port is device node wlan0;
Starting module, for the extraction result according to first extraction module, start focus clothes to the port address
Business.
Further, second load-on module includes:
Second extraction module, for extracting the pre-set commands being locally stored;
First sending module, for the extraction result according to second extraction module, by the pre-set commands send to
The network equipment node, and the pre-set commands are performed on the network equipment node, so that by the network equipment section
Point is arranged to the bridge coil equipment.
Brief description of the drawings
Fig. 1 is the flow chart for the focus sharing method that first embodiment of the invention provides;
Fig. 2 is the flow chart for the focus sharing method that second embodiment of the invention provides;
Fig. 3 is the structural representation for the focus sharing means that third embodiment of the invention provides;
Fig. 4 is the structural representation for the focus sharing means that fourth embodiment of the invention provides;
Essential element symbol description
Embodiment
For the ease of more fully understanding the present invention, the present invention is carried out further below in conjunction with related embodiment accompanying drawing
Explain.Embodiments of the invention are given in accompanying drawing, but the present invention is not limited in above-mentioned preferred embodiment.Conversely, there is provided
The purpose of these embodiments be in order that disclosure of the invention face more fully.
Referring to Fig. 1, the flow chart of the focus sharing method provided for first embodiment of the invention, including step S10 is extremely
S40。
Step S10, the AP information of equipment to be connected is obtained, and focus connection configuration text is generated according to the AP information respectively
Part, hotspot service configuration file and host configuration and domain name service configuration file;
Wherein, AP packets information containing hotspot name, focus connection safety information connect password with focus, described
Focus connection profile include the hotspot name information, security configuration corresponding to the focus connection safety information,
The focus connection password and connection priority configuration, the hotspot service configuration file include the hotspot name information, institute
State security configuration, network equipment node configuration, working channel configuration, enabled wireless distribution system, driving type configuration, maximum
Focus connection number configuration and wireless protocol type configuration item, the hotspot service configuration file, host configuration and domain name clothes
Business configuration file includes the network equipment Node deployment, the network address segment limit of distribution and the domain host address that uses and matched somebody with somebody
Put;
Step S20, the hotspot service configuration file is loaded, and match somebody with somebody confidence in the hotspot service configuration file
Breath configures to default port, so as to the default port open Wi-Fi hotspot function and generate network equipment node;
Wherein, the default port is WiFi equipment node wlan0, and described in when opening the WiFi linkage functions
WiFi equipment node wlan0 automatically generates Wi-Fi hotspot connection signal, and generates network equipment node wds0, loads the focus
The order that service profiles use is hostapd hostapd.conf;
Step S30, the host configuration and domain name service configuration file are loaded, to start main frame configuration service, and
The network equipment node is arranged to bridge coil equipment;
Wherein, the bridge coil equipment is used to Wi-Fi hotspot and another Wi-Fi hotspot carrying out interconnectivity and sharing, loading
The order that the host configuration and domain name service configuration file use is iw phy phy0interface add wds0
type wds;
Step 40, the focus connection profile is loaded, and matches somebody with somebody confidence in the focus connection profile
Breath configures to the bridge coil equipment, so that the bridge coil equipment is connected with the equipment to be connected;
The address of the equipment to be connected is obtained after the focus connection profile, so as to connect with the equipment to be connected
Connect and realize that WiFi network is shared, load order that the focus connection profile uses as wpa_supplicant-
iwds0-Dnl80211-cwpa_supplicant.conf-Iwpa_supplicant_overlay.conf-
eentropy.bin-g@android:wpa_wds0。
The present embodiment is by obtaining the AP information of the equipment to be connected, so as to generate the focus connection respectively
Configuration file, the hotspot service configuration file and the host configuration and domain name service configuration file, the focus clothes
Business configuration file is used to configure the default port, so as to the default port open WiFi linkage functions and generate the network
Device node, the host configuration and domain name service configuration file are used to start the main frame configuration service, so as to start
The information configuration of network ip address is carried out, and the network equipment node is arranged to the bridge coil equipment, the focus
Connection profile is used for the address information that the equipment to be connected is provided for the bridge coil equipment, so that the bridged network
Network equipment is connected with the equipment to be connected, has reached bridging functionality between two Wi-Fi hotspots, the above method is in existing hardware
On the basis of by the expansion to software function realize single terminal end equipment under WiFi module with WiFi between another terminal
Focus bridging functionality, and flow simply without adding other equipment and then having saved cost in addition.
Referring to Fig. 2, the flow chart of the focus sharing method provided for second embodiment of the invention, methods described includes step
Rapid S11 to S71.
Step S11, the AP information of equipment to be connected is obtained, and focus connection configuration text is generated according to the AP information respectively
Part, hotspot service configuration file and host configuration and domain name service configuration file;
Wherein, AP packets information containing hotspot name, focus connection safety information connect password with focus, described
Focus connection profile include the hotspot name information, security configuration corresponding to the focus connection safety information,
The focus connection password and connection priority configuration, the hotspot service configuration file include the hotspot name information, institute
State security configuration, network equipment node configuration, working channel configuration, enabled wireless distribution system, driving type configuration, maximum
Focus connection number configuration and wireless protocol type configuration item, the hotspot service configuration file, host configuration and domain name clothes
Business configuration file includes the network equipment Node deployment, the network address segment limit of distribution and the domain host address that uses and matched somebody with somebody
Put;
It is literary to generate the hotspot service configuration file by obtaining the AP information of the equipment to be connected in the present embodiment
The program that part uses for:
Interface=wlan0
Driver=nl80211
Ctrl_interface=/data/misc/WiFi/hostapd
Ssid=WiFi focus SSID names
Hw_mode=a
Wds_sta=1
Wme_enabled=1
Max_num_sta=8
Channel=36
Ieee80211n=1
Ieee80211ac=1
Wpa_group_rekey=86400
Wpa=2
Wpa_pairwise=CCMP
Wpa_passphrase=12345678
Adopted in the present embodiment by obtaining the AP information of the equipment to be connected with generating the focus connection profile
Program is:
In the present embodiment the host configuration and domain name are generated by obtaining the AP information of the equipment to be connected
The program that service profiles use for:
Interface=wlan0
keep-in-foreground
dhcp-authoritative
localise-queries
no-resolv
no-poll
no-hosts
Except-interface=lo
Cache-size=500
Dhcp-range=192.168.43.100,192.168.43.200,255.255.255.0,1 2h
Dhcp-option=6,114.114.114.114,119.29.29.29,180.76.76.76,223.5.5.5,
223.6.6.6,8.8.8.8,8.8.4.4,192.168.43.1
Dhcp-option-force=43, ANDROID_METERED
Dhcp-leasefile=/data/misc/WiFi/dnsmasq.leases
Pid-file=/data/misc/WiFi/dnsmasq.pid
Step S21, the network configuration item in the hotspot service configuration file is extracted, and obtain the end of the default port
Port address, hotspot service is started to the port address according to the network configuration item information;
Wherein, the network configuration item is wds_sta=1, and the default port is WiFi equipment node wlan0, so that
The default port open WiFi linkage functions simultaneously generate the network equipment node, now the WiFi equipment node wlan0
The automatic outside WiFi network of connection;
Start order that the hotspot service uses in the present embodiment as hostapd hostapd.conf;
Step S31, the host configuration and domain name service configuration file are loaded, to start main frame configuration service, is carried
Take the pre-set commands being locally stored;
Wherein, the pre-set commands are iw phy phy0 interface add wds0 type wds;
Step S41, the pre-set commands are sent to the network equipment node, and held on the network equipment node
The row pre-set commands, so as to which the network equipment node is arranged into the bridge coil equipment;
Step S51, extract the SSID configuration informations and password configuration information to be connected in the focus configuration file;
Step S61, the SSID configuration informations to be connected and the password configuration information are sent to the bridged network
Network equipment;
Step S71, the support instruction being locally stored, forwarding instruction and rule addition instruction are inquired about and performed respectively, so that
The shared rule of opening network;
Wherein, it is described to support that instruction is echo " 1 ">/ proc/sys/net/ipv4/ip_forward, which is used to open, to be supported
Forwarded function, the forwarding instruction are used to open the bridge coil equipment for iptables-P FORWARD ACCEPT
Route forwarding function, it is described rule addition instruction be iptables-t nat-A POSTROUTING-o wds0-i wlan0-
J MASQUERADE are used for the regular addition function of opening the bridge coil equipment.
The present embodiment is by obtaining the AP information of the equipment to be connected, so as to generate the focus connection respectively
Configuration file, the hotspot service configuration file and the host configuration and domain name service configuration file, the focus clothes
Business configuration file is used to configure the default port, so as to the default port open WiFi linkage functions and generate the network
Device node, the host configuration and domain name service configuration file are used to start the main frame configuration service, so as to start
The information configuration of network ip address is carried out, and the network equipment node is arranged to the bridge coil equipment, the focus
Connection profile is used for the address information that the equipment to be connected is provided for the bridge coil equipment, so that the bridged network
Network equipment is connected with the equipment to be connected, has reached bridging functionality between two Wi-Fi hotspots, the above method is in existing hardware
On the basis of by the expansion to software function realize single terminal end equipment under WiFi module with WiFi between another terminal
Focus bridging functionality, and flow simply without adding other equipment and then having saved cost in addition.
Can be with one of ordinary skill in the art will appreciate that realizing that all or part of step in above-described embodiment method is
The hardware of correlation is instructed to complete by program, described program can be stored in a computer read/write memory medium,
The program upon execution, comprises the following steps:
The AP information of equipment to be connected is obtained, and focus connection profile, focus are generated according to the AP information respectively
Service profiles and host configuration and domain name service configuration file;
The hotspot service configuration file is loaded, and the configuration information in the hotspot service configuration file is to default
Port is configured, so as to the default port open Wi-Fi hotspot function and generate network equipment node;
The host configuration and domain name service configuration file are loaded, to start main frame configuration service, and by the net
Network device node is arranged to bridge coil equipment;
The focus connection profile is loaded, and the configuration information in the focus connection profile is to described
Bridge coil equipment is configured, so that the bridge coil equipment is connected with the equipment to be connected.Described can be read is deposited
Storage media is such as:ROM/RAM, magnetic disc, CD etc..
Referring to Fig. 3, the structural representation of the focus sharing means 100 provided for third embodiment of the invention, the heat
Point sharing means 100 include:
Acquisition module 10, for obtaining the AP information of equipment to be connected, and focus is generated according to the AP information respectively and connected
Configuration file, hotspot service configuration file and host configuration and domain name service configuration file are connect, the equipment to be connected is
User selects to need the equipment connected, and the equipment to be connected can be the equipment such as mobile phone, computer, flat board and set top box;
First load-on module 20, text is configured for loading the hotspot service configuration file, and according to the hotspot service
Configuration information in part configures to default port, so as to the default port open Wi-Fi hotspot function and generate network and set
Slave node, wherein the default port is WiFi equipment node wlan0, and the WiFi when opening the WiFi linkage functions
Device nodes wlan0 automatically generates Wi-Fi hotspot connection signal, and generates network equipment node wds0, loads the hotspot service
The order that configuration file uses is hostapdhostapd.conf;
Second load-on module 30, for loading the host configuration and domain name service configuration file, to start main frame
Configuration service, and the network equipment node is arranged to bridge coil equipment, wherein the bridge coil equipment is used to incite somebody to action
Wi-Fi hotspot carries out interconnectivity and sharing with another Wi-Fi hotspot, loads the host configuration and domain name service configuration file is adopted
Order is iw phy phy0 interface add wds0 typewds;
3rd load-on module 40, configuration text is connected for loading the focus connection profile, and according to the focus
Configuration information in part configures to the bridge coil equipment, so that the bridge coil equipment and the equipment to be connected
Connection;
The address of the equipment to be connected is obtained after wherein described focus connection profile, so as to be connected be set with described
Standby connect simultaneously realizes that WiFi network is shared, and loads order that the focus connection profile uses as wpa_supplicant-
iwds0-Dnl80211-cwpa_supplicant.conf-Iwpa_supplicant_overlay.conf-
eentropy.bin-g@android:wpa_wds0。
First load-on module 20 includes:
First extraction module 21, for extracting the network configuration item in the hotspot service configuration file, and described in acquisition
The port address of default port, the network configuration item is wds_sta=1, and the default port is device node wlan0;
Starting module 22, for the extraction result according to first extraction module 21, heat is started to the port address
Point service, the order that the hotspot service uses is hostapd hostapd.conf.
Second load-on module 30 includes:
Second extraction module 31, for extracting the pre-set commands being locally stored, the pre-set commands are iwphy
phy0 interface add wds0 type wds;
First sending module 32, for the extraction result according to second extraction module 31, the pre-set commands are sent out
The network equipment node is delivered to, and the pre-set commands are performed on the network equipment node, so as to which the network is set
Slave node is arranged to the bridge coil equipment.
3rd load-on module 40 includes:
3rd extraction module 41, for extracting the SSID configuration informations and password to be connected in the focus configuration file
Configuration information;
Second sending module 42, will be described to be connected for the extraction result according to the 3rd extraction module 41
SSID configuration informations and the password configuration information are sent to the bridge coil equipment.
The present embodiment can be obtained the focus by obtaining the AP information and be connected by the design of the acquisition module 10
Configuration file, the hotspot service configuration file and the host configuration and domain name service configuration file are connect, by described
The design of first load-on module 20, the focus function of the default port can be opened and generate the network equipment node, passed through
The design of second load-on module 30, the main frame configuration service can be opened and the network equipment node is arranged to described
Bridge coil equipment, by the design of the 3rd load-on module 40, IP address configuration can be carried out to the bridge coil equipment,
So that the bridge coil equipment is connected with the equipment to be connected, reach bridging functionality between two Wi-Fi hotspots, it is above-mentioned
Method realizes single terminal end equipment under WiFi module with another on the basis of existing hardware by the expansion to software function
Wi-Fi hotspot bridging functionality between one terminal, and flow simply without adding other equipment and then having saved cost in addition.
Referring to Fig. 4, the focus sharing means 100a provided for fourth embodiment of the invention structural representation, the 4th
The structure of embodiment and 3rd embodiment is more or less the same, and its difference is that the 100a of focus sharing means described in the present embodiment is also
Including:
First execution module 11, for inquiring about and performing the support being locally stored instruction, the support instruction is:
echo"1">/ proc/sys/net/ipv4/ip_forward, it is described to support instruction is used to open to support network to turn
Send out function;
Second execution module 12, for inquiring about and performing the forwarding being locally stored instruction, the forwarding instruction is
Iptables-P FORWARD ACCEPT, the forwarding instruction are used for the route forwarding function for opening the bridge coil equipment;
3rd execution module 13, for inquiring about and performing the rule addition instruction being locally stored, the rule addition instruction
For iptables-t nat-A POSTROUTING-o wds0-i wlan0-j MASQUERADE, the rule addition instruction is used
In the rule addition function of opening the bridge coil equipment.
By the design of first execution module 11 in the present embodiment, so that system kernel supports forwarded function,
By the design of second execution module 12 and the 3rd execution module 13, so that user can voluntarily issue forwarding rule,
And then the demand for meeting the different forwarding rules of user improves the experience of user.
Above embodiment described the technical principle of the present invention, the description is merely to explain the principles of the invention, and
The limitation of the scope of the present invention can not be construed in any way.Based on explanation herein, those skilled in the art is not required to
Other embodiments of the present invention can be associated by paying performing creative labour, and these modes fall within the present invention's
In protection domain.
Claims (10)
1. a kind of focus sharing method, it is characterised in that methods described includes:
The AP information of equipment to be connected is obtained, and focus connection profile, hotspot service are generated according to the AP information respectively
Configuration file and host configuration and domain name service configuration file;
The hotspot service configuration file is loaded, and the configuration information in the hotspot service configuration file is to presetting port
Configured, so as to the default port open Wi-Fi hotspot function and generate network equipment node;
The host configuration and domain name service configuration file are loaded, to start main frame configuration service, and the network is set
Slave node is arranged to bridge coil equipment;
The focus connection profile is loaded, and the configuration information in the focus connection profile is to the bridge joint
The network equipment is configured, so that the bridge coil equipment is connected with the equipment to be connected.
2. focus sharing method according to claim 1, it is characterised in that methods described also includes:
The support instruction being locally stored is inquired about and performed, forwarded function is supported to open;
The forwarding instruction being locally stored is inquired about and performs, to open the route forwarding function of the bridge coil equipment;
The rule addition instruction being locally stored is inquired about and performs, to open the regular addition function of the bridge coil equipment.
3. focus sharing method according to claim 1, it is characterised in that the loading hotspot service configuration text
Part, and the configuration information in the hotspot service configuration file includes to presetting the step of port configures:
The network configuration item in the hotspot service configuration file is extracted, and obtains the port address of the default port, it is described
Network configuration item is wds_sta=1, and the default port is device node wlan0;
Hotspot service is started to the port address according to the network configuration item information.
4. focus sharing method according to claim 1, it is characterised in that described and the network equipment node is set
Include for the step of bridge coil equipment:
Extract the pre-set commands being locally stored;
The pre-set commands are sent to the network equipment node, and the default life is performed on the network equipment node
Order, so as to which the network equipment node is arranged into the bridge coil equipment.
5. focus sharing method according to claim 1, it is characterised in that the loading focus connection configuration text
Part, and wrap the step of the configuration information in the focus connection profile configures to the bridge coil equipment
Include:
Extract the SSID configuration informations and password configuration information to be connected in the focus configuration file;
The SSID configuration informations to be connected and the password configuration information are sent to the bridge coil equipment.
6. a kind of readable storage medium storing program for executing, is stored thereon with computer program, it is characterised in that real when the program is executed by processor
Now the step of method as described in any one in claim 1-5.
A kind of 7. focus sharing means, it is characterised in that including:
Acquisition module, focus connection configuration is generated respectively for obtaining the AP information of equipment to be connected, and according to the AP information
File, hotspot service configuration file and host configuration and domain name service configuration file;
First load-on module, for loading the hotspot service configuration file, and according in the hotspot service configuration file
Configuration information configures to default port, so as to the default port open Wi-Fi hotspot function and generate network equipment section
Point;
Second load-on module, for loading the host configuration and domain name service configuration file, to start main frame configuration clothes
Business, and the network equipment node is arranged to bridge coil equipment;
3rd load-on module, for loading the focus connection profile, and according in the focus connection profile
Configuration information configures to the bridge coil equipment, so that the bridge coil equipment is connected with the equipment to be connected.
8. focus sharing means according to claim 7, it is characterised in that the focus sharing means also include:
First execution module, for inquiring about and performing the support being locally stored instruction, forwarded function is supported so as to open;
Second execution module, for inquiring about and performing the forwarding being locally stored instruction, to open the road of the bridge coil equipment
By forwarding capability;
3rd execution module, for inquiring about and performing the rule addition instruction being locally stored, to open the bridge coil equipment
Rule addition function.
9. focus sharing means according to claim 7, it is characterised in that first load-on module includes:
First extraction module, for extracting the network configuration item in the hotspot service configuration file, and obtain the default end
The port address of mouth, the network configuration item is wds_sta=1, and the default port is device node wlan0;
Starting module, for the extraction result according to first extraction module, hotspot service is started to the port address.
10. focus sharing means according to claim 9, it is characterised in that second load-on module includes:
Second extraction module, for extracting the pre-set commands being locally stored;
First sending module, for the extraction result according to second extraction module, the pre-set commands are sent to described
Network equipment node, and the pre-set commands are performed on the network equipment node, so as to which the network equipment node is set
It is set to the bridge coil equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710549432.1A CN107370621B (en) | 2017-07-07 | 2017-07-07 | Hotspot sharing method, readable storage medium and hotspot sharing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710549432.1A CN107370621B (en) | 2017-07-07 | 2017-07-07 | Hotspot sharing method, readable storage medium and hotspot sharing device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107370621A true CN107370621A (en) | 2017-11-21 |
CN107370621B CN107370621B (en) | 2020-12-22 |
Family
ID=60306002
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710549432.1A Active CN107370621B (en) | 2017-07-07 | 2017-07-07 | Hotspot sharing method, readable storage medium and hotspot sharing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107370621B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113423116A (en) * | 2021-08-25 | 2021-09-21 | 广州朗国电子科技股份有限公司 | Configuration method of 5G hot spot default mode based on Android system |
CN113473493A (en) * | 2020-03-31 | 2021-10-01 | 华为技术有限公司 | Communication method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101286909A (en) * | 2008-06-10 | 2008-10-15 | 华中科技大学 | Method of automatically constructing wireless distributed system |
CN101605330A (en) * | 2009-07-03 | 2009-12-16 | 中兴通讯股份有限公司 | Wireless distribution system establishment of connection method and device |
US20140071870A1 (en) * | 2012-09-07 | 2014-03-13 | Qualcomm Incorporated | Apparatus and methods of power save for wireless access points and multi-hop relays |
CN105516528A (en) * | 2015-11-27 | 2016-04-20 | 深圳市朗科科技股份有限公司 | Wireless internet access method and wireless internet access device |
CN106658367A (en) * | 2016-11-30 | 2017-05-10 | 努比亚技术有限公司 | Network connection device and method |
-
2017
- 2017-07-07 CN CN201710549432.1A patent/CN107370621B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101286909A (en) * | 2008-06-10 | 2008-10-15 | 华中科技大学 | Method of automatically constructing wireless distributed system |
CN101605330A (en) * | 2009-07-03 | 2009-12-16 | 中兴通讯股份有限公司 | Wireless distribution system establishment of connection method and device |
US20140071870A1 (en) * | 2012-09-07 | 2014-03-13 | Qualcomm Incorporated | Apparatus and methods of power save for wireless access points and multi-hop relays |
CN105516528A (en) * | 2015-11-27 | 2016-04-20 | 深圳市朗科科技股份有限公司 | Wireless internet access method and wireless internet access device |
CN106658367A (en) * | 2016-11-30 | 2017-05-10 | 努比亚技术有限公司 | Network connection device and method |
Non-Patent Citations (1)
Title |
---|
HANTIANLILIANG: "实际动手操作,用hostapd架设桥接模式的无线AP", 《HANTIANLILIANG.BLOG.SOHU.COM/304879882.HTML》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113473493A (en) * | 2020-03-31 | 2021-10-01 | 华为技术有限公司 | Communication method and device |
CN113473493B (en) * | 2020-03-31 | 2023-06-30 | 华为技术有限公司 | Communication method and device |
CN113423116A (en) * | 2021-08-25 | 2021-09-21 | 广州朗国电子科技股份有限公司 | Configuration method of 5G hot spot default mode based on Android system |
CN113423116B (en) * | 2021-08-25 | 2021-12-24 | 广州朗国电子科技股份有限公司 | Configuration method of 5G hot spot default mode based on Android system |
Also Published As
Publication number | Publication date |
---|---|
CN107370621B (en) | 2020-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103813473B (en) | A kind of communication means, terminal and system | |
US9420461B2 (en) | Access authentication method and device for wireless local area network hotspot | |
CN101998695B (en) | Method, device and system for configuring WiFi setting parameters of terminal equipment | |
CN102640471B (en) | Method and apparatus for multipath communication | |
CN101483906B (en) | Method, system and apparatus for access network | |
CN105307235B (en) | A kind of hot spot sharing method, device and system | |
WO2013127124A1 (en) | Method, system and terminal for implementing wi-fi connection through nfc | |
CN102572891A (en) | System and method for configuring network parameters fast | |
CN103765981A (en) | Secure peer-to-peer network setup | |
CN107704785A (en) | Simplify method, storage medium and the mobile terminal of wireless connection using NFC | |
EP3076718B1 (en) | Wireless access method and relevant device and system | |
CN101807945A (en) | Wireless data transmission system and data transmission method utilizing same | |
WO2016000398A1 (en) | Communication method and device, mobile terminal and cloud server | |
CN108811035A (en) | User equipment accesses the method and Wi-Fi access nodes of Wireless Fidelity Wi-Fi | |
CN102413200A (en) | Method for customizing wireless hot spot service set identifier (SSID) and apparatus thereof | |
CN105915383A (en) | Remote router configuration method | |
CN102612033B (en) | Mobile phone with thin wireless access point and communication method for mobile phone | |
TW201306545A (en) | User system of wireless communication | |
CN102984691B (en) | Method and terminal and server and system and device of synchronous wireless network parameters | |
CN110312286A (en) | Method for switching network, communication device and communication equipment | |
CN106535357A (en) | Method and system for configuring wifi parameters | |
CN104539454A (en) | Equipment management method, device and system | |
CN106170000A (en) | A kind of remote authentication application system and its implementation | |
CN107370621A (en) | Focus sharing method, readable storage medium storing program for executing and focus sharing means | |
CN102438288A (en) | APN (Access Point Name) switch method and system as well as mobile terminal |
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 |