A kind ofly realize method and the Set Top Box that Set Top Box wireless aps is shared
Technical field
The invention belongs to set-top box technique field, relate in particular to a kind of method and Set Top Box that Set Top Box wireless aps is shared that realize.
Background technology
WLAN, is the product that computer network combines with wireless communication technology, and WLAN has utilized a kind of effective method of wireless multiple access channel to support the communication between computer, for mobile, personalization and the multimedia application of communication provide possibility.
Along with the appearance of intelligent mobile terminal product (as smart mobile phone, panel computer), make WLAN gradually drop into the use of every household, but with time all must home wireless router be installed and realize the AP access point of WLAN, both increased expense, wiring, wiring again, install and use trouble, inconvenience.And, Set Top Box (Set Top Box the is called for short STB) major part that every household uses now has band network function, and be all the intelligent operating system adopting based on android OS, this intelligent operating system is compatible mutually with the operating system such as android OS and iOS that aforementioned intelligent mobile terminal carries; But the network function resource of these Set Top Box is never fully utilized, and has caused the waste of resource.
Summary of the invention
For solving the above-mentioned problems in the prior art, the invention provides and a kind of in band network function Set Top Box, realize wireless aps and share, make user can directly pass through Set Top Box connecting wireless network, allow the resource of Set Top Box obtain sufficient maximized utilization, and simplify the structure of wireless network, installed and used and realize simply and easily method and the Set Top Box that Set Top Box wireless aps is shared.
For solving the problems of the technologies described above, the present invention adopts following technical scheme:
A kind ofly realize the method that Set Top Box wireless aps is shared, first increase WAP (wireless access point) program module and wireless network card in the intermediate layer of Set Top Box, then the certificate server using WAP (wireless access point) program module as AP, the access of control and management wireless terminal and certification, finally by WAP (wireless access point) program module, wireless network card is switched to master pattern and carries out parameter configuration, and drive network hardware equipment that network is connected, wireless aps signal is provided, can set up an open wireless network, realize wireless aps and share.
Further, described " by WAP (wireless access point) program module, wireless network card switched to ap mode and carries out parameter configuration, and driving network hardware equipment that network is connected, wireless aps signal is provided ", specifically comprises the following steps:
A1. utilize the Wifi detection function in WAP (wireless access point) program module to carry out initialization detection to wireless network card in Set Top Box;
A2. when testing result is carried out the parameter setting of AP to wireless network card while being correct, otherwise restart wireless network card, and the initialization that re-starts wireless network card detects;
A3. detect and judge parameter configuration legitimacy, and legal parameters is saved as to configuration file and store in flash;
A4. the legal parameters of wireless network card is loaded and is configured in the interface initialization of hostapd principal function of WAP (wireless access point) program module;
A5. start WAP (wireless access point) program module, open wireless is encrypted, and wireless aps signal is provided.
There is the Set Top Box that wireless aps is shared, include:
Application layer, main coordinates user interactive portion,, is controlled the startup of this function/close, and data is imported into intermediate layer and preserved application layer software operation by user;
Intermediate layer, comprise WAP (wireless access point) program module, mainly use the mid portion structure that WAP (wireless access point) program module provides, the data of application layer being imported into by the procotol of enrolling are processed, wireless aps is encrypted, call the content that drives layer, and process lower one deck return data, realize two-way control;
Drive layer, the driver of required network device hardware is provided;
And network hardware equipment layer, described network hardware equipment layer includes Ethernet interface for being connected with external the Internet and for sending the wireless network card of wireless aps signal;
And application layer, intermediate layer, driving layer successively mutually communication connect.
The invention has the beneficial effects as follows:
The present invention passes through technique scheme, can realize the soft AP sharing function of WLAN on network function Set Top Box, substitute home router completely, make user can directly pass through Set Top Box connecting wireless network, allow the existing resource with network function Set Top Box obtain sufficient maximized utilization, can not cause the waste of resource, and without installing any equipment additional and carrying out any wiring, greatly simplify the structure of wireless network, installed and used simpler, more convenient.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of realizing the method that Set Top Box wireless aps shares of the present invention;
Fig. 2 is the schematic flow sheet that a kind of realize in the method that Set Top Box wireless aps shares of the present invention " switched to wireless network card ap mode and carry out parameter configuration by WAP (wireless access point) program module; and drive network hardware equipment that network is connected, wireless aps signal is provided ";
Fig. 3 is a kind of structural principle schematic block diagram of realizing the Set Top Box embodiment that wireless aps shares of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As shown in Figures 1 and 2,
Described in the embodiment of the present invention, realize the method that Set Top Box wireless aps is shared, comprise the following steps:
Steps A. the intermediate layer in Set Top Box increases WAP (wireless access point) program module and wireless network card.
The certificate server of step B. using WAP (wireless access point) program module as AP, access and the certification of control and management wireless terminal mobile phone or the panel computer of wireless Wifi function (as have) (comprise authentication, encryption function, processing variety of event etc.)。
Step C. switches to master pattern (the soft AP conventionally saying, simulation AP function by WAP (wireless access point) program module by wireless network card.) and carry out parameter configuration and (if comprise frequency, signal, the beacon bag time interval, whether send beacon bag response probe request, and mac address filtering condition etc. is set.), and drive network hardware equipment that network is connected, and wireless aps signal is provided, can set up an open wireless network, realize wireless aps and share.
Wherein, described " by WAP (wireless access point) program module, wireless network card switched to ap mode and carries out parameter configuration, and driving network hardware equipment that network is connected, wireless aps signal is provided ", specifically comprises the following steps:
Step C1. utilizes the Wifi detection function in WAP (wireless access point) program module to carry out initialization detection to wireless network card in Set Top Box.
Step C2. carries out AP(focus to wireless network card while being correct when testing result) parameter setting, otherwise restart wireless network card, and the initialization that re-starts wireless network card detects.
Step C3. detects and judges parameter configuration legitimacy, and legal parameters is saved as to configuration file and stores in flash.
Step C4. loads the legal parameters of wireless network card to be configured in the interface initialization of hostapd principal function of WAP (wireless access point) program module.
Step C5. starts WAP (wireless access point) program module, and open wireless is encrypted, and wireless aps signal is provided.
As shown in Figure 3, a kind of Set Top Box that realizes above-mentioned wireless aps sharing method, includes application layer 1, intermediate layer 2, drives layer 3 and network hardware equipment layer 4, and application layer 1, intermediate layer 2, drive layer 3 successively mutually communication connect.
Wherein, the main coordinates user interactive portion of described application layer 1,, is controlled the startup of this function/close, and data is imported into intermediate layer 2 and preserved application layer software operation by user.Described intermediate layer 2 comprises WAP (wireless access point) program module 21, the hostapd that described WAP (wireless access point) program module 21 is provided by open source linux Wireless builds, mainly use the mid portion structure that WAP (wireless access point) program module 21 provides, the data of application layer 1 being imported into by the procotol of enrolling are processed, wireless aps is encrypted, call the content that drives layer 3, and process lower one deck return data, realize two-way control.The described driver that drives layer 3 to be mainly to provide required network device hardware., described network hardware equipment layer 4 includes Ethernet interface 5 for being connected with external the Internet and for sending the wireless network card 6 of wireless aps signal.
Like this, can realize the soft AP sharing function of WLAN on network function Set Top Box by the present invention, substitute home router completely, make user can directly pass through Set Top Box connecting wireless network, allow the existing resource with network function Set Top Box obtain sufficient maximized utilization, can not cause the waste of resource, and without installing any equipment additional and carrying out any wiring, greatly simplify the structure of wireless network, installed and used simpler, more convenient.
In addition, for the user who is freely connected on Set Top Box AP by other deciphering approach after wireless aps is opened processes, in described WAP (wireless access point) program module 21, being also provided with user profile extraction module (does not show in figure, this user profile extraction module is identical with existing common user profile extraction module, no longer describes in detail at this.), to facilitate the user who checks that certification is accessed, realize and judge whether safety encipher of wireless network, if the access of discovery unknown device, can control access device be manually set by Set Top Box AP opening square and whether can use wireless network, effectively solve wireless network by the problem of rubbing.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications are also considered as protection scope of the present invention.