CN105827440B - Intelligent terminal and routing configuration method thereof - Google Patents
Intelligent terminal and routing configuration method thereof Download PDFInfo
- Publication number
- CN105827440B CN105827440B CN201610141866.3A CN201610141866A CN105827440B CN 105827440 B CN105827440 B CN 105827440B CN 201610141866 A CN201610141866 A CN 201610141866A CN 105827440 B CN105827440 B CN 105827440B
- Authority
- CN
- China
- Prior art keywords
- client
- configuration
- routing
- server
- configuration information
- 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.)
- Expired - Fee Related
Links
Classifications
-
- 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/084—Configuration by using pre-existing information, e.g. using templates or copying from other elements
- H04L41/0846—Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及智能终端的组网技术,具体而言,本发明涉及一种智能终端及其路由配置方法。The present invention relates to a networking technology of an intelligent terminal, in particular, the present invention relates to an intelligent terminal and a routing configuration method thereof.
背景技术Background technique
Android系统的智能终端,包括手机、平板电脑、行车记录仪、可佩戴的手表、眼镜等等,通常此类智能终端均配备有相应的遵守IEEE802.11协议规范的WiFi模组,装载相应的驱动,提供相应的接口供框架层以上的进程调用。Smart terminals of the Android system, including mobile phones, tablet computers, driving recorders, wearable watches, glasses, etc., are usually equipped with corresponding WiFi modules that comply with the IEEE802.11 protocol specification, and are loaded with corresponding drivers. , providing the corresponding interface for the processes above the framework layer to call.
通常遵守802.11协议的WiFi模组均支持多种工作模式,例如IBSS,Managed,AP,AP/VLAN,Monitor,mesh point,P2P-Client,P2P-GO等模式,这些模式可实现不同的组网功能。其中,Managed也即俗称的Station(STA)即工作站模式,AP即俗称的访问接入点模式(Access Point);IBSS则是adhoc即直连模式,P2P即俗称的WiFi Direct技术,属于Wi-FiAlliance(Wi-Fi联盟)推出的一项重要技术规范。STA模式下,智能终端便成为一个工作站,可以接入一个处于AP模式下的终端。同理,P2P-Client相当于STA,可以接入一个相当于AP的P2P-GO(P2P Group Owner)模式下的智能终端。可见,至少有IBSS和WiFi Direct两种体系可以实现将多台智能终端进行组网,同一部智能终端,基于同一WiFi模组,既可充当热点,还可充当站点。Generally, WiFi modules that comply with the 802.11 protocol support multiple working modes, such as IBSS, Managed, AP, AP/VLAN, Monitor, mesh point, P2P-Client, P2P-GO and other modes. These modes can realize different networking functions . Among them, Managed is commonly known as Station (STA) or workstation mode, AP is commonly known as Access Point mode (Access Point); IBSS is adhoc or direct connection mode, P2P is commonly known as WiFi Direct technology, which belongs to Wi-FiAlliance (Wi-Fi Alliance) launched an important technical specification. In STA mode, the smart terminal becomes a workstation, which can access a terminal in AP mode. Similarly, P2P-Client is equivalent to STA, and can access an intelligent terminal in P2P-GO (P2P Group Owner) mode equivalent to AP. It can be seen that there are at least two systems, IBSS and WiFi Direct, that can realize the networking of multiple smart terminals. The same smart terminal, based on the same WiFi module, can act as a hotspot or a station.
一种应用需求中,希望使同一智能终端的WiFi模组同时工作于站点和热点两种模式,这样便于在该智能终端利用其站点模式接入外网后,通过其热点模式向其他WiFi设备提供接入和网络共享服务。现实中,基于Windows或IOS的智能终端,能够使用WiFi模组提供的功能,使这种智能终端能够虚拟出两台设备,即站点设备和热点设备,在这个基础上,允许该智能终端一方面可以接入无线AP,另一方面可以充当AP供其他WiFi设备接入。In one application requirement, it is hoped that the WiFi module of the same smart terminal can work in two modes of site and hotspot at the same time, so that after the smart terminal uses its site mode to access the external network, it can provide services to other WiFi devices through its hotspot mode. Access and tethering services. In reality, the smart terminal based on Windows or IOS can use the functions provided by the WiFi module, so that this kind of smart terminal can virtualize two devices, that is, the station device and the hotspot device. On this basis, the smart terminal allows on the one hand It can access wireless AP, and on the other hand, it can act as AP for other WiFi devices to access.
然而Android智能终端却不具备这种功能。Andoid系统的功能实现中,并不具备向用户同时开放WiFi模组的热点和站点两种模式的能力。因而,实践应用中,当智能终端以站点模式利用WiFi接入公司局域网AP之后,希望将另一无显示界面的WiFi设备的数据读取并上传到云端,这样一种需求便会因为该智能终端不能同时开启其自身的热点模式(因其开启必然导致断网)和站点模式而不能被满足。同理,如用户利用智能终端以热点模式与第三方通信的过程中,需以站点模式接入某个局域网获取数据,显然也是做不到的。However, the Android smart terminal does not have this function. In the function realization of the Android system, it does not have the ability to open the hotspot mode and the station mode of the WiFi module to the user at the same time. Therefore, in practical applications, when a smart terminal accesses the AP of the company's LAN through WiFi in station mode, it is desired to read and upload the data of another WiFi device without a display interface to the cloud. Can not open its own hotspot mode at the same time (because its opening will inevitably lead to disconnection) and station mode and cannot be satisfied. Similarly, if a user uses a smart terminal to communicate with a third party in hotspot mode, it is obviously impossible to access a local area network in station mode to obtain data.
可见,基于Android的智能终端在实现热点与站点两种WiFi组网模式这一功能上是先天不足的,因此,可以看出,解决这一问题是对Android智能终端的组网条件进行高效利用的重要前提。It can be seen that Android-based smart terminals are inherently deficient in the function of realizing two WiFi networking modes of hotspot and site. Therefore, it can be seen that solving this problem is an important factor for efficient use of the networking conditions of Android smart terminals. premise.
上述问题适宜在WiFi P2P技术规范之下解决,由此带来的问题是以P2P方式连接的客户端与服务端,因原本只考虑点对点连接的问题,故其彼此的路由均不会改变,而要实现客户端可以通过服务端连接外部网络,则需要使客户端能够合理地配置自身的路由设置,使得其可以服务端为网关去访问外网。The above problems are suitable to be solved under the WiFi P2P technical specification. The problem brought about by this is that the client and the server are connected in the P2P mode. Since only the point-to-point connection is originally considered, the routes between them will not change. To realize that the client can connect to the external network through the server, it is necessary to enable the client to reasonably configure its own routing settings so that it can use the server as a gateway to access the external network.
发明内容Contents of the invention
本发明的目的在于针对以上存在的至少一方面不足,提供一种智能终端及其路由配置方法。The object of the present invention is to provide an intelligent terminal and a routing configuration method thereof for at least one of the above shortcomings.
为了实现该目的,本发明采取如下技术方案:In order to achieve this goal, the present invention takes the following technical solutions:
本发明提供的一种智能终端路由配置方法,包括如下步骤:A routing configuration method for an intelligent terminal provided by the present invention includes the following steps:
使本智能终端以服务端身份接收客户端的接入;Make the smart terminal receive the client's access as a server;
响应于客户端索取路由配置信息的配置请求而调用相应的配置进程;Invoking the corresponding configuration process in response to the client's configuration request for routing configuration information;
由所述配置进程构造所述的路由配置信息并向客户端反馈,在该路由配置信息中包含强制客户端执行静态路由配置的控制选项。The configuration process constructs the routing configuration information and feeds it back to the client. The routing configuration information includes control options that force the client to perform static routing configuration.
具体的,所述客户端工作于WiFi P2P-Client模式下,相应的,所述的服务端工作于WiFi P2P Group Owner模式。Specifically, the client works in the WiFi P2P-Client mode, and correspondingly, the server works in the WiFi P2P Group Owner mode.
进一步,所述路由配置信息包括用于完成客户端的路由配置的数据:子网掩码、静态路由、网关、DNS地址。Further, the routing configuration information includes data for completing the routing configuration of the client: subnet mask, static route, gateway, and DNS address.
较佳的,所述网关指向服务端自身。Preferably, the gateway points to the server itself.
具体的,客户端发起的所述配置请求,为受DHCP协议所规范的客户端请求,由服务端提供的DHCP服务响应该请求并通过其配置进程反馈所述的路由配置信息。Specifically, the configuration request initiated by the client is a client request regulated by the DHCP protocol, and the DHCP service provided by the server responds to the request and feeds back the routing configuration information through its configuration process.
进一步,所述路由配置信息中包含两种对应于不同设置方式的静态路由数据。Further, the routing configuration information includes two kinds of static routing data corresponding to different setting modes.
具体的,所述配置进程的配置文件内容被修改为不同于Android系统默认提供的内容,从而该配置进程得以向所述路由配置信息中添加所述的控制选项。Specifically, the configuration file content of the configuration process is modified to be different from the default content provided by the Android system, so that the configuration process can add the control option to the routing configuration information.
较佳的,所述配置进程为Android系统提供的DNSmasq进程,所述控制选项为:dhcp-option-force。Preferably, the configuration process is a DNSmasq process provided by the Android system, and the control option is: dhcp-option-force.
本发明提供的一种智能终端,包括:An intelligent terminal provided by the present invention includes:
接入单元,用于使本智能终端以服务端身份接收客户端的接入;An access unit, configured to enable the smart terminal to receive client access as a server;
响应单元,被配置为响应于客户端索取路由配置信息的配置请求而调用相应的配置进程;A response unit configured to invoke a corresponding configuration process in response to a configuration request from a client for routing configuration information;
反馈单元,被配置为由所述配置进程构造所述的路由配置信息并向客户端反馈,在该路由配置信息中包含强制客户端执行静态路由配置的控制选项。The feedback unit is configured to construct the routing configuration information by the configuration process and feed it back to the client, where the routing configuration information includes a control option to force the client to perform static routing configuration.
具体的,所述客户端工作于WiFi P2P-Client模式下,相应的,所述的服务端工作于WiFi P2P Group Owner模式。Specifically, the client works in the WiFi P2P-Client mode, and correspondingly, the server works in the WiFi P2P Group Owner mode.
较佳的,所述路由配置信息包括用于完成客户端的路由配置的数据:子网掩码、静态路由、网关、DNS地址。Preferably, the routing configuration information includes data for completing the routing configuration of the client: subnet mask, static route, gateway, and DNS address.
具体的,所述网关指向服务端自身。Specifically, the gateway points to the server itself.
进一步,客户端发起的所述配置请求,为受DHCP协议所规范的客户端请求,由服务端提供的DHCP服务响应该请求并通过其配置进程反馈所述的路由配置信息。Further, the configuration request initiated by the client is a client request regulated by the DHCP protocol, and the DHCP service provided by the server responds to the request and feeds back the routing configuration information through its configuration process.
具体的,所述路由配置信息中包含两种对应于不同设置方式的静态路由数据。Specifically, the routing configuration information includes two types of static routing data corresponding to different setting modes.
较佳的,所述配置进程的配置文件内容被修改为不同于Android系统默认提供的内容,从而该配置进程得以向所述路由配置信息中添加所述的控制选项。Preferably, the configuration file content of the configuration process is modified to be different from the default content provided by the Android system, so that the configuration process can add the control options to the routing configuration information.
具体的,所述配置进程为Android系统提供的DNSmasq进程,所述控制选项为:dhcp-option-force。Specifically, the configuration process is a DNSmasq process provided by the Android system, and the control option is: dhcp-option-force.
与现有技术相比较,本发明至少具有如下优点:Compared with the prior art, the present invention has at least the following advantages:
本发明对WiFi Direct技术所规范的P2P模式进行充分利用,在P2P客户端与P2P服务端连接的前提下,通过服务端为其向客户端的路由配置信息添加使客户端强制自身实现静态路由配置的控制选项,从而使得客户端依其默认配置逻辑,利用从服务端获取的DHCP路由配置信息,强制自身完成静态路由配置,使得客户端具备通过服务端与外网进行数据交互的能力。The present invention makes full use of the P2P mode regulated by the WiFi Direct technology. On the premise that the P2P client is connected to the P2P server, the server adds the routing configuration information to the client for the client to force itself to implement static routing configuration. Control options, so that the client can use the DHCP routing configuration information obtained from the server to force itself to complete the static routing configuration according to its default configuration logic, so that the client has the ability to exchange data with the external network through the server.
概括而言,本发明的实施,使Android智能终端可以建立基于WiFi Direct技术,而能让该通信技术下的客户端通过服务端访问互联网的技术架构。然而,书不尽言,本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。In a nutshell, the implementation of the present invention enables Android smart terminals to establish a technical architecture based on WiFi Direct technology, allowing clients under this communication technology to access the Internet through the server. However, this is not exhaustive, and in part will be set forth in the description which follows, which will become apparent from the description, or may be learned by practice of the invention.
附图说明Description of drawings
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:
图1为本发明的智能终端路由配置方法的流程示意图;Fig. 1 is a schematic flow chart of the intelligent terminal routing configuration method of the present invention;
图2为本发明的智能终端的结构示意图;Fig. 2 is a schematic structural diagram of an intelligent terminal of the present invention;
图3为本发明的智能终端热点模式与站点模式共存控制方法的流程示意图。FIG. 3 is a schematic flowchart of a method for controlling the coexistence of a hotspot mode and a site mode of an intelligent terminal according to the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those skilled in the art will understand that unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Additionally, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The expression "and/or" used herein includes all or any elements and all combinations of one or more associated listed items.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this invention belongs. It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have meanings consistent with their meaning in the context of the prior art, and unless specifically defined as herein, are not intended to be idealized or overly Formal meaning to explain.
本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,进行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "terminal" and "terminal equipment" used here not only include wireless signal receiver equipment, which only has wireless signal receiver equipment without transmission capabilities, but also include receiving and transmitting hardware. A device having receive and transmit hardware capable of bi-directional communication over a bi-directional communication link. Such equipment may include: cellular or other communication equipment, which has a single-line display or a multi-line display or a cellular or other communication equipment without a multi-line display; PCS (Personal Communications Service, personal communication system), which can combine voice, data Processing, facsimile and/or data communication capabilities; PDA (Personal Digital Assistant, Personal Digital Assistant), which may include radio frequency receiver, pager, Internet/Intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System (Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal", "terminal device" may be portable, transportable, installed in a vehicle (air, sea, and/or land), or adapted and/or configured to operate locally, and/or In distributed form, the operation operates at any other location on Earth and/or in space. The "terminal" and "terminal equipment" used here can also be communication terminals, Internet terminals, music/video playback terminals, such as PDAs, MIDs (Mobile Internet Devices, mobile Internet devices) and/or with music/video playback terminals. Functional mobile phones, smart TVs, set-top boxes and other devices.
如图1所示,本发明的智能终端路由配置方法,包括如下步骤S21至S24:As shown in Figure 1, the smart terminal routing configuration method of the present invention includes the following steps S21 to S24:
步骤S21、使本智能终端以服务端身份接收客户端的接入。Step S21, enabling the smart terminal to receive access from the client as a server.
所述的服务端与客户端两种角色,在本发明中,主要相对于以WiFi P2P协议所规范的两部智能终端而言,其中,作为客户端的智能终端的芯片模组工作于该协议所规范的P2P-Client模式下,即表现为客户端角色;而与之相对的本发明的智能终端则工作于该协议所规范的P2P-Group Owner模式下,即表现为服务端角色。The two roles of the server and the client, in the present invention, are mainly compared to the two smart terminals regulated by the WiFi P2P protocol, wherein the chip module of the smart terminal as the client works on the protocol. In the standard P2P-Client mode, it acts as a client role; in contrast, the intelligent terminal of the present invention works in the P2P-Group Owner mode specified in the protocol, that is, it acts as a server role.
Android操作系统中,并不允许同一智能终端的WiFi芯片模组同时工作于客户端和服务端两种模式下,因此,要实现这一效果,请参阅本发明后续揭示的一个实例,即后续即将揭示的作为服务端的智能终端热点模式与站点模式共存控制方法。但需理解,无论服务端是否处于两种模式共存的状态下,均不影响本发明的有效实施。因本发明旨在解决前述协议规范下的客户端如何配置其路由,使其具备经过服务端进行通信的技术问题,因而,服务端本身能否与外网连通,并不影响本发明的技术实现。In the Android operating system, the WiFi chip module of the same intelligent terminal is not allowed to work in both client and server modes at the same time. Therefore, to achieve this effect, please refer to an example disclosed later in the present invention, that is, the following A method for controlling the coexistence of hotspot mode and site mode of an intelligent terminal disclosed as a server. However, it should be understood that no matter whether the server is in the coexistence state of the two modes, the effective implementation of the present invention will not be affected. Because the present invention aims to solve the technical problem of how to configure the routing of the client under the aforementioned protocol specifications so that it can communicate through the server, therefore, whether the server itself can communicate with the external network does not affect the technical realization of the present invention .
无论如何,本发明的智能终端按照前述的技术规范,将自身的WiFi芯片模组工作于WiFi P2P GO的状态,即可供客户端接入,便可完成初步的连接,充当起相当于AP(无线接入点)的作用。In any case, the intelligent terminal of the present invention operates its own WiFi chip module in the state of WiFi P2P GO according to the aforementioned technical specifications, which can be accessed by the client and complete the initial connection, acting as an AP ( wireless access point).
步骤S22、响应于客户端索取路由配置信息的配置请求而调用相应的配置进程。Step S22, invoking a corresponding configuration process in response to the client's configuration request for routing configuration information.
依据WiFi P2P协议的规范,客户端完成初步连接后,将向服务端发起配置请求DHCP Request(DHCP,Dynamic Host Configuration Protocal,动态主机配置协议),以其获取相应的路由配置信息,通常客户端会在其请求中至少要求如下选项(option):According to the specifications of the WiFi P2P protocol, after the client completes the initial connection, it will initiate a configuration request DHCP Request (DHCP, Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) to the server to obtain the corresponding routing configuration information, usually the client will At least the following options are required in its request:
以上的选项基本是依照DHCP协议的规范而约定的,本领域技术人员均可知晓。The above options are basically agreed upon in accordance with the specifications of the DHCP protocol, and are known to those skilled in the art.
服务端默认架设有DHCP服务器,能够响应于所述的配置请求,而提供一份路由配置信息,内含与所述各选项相对应的配置数据(信息)。从而,客户端在发出上述的配置请求之后,在客户端与服务端通信通畅的情况下,即可获得相应的配置列表,从而可提供给客户端按照各选项而相应设置自身而完成路由配置。The server is set up with a DHCP server by default, which can respond to the configuration request and provide a piece of routing configuration information, including configuration data (information) corresponding to the options. Therefore, after the client sends out the above configuration request, if the communication between the client and the server is smooth, it can obtain the corresponding configuration list, which can be provided to the client to set itself according to each option to complete the routing configuration.
然而,DHCP服务需要通过DNSmasq进程,也即服务端的配置进程来为客户端提供所述的路由配置信息。DNSmasq是一个小巧且方便地用于配置DNS和DHCP的工具,适用于小型网络,它提供了DNS功能和可选择的DHCP功能。它服务那些只在本地适用的域名,这些域名是不会在全球的DNS服务器中出现的。DHCP服务器和DNS服务器结合,并且允许DHCP分配的地址能在DNS中正常解析,而这些DHCP分配的地址和相关命令可以配置到每台主机(比如本发明的客户端)中,也可以配置到一台核心设备中(比如充当路由器的所述服务端),DNSmasq支持静态和动态两种DHCP配置方式。However, the DHCP service needs to provide the client with the routing configuration information through the DNSmasq process, that is, the server configuration process. DNSmasq is a small and convenient tool for configuring DNS and DHCP, suitable for small networks, which provides DNS functions and optional DHCP functions. It serves domain names that are only applicable locally, and these domain names do not appear in global DNS servers. The DHCP server combines with the DNS server, and allows the addresses assigned by DHCP to be resolved normally in DNS, and the addresses and related commands assigned by these DHCPs can be configured in each host (such as the client of the present invention), or can be configured in a In a core device (such as the server serving as a router), DNSmasq supports static and dynamic DHCP configuration modes.
服务端调用DNSmasq进程后,将由该进程执行后续向客户端提供路由配置信息的功能。After the server calls the DNSmasq process, the process will perform the subsequent function of providing routing configuration information to the client.
步骤S23、由所述配置进程构造所述的路由配置信息并向客户端反馈,在该路由配置信息中包含强制客户端执行静态路由配置的控制选项。Step S23, the configuration process constructs the routing configuration information and feeds it back to the client, the routing configuration information includes a control option to force the client to perform static routing configuration.
DNSmasq进程具有一个同名的配置文件dnsmasq.conf,在该配置文件中可以写入为客户端提供的路由数据,包括在前罗列的选项。故而,配置进程通过读取所述的配置选项的相应内容,便可形成所述的路由配置信息提供给所述发起配置请求的客户端。The DNSmasq process has a configuration file of the same name, dnsmasq.conf, in which routing data for clients can be written, including the options listed above. Therefore, by reading the corresponding content of the configuration option, the configuration process can form the routing configuration information and provide it to the client that initiates the configuration request.
需要指出的是,尽管以上提供的各种选项中并未包含DHCP协议序号为121的选项,实则选项121与33提供包含同样内容的静态路由数据,然而,在Android系统的DHCP服务提供的配置列表中,无论其是否在路由配置信息中包含33或121选项,客户端对选项33和选项121的静态路由数据均不予理睬。而研究发现,当服务端在其提供的路由配置信息中添加用于强制客户端执行静态路由配置的控制选项dhcp-option-force之后,则情况可以改观。具体而言,当特别提供121这一种静态路由数据并与该控制选项配合时,则客户端将作为一种绝对强制执行的指令去完成自身的静态路由数据的配置。因而,本发明的服务端便对所述配置信息的配置文件进行修改,使得其具备使所述配置进程具备向客户端反馈包含所述的控制选项的路由配置信息的能力。It should be pointed out that although the various options provided above do not include the option with the serial number of DHCP protocol 121, in fact, options 121 and 33 provide static routing data with the same content. However, the configuration list provided by the DHCP service of the Android system , regardless of whether it contains option 33 or option 121 in the routing configuration information, the client ignores the static routing data of option 33 and option 121. However, research has found that when the server adds the control option dhcp-option-force for forcing the client to perform static routing configuration in the routing configuration information it provides, the situation can be improved. Specifically, when the static routing data of 121 is specially provided and cooperates with the control option, the client will complete the configuration of its own static routing data as an absolutely mandatory instruction. Therefore, the server of the present invention modifies the configuration file of the configuration information, so that it has the ability to enable the configuration process to feed back the routing configuration information including the control options to the client.
具体而言,默认情况下,在未对配置进程的配置文件进行修改的情况下,当客户端接收到服务端的所述的路由配置信息后,依据Android系统的默认规则,将启动其配置进程,完成路由配置,期间不负责完成自由的静态路由数据的设置,这种情况下,客户端由于缺乏静态路由信息,而无法通过服务端访问外部网络,反之外部网络的数据包也无法顺利到达客户端。因此需要对所述的配置进程所需的配置文件进行重新配置,请参考如下的一个用于修改所述配置文件的实例:Specifically, by default, without modifying the configuration file of the configuration process, when the client receives the routing configuration information from the server, it will start its configuration process according to the default rules of the Android system. Complete the routing configuration, and not be responsible for completing the free static routing data settings during this period. In this case, the client cannot access the external network through the server due to the lack of static routing information. Otherwise, the data packets of the external network cannot reach the client smoothly. . Therefore, the configuration file required for the configuration process needs to be reconfigured. Please refer to the following example for modifying the configuration file:
首先,使所述的配置进程处于关闭状态。First, make the configuration process described in the closed state.
一个实施例中,执行以下指令:sudo dnsmasq-C./dnsmasq.conf-z-k,执行该指令的目的,在于以系统最高权限关闭以Android系统默认流程执行路由配置的dnsmasq进程,即使其已完成了路由配置,通过例如上述的指令,也可以将其关闭,并且将以后续的处理为准。In one embodiment, the following command is executed: sudo dnsmasq-C./dnsmasq.conf-z-k, the purpose of executing this command is to close the dnsmasq process that executes the routing configuration with the default process of the Android system with the highest system authority, even if it has completed Routing configuration, such as the above-mentioned instructions, can also be turned off, and the subsequent processing will prevail.
然后,修改该配置进程的配置文件,使其包含强制客户端执行静态路由配置的控制选项,强制客户端依据服务端提供的路由配置信息中的所述选项为121的静态路由数据对自身进行配置。Then, modify the configuration file of the configuration process to include control options that force the client to perform static routing configuration, and force the client to configure itself according to the static routing data with the option 121 in the routing configuration information provided by the server .
在关闭所述配置进程之后,进而对其配置文件dnsmasq.conf进行修改,例如:After closing the configuration process, modify its configuration file dnsmasq.conf, for example:
#杜绝dnsmasq进程读取其它任何诸如/etc/resolv.conf的域名文件#Prevent the dnsmasq process from reading any other domain name files such as /etc/resolv.conf
no-resolvno-resolv
port=0port=0
#网卡绑定#Network card binding
interface=wlan0interface=wlan0
#指定起始地址、终止地址以及租约时间#Specify the start address, end address and lease time
dhcp-range=10.15.0.3,10.15.0.20,12hdhcp-range=10.15.0.3,10.15.0.20,12h
#发送给客户端的域名服务器地址#The domain name server address sent to the client
server=114.114.114.114server=114.114.114.114
#强制路由配置,设置控制选项及设定选项为121# Mandatory routing configuration, set control options and set options to 121
dhcp-option-force=121,192.168.1.0/24,10.15.0.1dhcp-option-force=121,192.168.1.0/24,10.15.0.1
dhcp-option-force=33,192.168.1.0,10.15.0.1dhcp-option-force=33,192.168.1.0,10.15.0.1
继而,后续dnsmasq进程再次启动之后,便会直接读取其配置文件,将与上述所列的特征相应的数据,其中尤其包括所述的控制选项及选项121,封闭成约定的路由配置信息,在其中包含各种相应的数据,响应于客户端的配置请求而反馈给客户端。Then, after the subsequent dnsmasq process is started again, it will directly read its configuration file, and seal the data corresponding to the above-mentioned characteristics, especially including the control option and option 121, into the agreed routing configuration information. It contains various corresponding data, which is fed back to the client in response to the client's configuration request.
相应的,客户端在收到所述的路由配置信息之后,对其进行解析,获取其中的各选项相对应的数据,对自身的网络设置进行更新,当其获知所述控制选项及相应的参数选项121时,即能自行强制配置自身的静态路由数据。完成这一过程的配置后,客户端便可通过本发明充当服务端的智能终端与外网通信。Correspondingly, after receiving the routing configuration information, the client parses it, obtains the data corresponding to each option, and updates its own network settings. When it knows the control options and corresponding parameters When the option is 121, you can configure your own static routing data by yourself. After completing the configuration of this process, the client can communicate with the external network through the intelligent terminal acting as the server of the present invention.
请参阅图2,依据计算机软件模块化思维,本发明还提供了一种智能终端,该智能终端包括接入单元21、响应单元22以及反馈单元23,现将各单元所具备的功能揭示如下:Please refer to Fig. 2, according to the computer software modularization thinking, the present invention also provides an intelligent terminal, which includes an access unit 21, a response unit 22 and a feedback unit 23, and the functions of each unit are disclosed as follows:
所述的接入单元21,用于使本智能终端以服务端身份接收客户端的接入。The access unit 21 is configured to enable the smart terminal to receive client access as a server.
所述的服务端与客户端两种角色,在本发明中,主要相对于以WiFi P2P协议所规范的两部智能终端而言,其中,作为客户端的智能终端的芯片模组工作于该协议所规范的P2P-Client模式下,即表现为客户端角色;而与之相对的本发明的智能终端则工作于该协议所规范的P2P-Group Owner模式下,即表现为服务端角色。The two roles of the server and the client, in the present invention, are mainly compared to the two smart terminals regulated by the WiFi P2P protocol, wherein the chip module of the smart terminal as the client works on the protocol. In the standard P2P-Client mode, it acts as a client role; in contrast, the intelligent terminal of the present invention works in the P2P-Group Owner mode specified in the protocol, that is, it acts as a server role.
Android操作系统中,并不允许同一智能终端的WiFi芯片模组同时工作于客户端和服务端两种模式下,因此,要实现这一效果,请参阅本发明后续揭示的一个实例,即后续即将揭示的作为服务端的智能终端热点模式与站点模式共存控制方法。但需理解,无论服务端是否处于两种模式共存的状态下,均不影响本发明的有效实施。因本发明旨在解决前述协议规范下的客户端如何配置其路由,使其具备经过服务端进行通信的的能力技术问题,因而,服务端本身能否与外网连通,并不影响本发明的技术实现。In the Android operating system, the WiFi chip module of the same intelligent terminal is not allowed to work in both client and server modes at the same time. Therefore, to achieve this effect, please refer to an example disclosed later in the present invention, that is, the following A method for controlling the coexistence of hotspot mode and site mode of an intelligent terminal disclosed as a server. However, it should be understood that no matter whether the server is in the coexistence state of the two modes, the effective implementation of the present invention will not be affected. Because the present invention aims to solve the technical problem of how to configure the routing of the client under the aforementioned protocol specification, so that it has the ability to communicate through the server, therefore, whether the server itself can communicate with the external network does not affect the technical problem of the present invention. Technical realization.
无论如何,本发明的智能终端按照前述的技术规范,将自身的WiFi芯片模组工作于WiFi P2P GO的状态,即可供客户端接入,便可完成初步的连接,充当起相当于AP(无线接入点)的作用。In any case, the intelligent terminal of the present invention operates its own WiFi chip module in the state of WiFi P2P GO according to the aforementioned technical specifications, which can be accessed by the client and complete the initial connection, acting as an AP ( wireless access point).
所述的响应单元22,被配置为响应于客户端索取路由配置信息的配置请求而调用相应的配置进程。The response unit 22 is configured to invoke a corresponding configuration process in response to a configuration request from a client for routing configuration information.
依据WiFi P2P协议的规范,客户端完成初步连接后,将向服务端发起配置请求DHCP Request(DHCP,Dynamic Host Configuration Protocal,动态主机配置协议),以其获取相应的路由配置信息,通常客户端会在其请求中至少要求如下选项(option):According to the specifications of the WiFi P2P protocol, after the client completes the initial connection, it will initiate a configuration request DHCP Request (DHCP, Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) to the server to obtain the corresponding routing configuration information, usually the client will At least the following options are required in its request:
以上的选项基本是依照DHCP协议的规范而约定的,本领域技术人员均可知晓。The above options are basically agreed upon in accordance with the specifications of the DHCP protocol, and are known to those skilled in the art.
服务端默认架设有DHCP服务器,能够响应于所述的配置请求,而提供一份路由配置信息,内含与所述各选项相对应的配置数据(信息)。从而,客户端在发出上述的配置请求之后,在客户端与服务端通信通畅的情况下,即可获得相应的配置列表,从而可提供给客户端按照各选项而相应设置自身完成路由配置。The server is set up with a DHCP server by default, which can respond to the configuration request and provide a piece of routing configuration information, including configuration data (information) corresponding to the options. Therefore, after the client sends the above configuration request, if the communication between the client and the server is smooth, it can obtain the corresponding configuration list, which can be provided to the client to set itself according to each option to complete the routing configuration.
然而,DHCP服务需要通过DNSmasq进程,也即服务端的配置进程来为客户端提供所述的路由配置信息。DNSmasq是一个小巧且方便地用于配置DNS和DHCP的工具,适用于小型网络,它提供了DNS功能和可选择的DHCP功能。它服务那些只在本地适用的域名,这些域名是不会在全球的DNS服务器中出现的。DHCP服务器和DNS服务器结合,并且允许DHCP分配的地址能在DNS中正常解析,而这些DHCP分配的地址和相关命令可以配置到每台主机(比如本发明的客户端)中,也可以配置到一台核心设备中(比如充当路由器的所述服务端),DNSmasq支持静态和动态两种DHCP配置方式。However, the DHCP service needs to provide the client with the routing configuration information through the DNSmasq process, that is, the server configuration process. DNSmasq is a small and convenient tool for configuring DNS and DHCP, suitable for small networks, which provides DNS functions and optional DHCP functions. It serves domain names that are only applicable locally, and these domain names do not appear in global DNS servers. The DHCP server combines with the DNS server, and allows the addresses assigned by DHCP to be resolved normally in DNS, and the addresses and related commands assigned by these DHCPs can be configured in each host (such as the client of the present invention), or can be configured in a In a core device (such as the server serving as a router), DNSmasq supports static and dynamic DHCP configuration modes.
服务端的响应单元22调用DNSmasq进程后,将由该进程执行后续向客户端提供路由配置信息的功能。After the response unit 22 of the server invokes the DNSmasq process, the process will execute the function of providing routing configuration information to the client.
所述的反馈单元23,被配置为由所述配置进程构造所述的路由配置信息并向客户端反馈,在该路由配置信息中包含强制客户端执行静态路由配置的控制选项。The feedback unit 23 is configured to construct the routing configuration information by the configuration process and feed it back to the client, where the routing configuration information includes control options for forcing the client to perform static routing configuration.
DNSmasq进程具有一个同名的配置文件dnsmasq.conf,在该配置文件中可以写入为客户端提供的路由数据,包括在前罗列的选项。故而,配置进程通过读取所述的配置选项的相应内容,便可形成所述的路由配置信息提供给所述发起配置请求的客户端。The DNSmasq process has a configuration file of the same name, dnsmasq.conf, in which routing data for clients can be written, including the options listed above. Therefore, by reading the corresponding content of the configuration option, the configuration process can form the routing configuration information and provide it to the client that initiates the configuration request.
需要指出的是,尽管以上提供的各种选项中并未包含DHCP协议序号为121的选项,实则选项121与33提供包含同样内容的静态路由数据,然而,在Android系统的DHCP服务提供的配置列表中,无论其是否在路由配置信息中包含33或121选项,客户端对选项33和选项121的静态路由数据均不予理睬。而研究发现,当服务端在其提供的路由配置信息中添加用于强制客户端执行静态路由配置的控制选项dhcp-option-force之后,则情况可以改观。具体而言,当特别提供121这一种静态路由数据并与该控制选项配合时,则客户端将作为一种绝对强制执行的指令去完成自身的静态路由数据的配置。因而,本发明的服务端便对所述配置信息的配置文件进行修改,使得其具备使所述配置进程具备向客户端反馈包含所述的控制选项的路由配置信息的能力。It should be pointed out that although the various options provided above do not include the option with the serial number of DHCP protocol 121, in fact, options 121 and 33 provide static routing data with the same content. However, the configuration list provided by the DHCP service of the Android system , regardless of whether it contains option 33 or option 121 in the routing configuration information, the client ignores the static routing data of option 33 and option 121. However, research has found that when the server adds the control option dhcp-option-force for forcing the client to perform static routing configuration in the routing configuration information it provides, the situation can be improved. Specifically, when the static routing data of 121 is specially provided and cooperates with the control option, the client will complete the configuration of its own static routing data as an absolutely mandatory instruction. Therefore, the server of the present invention modifies the configuration file of the configuration information, so that it has the ability to enable the configuration process to feed back the routing configuration information including the control options to the client.
具体而言,默认情况下,在未对配置进程的配置文件进行修改的情况下,当客户端接收到服务端的所述的路由配置信息后,依据Android系统的默认规则,将启动其配置进程,完成路由配置,期间不负责完成自由的静态路由数据的设置,这种情况下,客户端由于缺乏静态路由信息,而无法通过服务端访问外部网络,反之外部网络的数据包也无法顺利到达客户端。因此需要对所述的配置进程所需的配置文件进行重新配置,请参考如下的一个用于修改所述配置文件的实例:Specifically, by default, without modifying the configuration file of the configuration process, when the client receives the routing configuration information from the server, it will start its configuration process according to the default rules of the Android system. Complete the routing configuration, and not be responsible for completing the free static routing data settings during this period. In this case, the client cannot access the external network through the server due to the lack of static routing information. Otherwise, the data packets of the external network cannot reach the client smoothly. . Therefore, the configuration file required for the configuration process needs to be reconfigured. Please refer to the following example for modifying the configuration file:
首先,使所述的配置进程处于关闭状态。First, make the configuration process described in the closed state.
一个实施例中,执行以下指令:sudo dnsmasq-C./dnsmasq.conf-z-k,执行该指令的目的,在于以系统最高权限关闭以Android系统默认流程执行路由配置的dnsmasq进程,即使其已完成了路由配置,通过例如上述的指令,也可以将其关闭,并且将以后续的处理为准。In one embodiment, the following command is executed: sudo dnsmasq-C./dnsmasq.conf-z-k, the purpose of executing this command is to close the dnsmasq process that executes the routing configuration with the default process of the Android system with the highest system authority, even if it has completed Routing configuration, such as the above-mentioned instructions, can also be turned off, and the subsequent processing will prevail.
然后,修改该配置进程的配置文件,使其包含强制客户端执行静态路由配置的控制选项,强制客户端依据服务端提供的路由配置信息中的所述选项为121的静态路由数据对自身进行配置。Then, modify the configuration file of the configuration process to include control options that force the client to perform static routing configuration, and force the client to configure itself according to the static routing data with the option 121 in the routing configuration information provided by the server .
在关闭所述配置进程之后,进而对其配置文件dnsmasq.conf进行修改,例如:After closing the configuration process, modify its configuration file dnsmasq.conf, for example:
#杜绝dnsmasq进程读取其它任何诸如/etc/resolv.conf的域名文件#Prevent the dnsmasq process from reading any other domain name files such as /etc/resolv.conf
no-resolvno-resolv
port=0port=0
#网卡绑定#Network card binding
interface=wlan0interface=wlan0
#指定起始地址、终止地址以及租约时间#Specify the start address, end address and lease time
dhcp-range=10.15.0.3,10.15.0.20,12hdhcp-range=10.15.0.3,10.15.0.20,12h
#发送给客户端的域名服务器地址#The domain name server address sent to the client
server=114.114.114.114server=114.114.114.114
#强制路由配置,设置控制选项及设定选项为121# Mandatory routing configuration, set control options and set options to 121
dhcp-option-force=121,192.168.1.0/24,10.15.0.1dhcp-option-force=121,192.168.1.0/24,10.15.0.1
dhcp-option-force=33,192.168.1.0,10.15.0.1dhcp-option-force=33,192.168.1.0,10.15.0.1
继而,后续dnsmasq进程再次启动之后,便会直接读取其配置文件,将与上述所列的特征相应的数据,其中尤其包括所述的控制选项及选项121,封闭成约定的路由配置信息,在其中包含各种相应的数据,响应于客户端的配置请求而反馈给客户端。Then, after the subsequent dnsmasq process is started again, it will directly read its configuration file, and seal the data corresponding to the above-mentioned characteristics, especially including the control option and option 121, into the agreed routing configuration information. It contains various corresponding data, which is fed back to the client in response to the client's configuration request.
相应的,客户端在收到所述的路由配置信息之后,对其进行解析,获取其中的各选项相对应的数据,对自身的网络设置进行更新,当其获知所述控制选项及相应的参数选项121时,即能自行强制配置自身的静态路由数据。完成这一过程的配置后,客户端便可通过本发明充当服务端的智能终端与外网通信。Correspondingly, after receiving the routing configuration information, the client parses it, obtains the data corresponding to each option, and updates its own network settings. When it knows the control options and corresponding parameters When the option is 121, you can configure your own static routing data by yourself. After completing the configuration of this process, the client can communicate with the external network through the intelligent terminal acting as the server of the present invention.
本发明在前所引用的一种智能终端热点模式与站点模式共存控制方法,可以与本发明的前述的方法相配合,增强所述服务端的接入外网的功能,从而使得作用服务端的本发明的智能终端具备相当于路由器的功能,而且仅需依赖于WiFi P2P协议的规范。A smart terminal hotspot mode and site mode coexistence control method cited in the present invention can cooperate with the aforementioned method of the present invention to enhance the function of the server to access the external network, so that the function of the present invention on the server The intelligent terminal has the function equivalent to a router, and only needs to rely on the specification of the WiFi P2P protocol.
具体如图3所示,所述共存控制方法包括如下步骤S11-S14:Specifically as shown in FIG. 3, the coexistence control method includes the following steps S11-S14:
步骤S11,从用户界面接收用于启动该智能终端的热点模式和站点模式的控制指令。Step S11, receiving a control instruction for starting the hotspot mode and the station mode of the smart terminal from the user interface.
本发明的实现,适于为Android提供并安装一个应用程序,由其启动,在获取系统最高权限或者系统开放最高权限的情况下,而向系统提高交互功能,实现本方法所需的控制。The realization of the present invention is suitable for providing and installing an application program for Android, which is started, and in the case of obtaining the highest authority of the system or opening the highest authority of the system, and improving the interactive function to the system to realize the control required by the method.
用户界面泛指能够用于向智能终端发送所述控制指令的显示界面,例如,可以为Android系统的设置页面中的一个选项(或按键,由所述应用程序添加其中,下同),也可以是从桌面呼出的通知栏或者交互页面中的一个选项,还可以是所述应用程序的一个活动组件所构造的页面中的一个选项。The user interface generally refers to the display interface that can be used to send the control command to the smart terminal, for example, it can be an option (or button, added by the application program, the same below) in the setting page of the Android system, or It is an option in a notification bar or an interactive page called out from the desktop, or an option in a page constructed by an active component of the application program.
本发明优选如下两种方式,用于接收所述的控制指令:In the present invention, the following two methods are preferred for receiving the control instruction:
其一,通过在用户界面提供单个控制按键,以用于一键式地接收所述的控制指令,这种方式便于用户实现一键式操作。Firstly, by providing a single control button on the user interface for one-button receiving of the control instruction, this method is convenient for the user to realize one-button operation.
其二,通过在用户界面对应热点模式和站点模式而分别提供控制按键,以分别对应不同按键而产生对应启动相应的模式的控制指令。Second, control buttons are provided on the user interface corresponding to the hotspot mode and the station mode, so as to generate control instructions corresponding to starting the corresponding modes corresponding to different buttons.
根据以上的方式提供的控制按键,通常这些按键可以优选设置在系统桌面通知栏列表处,或者以桌面悬浮窗的方式提供,既便于用户触控控制,又不影响用户视觉效果,当然也可作为系统的默认功能而随用户开启WiFi按键时激活。较佳的,所述应用程序可以将自身设为自启动项,使得系统启动时,可以自行加载所述的按键,从而便于用户操作。According to the control buttons provided in the above way, usually these buttons can be preferably set in the system desktop notification bar list, or provided in the form of desktop floating windows, which is convenient for users to touch and control without affecting the user's visual effect. Of course, they can also be used as The default function of the system is activated when the user turns on the WiFi button. Preferably, the application program can set itself as a self-starting item, so that when the system is started, the buttons can be loaded by itself, so as to facilitate the user's operation.
当用户通过所述的用户界面,触控所述的控制按键之后,便产生相应的控制指令,该控制指令将被所述应用程序的进程接收,并进行后续的处理。After the user touches the control button through the user interface, a corresponding control command is generated, and the control command will be received by the process of the application program for subsequent processing.
步骤S12,受控于该控制指令而启动系统预置的用于将该智能终端配置为热点模式的热点维护进程与用于将该智能终端配置为站点模式的站点维护进程;Step S12, under the control of the control instruction, start the system preset hotspot maintenance process for configuring the smart terminal as a hotspot mode and the site maintenance process for configuring the smart terminal as a station mode;
受用户控制产生的所述控制指令的作用,进而启动Android系统所预置的站点维护进程和热点维护进程,其中,站点维护进程用于将该智能终端配置为站点模式,同理,热点维护进程用于将该智能终端配置为热点模式。根据对Android系统的分析,当其热点维护进程开启之后,站点维护进程会被前者关闭,因而,善于利用这一发现,便有利于维持两个进程的并存。Under the action of the control command generated by user control, the site maintenance process and hotspot maintenance process preset by the Android system are started, wherein the site maintenance process is used to configure the smart terminal as a site mode. Similarly, the hotspot maintenance process It is used to configure the smart terminal as hotspot mode. According to the analysis of the Android system, when the hotspot maintenance process is opened, the site maintenance process will be closed by the former. Therefore, making good use of this discovery will help maintain the coexistence of the two processes.
所述站点维护进程,特指Android系统自身提供的wpa_supplicant进程,wpa_supplicant本是开源项目源码,被谷歌修改后加入android移动平台,主要是用来支持WEP,WPA/WPA2和WAPI无线协议和加密认证的,而实际上的工作内容是通过socket(不管是wpa_supplicant与上层还是wpa_supplicant与驱动都采用socket通讯)与驱动交互上报数据给用户,用户可以通过socket发送命令给wpa_supplicant调动驱动来对WiFi芯片操作。简单的说,wpa_supplicant就是WiFi驱动和用户的中转站外加对协议和加密认证的支持。经过编译后的wpa_supplicant源程序可以看到两个主要的可执行工具:wpa_supplicant和wpa_cli。wpa_supplicant是核心程序,它和wpa_cli的关系就是服务和客户端的关系:后台运行wpa_supplicant,使用wpa_cli来搜索、设置、和连接网络。The site maintenance process refers specifically to the wpa_supplicant process provided by the Android system itself. The wpa_supplicant is an open source project source code that was modified by Google and added to the Android mobile platform. It is mainly used to support WEP, WPA/WPA2 and WAPI wireless protocols and encryption authentication. , but the actual work content is to interact with the driver to report data to the user through the socket (whether wpa_supplicant communicates with the upper layer or wpa_supplicant and the driver use socket communication), and the user can send commands to wpa_supplicant through the socket to mobilize the driver to operate the WiFi chip. Simply put, wpa_supplicant is a transfer station for WiFi drivers and users plus support for protocols and encryption authentication. The compiled wpa_supplicant source program can see two main executable tools: wpa_supplicant and wpa_cli. wpa_supplicant is the core program, its relationship with wpa_cli is the relationship between service and client: run wpa_supplicant in the background, use wpa_cli to search, set, and connect to the network.
以下提供一个利用wpa_cli来完成网络连接的示例,但不应理解为对本发明的实现的限制。要实现网络连接功能,首先需要运行wpa_supplicant程序以加载基本功能;The following provides an example of using wpa_cli to complete the network connection, but it should not be construed as a limitation to the implementation of the present invention. To realize the network connection function, you first need to run the wpa_supplicant program to load the basic functions;
执行:/system/bin/wpa_supplicant-d-Dwext-iwlan0-c/data/misc/wifi/wpa_supplicant.confExecution: /system/bin/wpa_supplicant-d-Dwext-iwlan0-c/data/misc/wifi/wpa_supplicant.conf
其中:in:
-d:增加调试信息-d: Add debugging information
-Dwext:wext,驱动名称-Dwext: wext, driver name
-iwlan0:wlan0,网络接口名称-iwlan0: wlan0, network interface name
/system/bin/wpa_supplicant:wpa_supplicant,可执行程序路径/system/bin/wpa_supplicant: wpa_supplicant, executable program path
/data/misc/wifi/wpa_supplicant.conf:wpa_supplicant的配置文件路径/data/misc/wifi/wpa_supplicant.conf: wpa_supplicant configuration file path
然后,运行命令行工具wpa_cli;Then, run the command line tool wpa_cli;
执行:wpa_cli-iwlan0-p/data/system/wpa_supplicantExecute: wpa_cli-iwlan0-p/data/system/wpa_supplicant
注意,-p/data/system/wpa_supplicant中的wpa_supplicant并不是可执行程序,而是个控制套接字。Note that wpa_supplicant in -p/data/system/wpa_supplicant is not an executable program, but a control socket.
此时会进入交互模式。其中交互模式的命令如下表:This will enter interactive mode. The commands in the interactive mode are as follows:
Full commandFull command
Short commandShort command
DescriptionDescription
statusstatus
statstat
displays the current connection statusdisplays the current connection status
disconnectdisconnect
discdisc
prevents wpa_supplicant from connecting to any access pointprevents wpa_supplicant from connecting to any access point
quitquit
exits wpa_cliexits wpa_cli
terminateterminate
termterm
kills wpa_supplicantkills wpa_supplicant
reconfigurereconfigure
reconrecon
reloads wpa_supplicant with the configuration file supplied(-cparameter)reloads wpa_supplicant with the configuration file supplied(-cparameter)
scanscan
scanscan
scans for available access points(only scans it,doesn't displayanything)scans for available access points (only scans it, doesn't display anything)
scan_resultscan_result
scan_rscan_r
displays the results of the last scandisplays the results of the last scan
list_networkslist_networks
list_nlist_n
displays a list of configured networks and their status(active ornot,enabled or disabled)displays a list of configured networks and their status (active or not, enabled or disabled)
select_networkselect_network
select_nselect_n
select a network among those defined to initiate a connection(ieselect_network 0)select a network among those defined to initiate a connection (ie select_network 0)
enable_networkenable_network
enable_nenable_n
makes a configured network available for selection(ie enable_network0)makes a configured network available for selection (ie enable_network0)
disable_networkdisable_network
disable_ndisable_n
makes a configured network unavailable for selection(ie disable_network 0)makes a configured network unavailable for selection (ie disable_network 0)
remove_networkremove_network
remove_nremove_n
removes a network and its configuration from the list(ie remove_network 0)removes a network and its configuration from the list (ie remove_network 0)
add_networkadd_network
add_nadd_n
adds a new network to the list.Its id will be created automaticallyadds a new network to the list. Its id will be created automatically
set_networkset_network
set_nset_n
shows a very short list of available options to configure a networkwhen supplied with no parameters.shows a very short list of available options to configure a network when supplied with no parameters.
See next section for a list of extremely useful parameters to be usedwith set_network and get_network.See next section for a list of extremely useful parameters to be used with set_network and get_network.
get_networkget_network
get_nget_n
displays the required parameter for the specified network.See nextsection for a list of parametersdisplays the required parameter for the specified network. See next section for a list of parameters
save_configsave_config
save_csave_c
saves the configurationsaves the configuration
以上命令项可以从Android的公开技术文档中查看,此处仅供参考。The above command items can be viewed from Android's public technical documentation, which is for reference only.
设置网络的基本格式的指令为:set_network<network id><key><parameter>[<parameter>]The command to set the basic format of the network is: set_network<network id><key><parameter>[<parameter>]
显示网络信息的基本格式的指令为:get_network<network id><key>The command to display the basic format of network information is: get_network<network id><key>
相应的参数如下表:The corresponding parameters are as follows:
Keykey
DescriptionDescription
ParametersParameters
ssidssid
Access point nameAccess point name
stringstring
id_strid_str
String identifying the networkString identifying the network
stringstring
prioritypriority
Connection priority over other APsConnection priority over other APs
number(0 being the default low priority)number(0 being the default low priority)
bssidbssid
Mac address of the access pointMac address of the access point
mac addressmac address
scan_ssidscan_ssid
Enable/disbale ssid scanEnable/disbale ssid scan
0,1,20,1,2
key_mgmtkey_mgmt
Type of key managementType of key management
WPA-PSK,WPA_EAP,NoneWPA-PSK,WPA_EAP,None
pairwisepairwise
Pairwise ciphers for WPAPairwise ciphers for WPA
CCMP,TKIPCCMP, TKIP
group=TKIPgroup=TKIP
Group ciphers for WPAGroup ciphers for WPA
CCMP,TKIP,WEP104,WEP40CCMP, TKIP, WEP104, WEP40
pskpsk
Pre-Shared Key(clear or encrypted)Pre-Shared Key(clear or encrypted)
stringstring
wep_key0wep_key0
WEP key(up to 4:wep_key[0123])WEP key (up to 4: wep_key[0123])
stringstring
eapeap
Extensible Authentication ProtocolExtensible Authentication Protocol
MD5,MSCHAPV2,OTP,GTC,TLS,PEAP,TTLSMD5, MSCHAPV2, OTP, GTC, TLS, PEAP, TTLS
identityidentity
EAP identity stringEAP identity string
stringstring
passwordpassword
EAP passwordEAP password
stringstring
ca_certca_cert
Pathname to CA certificate filePathname to CA certificate file
/full/path/to/certificate/full/path/to/certificate
client_certclient_cert
Pathname to client certificatePathname to client certificate
/full/path/to/certificate(PEM/DER)/full/path/to/certificate(PEM/DER)
private_keyprivate_key
Pathname to a client private key filePathname to a client private key file
/full/path/to/private_key(PEM/DER/PFX)/full/path/to/private_key(PEM/DER/PFX)
同理,以上参数表也可通过公共途径从Android官方得到,仅供参考,恕不赘述。以下利用一用于连接无加密的AP的具体实例说明如何实现网络连接:In the same way, the above parameter table can also be obtained from the Android official through public channels, and it is for reference only and will not be described in detail. The following uses a specific example for connecting to an AP without encryption to illustrate how to implement a network connection:
>add_network(将显示一网络ID,假定返回值为0)>add_network (will display a network ID, assuming the return value is 0)
>set_network 0ssid"666">set_network 0ssid "666"
>set_network 0key_mgmt NONE>set_network 0key_mgmt NONE
>enable_network 0>enable_network 0
>quit>quit
再利用一用于连接WEP加密的AP的具体实例加以说明:Then use a specific example for connecting to a WEP-encrypted AP to illustrate:
>add_network(假定网络ID返回1)>add_network (assuming network ID returns 1)
>set_network 1ssid"666">set_network 1ssid "666"
>set_network 1key_mgmt NONE>set_network 1key_mgmt NONE
>set_network 1wep_key0"your ap password">set_network 1wep_key0 "your ap password"
>enable_network 1>enable_network 1
至于连接WPA-PSK/WPA2-PSK加密的AP的示例如下:An example of connecting to an AP encrypted with WPA-PSK/WPA2-PSK is as follows:
>add_network(假定网络ID返回2)>add_network (assuming network ID returns 2)
>set_network 2ssid"666">set_network 2ssid "666"
>set_network 2psk"your pre-shared key">set_network 2psk "your pre-shared key"
>enable_network 2>enable_network 2
到此,wifi模块就能连接上AP了。At this point, the wifi module can connect to the AP.
以上是通过命令行工具wpa_cli来实现wifi网络的连接。当然,也可以通过wpa_supplicant的配置文件来实现连接。The above is to realize the connection of wifi network through the command line tool wpa_cli. Of course, the connection can also be realized through the configuration file of wpa_supplicant.
不妨再回顾前面运行wpa_supplicant时执行的命令:May wish to review the command executed when running wpa_supplicant earlier:
/system/bin/wpa_supplicant-d-Dwext-iwlan0-c/data/misc/wifi/wpa_supplicant.conf/system/bin/wpa_supplicant-d-Dwext-iwlan0-c/data/misc/wifi/wpa_supplicant.conf
我们在执行时加上了-c/data/misc/wifi/wpa_supplicant.conf,故而将要连接的AP的设置以一定的格式写入wpa_supplicant.conf配置文件中即可。例如:We added -c/data/misc/wifi/wpa_supplicant.conf during execution, so the settings of the AP to be connected can be written in the wpa_supplicant.conf configuration file in a certain format. E.g:
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=systemupdate_config=1ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=systemupdate_config=1
network={network={
ssid="my access point"ssid="my access point"
proto=WPAproto=WPA
key_mgmt=WPA-PSKkey_mgmt=WPA-PSK
psk="you pass words"psk="you pass words"
}}
可见,Android系统虽然在默认情况下,在开启热点维护进程的同时会自动关闭站点维护进程,但是,通过以上运用指令或者运用配置文件两种方式,可以实现由应用程序进程自行控制所述的站点维护进程的开启。It can be seen that although the Android system automatically closes the site maintenance process when the hotspot maintenance process is enabled by default, the application process can control the site by itself through the above two methods of using the command or using the configuration file. The start of the maintenance process.
热点维护进程,特指Android系统提供的hostapd进程。hostapd是用户控件的守护进程用于无线接入点(AP)和授权服务器(authentication servers)。hostapd实现了IEEE802.11的AP管理,IEEE802.1X/WPA/WPA2/EAP授权,RADIUS客户端,EAP服务器和RADIUS授权服务器,目前最新版本支持Linux系统(HOST AP,madwifi,mac80211-based驱动)和FreeBSD(net80211)。hostapd设计为一个守护程序(进程),后台运行,进行一些相关控制授权的操作。The hotspot maintenance process refers specifically to the hostapd process provided by the Android system. hostapd is a user-controlled daemon for wireless access points (APs) and authentication servers. hostapd implements IEEE802.11 AP management, IEEE802.1X/WPA/WPA2/EAP authorization, RADIUS client, EAP server and RADIUS authorization server. The latest version supports Linux system (HOST AP, madwifi, mac80211-based driver) and FreeBSD (net80211). hostapd is designed as a daemon program (process) that runs in the background and performs some related control and authorization operations.
Hostapd与wpa_supplicant的区别主要体现在wpa_supplicant支持基本AP操作,但不包括各种更细致的参数调整,例如WPA2-Enterprise(RADIUS server认证)。由此可见,两种进程只是分工不同,其作用近似。The difference between Hostapd and wpa_supplicant is mainly reflected in that wpa_supplicant supports basic AP operations, but does not include various more detailed parameter adjustments, such as WPA2-Enterprise (RADIUS server authentication). It can be seen that the two processes are only different in division of labor, and their functions are similar.
同理,hostapd允许通过某种方式对其加以配置,从而可以由应用程序自行启动之。以下提供一个利用其配置文件来实现配置的示例:Likewise, hostapd allows it to be configured in such a way that it can be started by an application itself. The following provides an example of using its configuration file to achieve configuration:
此处是一个相关的配置文件的结构示例,左侧序号为供参考的行数:Here is an example of the structure of a relevant configuration file, numbered on the left for reference:
基于该配置文件,按照如下过程可建立热点:Based on this configuration file, a hotspot can be established as follows:
搭建网桥:sudo apt-get install bridge-utilsBuild a bridge: sudo apt-get install bridge-utils
建立网桥:Create a bridge:
sudo brctl adbr br0sudo brctl adbr br0
02.sudo ifconfig br0 192.168.2.236netmask 255.255.255.002. sudo ifconfig br0 192.168.2.236 netmask 255.255.255.0
03.sudo route add default gw 192.168.2.25403. sudo route add default gw 192.168.2.254
连接网桥两端:Connect both ends of the bridge:
sudo brctl addif br0eth0sudo brctl addif br0eth0
02.sudo brctl addif br0wlan002. sudo brctl addif br0wlan0
启用配置:Enable configuration:
sudo./hostapd hostapd.confsudo ./hostapd hostapd.conf
一般情况下,如无其他故障,其他智能终端便可扫描到由此建立的热点的SSID,而由于该热点为自建,未具备DHCP服务,故智能终端需要自行调协静态IP才能实现局域网连接。Under normal circumstances, if there are no other failures, other smart terminals can scan the SSID of the hotspot thus established. Since the hotspot is self-built and does not have DHCP service, the smart terminal needs to adjust the static IP by itself to realize the LAN connection. .
以上分别给出的站点维护进程和热点维护进程的原理及其具体实现的示例性介绍,本领域技术人员可以在以上揭示的基础,理解本发明的灵活多变的实现方式。其中,需要指出的是,为了实现的便利,提高实施效率,无论对于hostapd还是wpa_supplicant进程,均推荐使用配置文件将网络配置信息的预置于其.conf文件进行预配置,然后再启动相应的维护进程。The principle of the site maintenance process and the hotspot maintenance process and the exemplary introductions of their specific implementation respectively given above, those skilled in the art can understand the flexible and changeable implementation modes of the present invention on the basis of the above disclosure. Among them, it should be pointed out that, in order to facilitate the implementation and improve the implementation efficiency, no matter for the hostapd or wpa_supplicant process, it is recommended to use the configuration file to preset the network configuration information in its .conf file for pre-configuration, and then start the corresponding maintenance process.
如前一步骤所述,用户既可以通过单个控制按键来希望同时开启热点模式和站点模式,也可以通过两个与两种模式相对应的按键来开启,实质上提供了多种操作变化例。对应这些变化,以下进一步示例说明。As mentioned in the previous step, the user can either turn on the hotspot mode and the station mode at the same time through a single control button, or turn it on through two buttons corresponding to the two modes, which essentially provides a variety of operation variations. Corresponding to these changes, further examples are given below.
设用户界面提供单个控制按键,用户通过该单个控制按键而触发其用户指令,此处便可以先开启hostapd进程,即热点维护进程。由于hostapd进程的开启会导致自动关闭wpa_supplicant进程,因此,本发明的应用程序进程需要参照上述的实现方式,在热点维护进程开启之后,再自行启动该站点维护进程,由此便可实现两个维护进程的并存。反之,也可以先行启动站点维护进程,在其完成开启之后,再行参照上述示例开启热点维护进程。也就是说,对应于单个控制按键引起的控制指令,可以以不同的实施方式灵活安排所述热点维护进程和站点维护进程的启动顺序。It is assumed that the user interface provides a single control button, and the user triggers his user command through the single control button. Here, the hostapd process, that is, the hotspot maintenance process, can be started first. Since the opening of the hostapd process will cause the wpa_supplicant process to be automatically closed, the application process of the present invention needs to refer to the above-mentioned implementation method. After the hotspot maintenance process is opened, the site maintenance process is started by itself, thus two maintenance processes can be realized. Coexistence of processes. Conversely, it is also possible to start the site maintenance process first, and then start the hotspot maintenance process referring to the above example after it is started. That is to say, corresponding to the control instruction caused by a single control key, the starting sequence of the hotspot maintenance process and the site maintenance process can be flexibly arranged in different implementation manners.
而对应用户界面提供不同的控制按键,分别表征开户不同的维护进程的实例而言,则可按用户点击不同控制按键的顺序而按序开启相应的维护进程,此举并不影响本发明的实施。For the example in which different control buttons are provided on the corresponding user interface to respectively represent different maintenance processes of account opening, the corresponding maintenance processes can be opened in order according to the order in which the user clicks on different control buttons, which does not affect the implementation of the present invention. .
不管如何实现人机交互,热点维护进程与站点维护进程的控制的重点在于两者相继开启,并且需要本发明所称的应用程序的进程加以作用。No matter how the human-computer interaction is realized, the focus of the control of the hotspot maintenance process and the site maintenance process is that the two are opened successively, and the process of the application program called in the present invention is required to play a role.
在优选的方案中,推荐优先让站点维护进程先于热点维护进程开启,在确保本智能终端可以连接外网的情况下,向其他智能终端提供接入功能,可以免除一些无用功,更为节能。In the preferred solution, it is recommended to allow the site maintenance process to start before the hotspot maintenance process. When ensuring that the smart terminal can connect to the external network, providing access functions to other smart terminals can avoid some useless work and save energy.
理论上,将站点维护进程与热点维护进程相继启动后,便可以实现两个维护进程的共存,然后,因系统可能潜在的一些风险的影响,可能会导致两个维护进程中任意之一被关闭,因而尚需借助后续手段加以强化。Theoretically, after starting the site maintenance process and the hotspot maintenance process one after another, the coexistence of the two maintenance processes can be realized, and then, due to the influence of some potential risks of the system, any one of the two maintenance processes may be shut down , so it needs to be strengthened by follow-up measures.
步骤S13,维持所述热点维护进程与所述站点维护进程得以共存式工作。Step S13, maintaining the hotspot maintenance process and the site maintenance process to work in coexistence.
这里所称的共存式工作,是指热点维护进程与站点维护进程可能相继开启,但未必同一时刻开启。只要两者均存在于内存中运行,两者在内存中运行周期有时间上的并发,使得在一个时间周期内,智能终端可以被接入也可以接入其他接入点,即可视为共存式工作。The co-existing work referred to here means that the hotspot maintenance process and the site maintenance process may be started successively, but not necessarily at the same time. As long as both exist and run in the memory, the running cycles of the two in the memory are concurrent in time, so that within a time period, the smart terminal can be connected to or connected to other access points, which can be regarded as coexistence style work.
当热点维护进程被开启之后,由于其将关闭站点维护进程,因而,本发明的应用程序进程适宜按照预定的预定时长,在预定时长结束之后,再行启动站点维护进程,以免的前一站点维护进程冲突,造成启动不成功。同理,如果先启动站点维护进程,为避免其可能关闭热点维护进程,也可适用此法。After the hotspot maintenance process is opened, because it will close the site maintenance process, therefore, the application program process of the present invention is suitable according to the predetermined predetermined time length, and after the predetermined time length ends, start the site maintenance process again, so as to avoid previous site maintenance. Process conflicts, resulting in unsuccessful startup. In the same way, if the site maintenance process is started first, in order to avoid possible shutdown of the hotspot maintenance process, this method can also be applied.
为了确保所述热点维护进程与所述站点维护进程在用户使用过程中的正常或者相对正常使用,本发明的应用程序进程在后台还可以定期扫描两个维护进程中的任意一个是否被关闭,当其中一个被关闭时,便重新按照前述方式控制被关闭的进程开启,从而确保按照用户期望,使两个维护进程都能够共存式地工作。In order to ensure the normal or relatively normal use of the hotspot maintenance process and the site maintenance process during user use, the application program process of the present invention can also periodically scan whether any one of the two maintenance processes is closed in the background. When one of them is closed, the closed process is controlled to start again according to the aforementioned method, so as to ensure that the two maintenance processes can work in coexistence according to user expectations.
可见,维持热点维护进程和站点维护进程在内存中运行,是确保网络稳定性的加强手段。It can be seen that keeping the hotspot maintenance process and the site maintenance process running in the memory is an enhanced means to ensure network stability.
步骤S14,向用户界面输出表征该智能终端处于热点模式和站点模式共存的双模状态的结果信息。Step S14, output to the user interface result information indicating that the smart terminal is in a dual-mode state where the hotspot mode and the station mode coexist.
在完成上述的步骤S12或S13的控制手段,使得两个维护进程共存式工作之后,本发明的应用程序进程便可以向用户界面输出一些结果信息,以告知用户该智能终端当前已经处于热点模式和站点模式共存的双模状态。至于所述的结果信息的表达形式,既可以是通过系统消息显示到通知栏中,也可以在桌面上弹窗显示,更优的方式可以是调用一个预设的第三方图标,用于表征该智能终端处于热点模式和站点模式共存的双模状态,将该第三方图标显示到用户界面的系统状态栏中,使得用户更易于获知所述的结果信息。After completing the above-mentioned control means of step S12 or S13, so that the two maintenance processes coexist, the application program process of the present invention can output some result information to the user interface to inform the user that the smart terminal is currently in the hotspot mode and A dual-mode state where site modes coexist. As for the expression form of the result information, it can be displayed in the notification bar through a system message, or displayed in a pop-up window on the desktop. A better way can be to call a preset third-party icon to represent the The smart terminal is in a dual-mode state where the hotspot mode and the site mode coexist, and the third-party icon is displayed in the system status bar of the user interface, making it easier for the user to obtain the result information.
需要指出的是,在所述步骤S12运行之后,理论上即可执行步骤S14实现图标显示,然后持续执行步骤S13,因而,本领域技术人员应当理解,不应以本发明的文字排列顺序来理解本发明各步骤的执行顺序,而应以本发明的所揭示的实质原理来加以理解。It should be pointed out that after the operation of step S12, theoretically, step S14 can be executed to realize icon display, and then step S13 can be continuously executed. The execution order of each step of the present invention should be understood based on the disclosed substantive principles of the present invention.
综上所述,本发明使得作为WiFi P2P协议所规范的服务端的Android智能终端具备了强制其客户端配置静态路由,从而与服务端构建成内网,并由服务端为客户端提供外网接入的能力,大大扩展了智能终端的组网能力。特别地,当在服务端实现其热点模式和站点模式共存的功能时,更可仅依赖于WiFi P2P技术而网络扩容功能,大大提升了对智能终端的网络基础构件的利用效率。To sum up, the present invention enables the Android smart terminal as the server specified by the WiFi P2P protocol to force its client to configure static routing, thereby building an intranet with the server, and the server provides the client with an external network connection. The ability to enter has greatly expanded the networking capabilities of smart terminals. In particular, when the hotspot mode and site mode coexistence function is realized on the server side, the network expansion function can only rely on WiFi P2P technology, which greatly improves the utilization efficiency of the network infrastructure components of smart terminals.
本技术领域技术人员可以理解,本发明包括涉及用于执行本申请中所述操作中的一项或多项的设备。这些设备可以为所需的目的而专门设计和制造,或者也可以包括通用计算机中的已知设备。这些设备具有存储在其内的计算机程序,这些计算机程序选择性地激活或重构。这样的计算机程序可以被存储在设备(例如,计算机)可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何类型的介质中,所述计算机可读介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable ProgrammableRead-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically ErasableProgrammable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,可读介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。Those skilled in the art will appreciate that the present invention includes devices related to performing one or more of the operations described in this application. These devices may be specially designed and fabricated for the required purposes, or they may include known devices found in general purpose computers. These devices have computer programs stored therein that are selectively activated or reconfigured. Such a computer program can be stored on a device (e.g., computer) readable medium, including but not limited to any type of medium suitable for storing electronic instructions and respectively coupled to a bus. Types of disks (including floppy disks, hard disks, CDs, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory, read-only memory), RAM (Random Access Memory, random memory), EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, a readable medium includes any medium that stores or transmits information in a form readable by a device (eg, a computer).
本技术领域技术人员可以理解,可以用计算机程序指令来实现这些结构图和/或框图和/或流图中的每个框以及这些结构图和/或框图和/或流图中的框的组合。本技术领域技术人员可以理解,可以将这些计算机程序指令提供给通用计算机、专业计算机或其他可编程数据处理方法的处理器来实现,从而通过计算机或其他可编程数据处理方法的处理器来执行本发明公开的结构图和/或框图和/或流图的框或多个框中指定的方案。Those skilled in the art will understand that computer program instructions can be used to implement each block in these structural diagrams and/or block diagrams and/or flow diagrams and combinations of blocks in these structural diagrams and/or block diagrams and/or flow diagrams . Those skilled in the art can understand that these computer program instructions can be provided to general-purpose computers, professional computers, or processors of other programmable data processing methods for implementation, so that the computer or processors of other programmable data processing methods can execute the present invention. A scheme specified in a block or blocks of a structure diagram and/or a block diagram and/or a flow diagram of the invention disclosure.
本技术领域技术人员可以理解,本发明中已经讨论过的各种操作、方法、流程中的步骤、措施、方案可以被交替、更改、组合或删除。进一步地,具有本发明中已经讨论过的各种操作、方法、流程中的其他步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。进一步地,现有技术中的具有与本发明中公开的各种操作、方法、流程中的步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。Those skilled in the art can understand that the various operations, methods, and steps, measures, and solutions in the processes discussed in the present invention can be replaced, changed, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes that have been discussed in the present invention may also be replaced, changed, rearranged, decomposed, combined, or deleted. Further, steps, measures, and schemes in the prior art that have operations, methods, and processes disclosed in the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above descriptions are only part of the embodiments of the present invention. It should be pointed out that those skilled in the art can make some improvements and modifications without departing from the principles of the present invention. It should be regarded as the protection scope of the present invention.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610141866.3A CN105827440B (en) | 2016-03-11 | 2016-03-11 | Intelligent terminal and routing configuration method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610141866.3A CN105827440B (en) | 2016-03-11 | 2016-03-11 | Intelligent terminal and routing configuration method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105827440A CN105827440A (en) | 2016-08-03 |
CN105827440B true CN105827440B (en) | 2019-12-13 |
Family
ID=56987282
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610141866.3A Expired - Fee Related CN105827440B (en) | 2016-03-11 | 2016-03-11 | Intelligent terminal and routing configuration method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105827440B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106781122A (en) * | 2016-11-29 | 2017-05-31 | 山东浪潮商用系统有限公司 | A kind of tax control Method of printing and all-in-one with routing function |
CN111867143A (en) * | 2020-04-27 | 2020-10-30 | 广州朗国电子科技有限公司 | Communication method and device among multiple devices in education whiteboard and education whiteboard |
CN113727410B (en) * | 2021-10-08 | 2022-01-28 | 亿次网联(杭州)科技有限公司 | Method and device for directly connecting mobile terminal with home cloud server |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101674221A (en) * | 2008-09-09 | 2010-03-17 | 中国移动通信集团公司 | Static routing generation method, method and device for implementing terminal routing |
JP5468595B2 (en) * | 2011-11-22 | 2014-04-09 | レノボ・シンガポール・プライベート・リミテッド | Method of accessing wireless network by shared communication and wireless terminal device |
KR101975992B1 (en) * | 2012-09-26 | 2019-05-08 | 에이치피프린팅코리아 유한회사 | Image forming apparatus supporting Wi-Fi Direct and method of controlling internet access thereof |
CN103716393A (en) * | 2013-12-27 | 2014-04-09 | 深圳天珑无线科技有限公司 | Resource sharing method and device and terminal used for LAN communication |
CN104902532A (en) * | 2014-03-06 | 2015-09-09 | 张永杰 | A method and system for automatically accessing wireless local area network |
-
2016
- 2016-03-11 CN CN201610141866.3A patent/CN105827440B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN105827440A (en) | 2016-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105721220B (en) | Intelligent terminal and its underlying network configuration method | |
CN105704226A (en) | Intelligent terminal and network configuration method thereof | |
CN102137395B (en) | Method, device and system for configuring access device | |
CN106060970A (en) | Intelligent terminal and network configuration method thereof | |
CA2605682C (en) | Wireless device discovery and configuration | |
EP2630756B1 (en) | Method and apparatus for sharing internet connection based on automatic configuration of network interface | |
WO2022143153A1 (en) | Wi-fi configuration method and electronic device | |
US8537716B2 (en) | Method and system for synchronizing access points in a wireless network | |
CN105847321A (en) | Intelligent terminal and system permission-free network configuration method thereof | |
CN101138204A (en) | UPNP VPN Gateway Configuration Service | |
CN103841626A (en) | Internet of Things wireless terminal, configuration method thereof and mobile terminal | |
CN112566113B (en) | Key generation and terminal network distribution method, device and equipment | |
CN102083023B (en) | Method, system and equipment for restarting remote control equipment | |
EP2234438B1 (en) | Wireless personal area network accessing method | |
US10257036B2 (en) | Secure plug and play configuration of wireless distribution system (WDS) Wi-Fi range extenders | |
CN103313230A (en) | Mesh points and configuration and issuing method thereof in WLN (Wireless Local Area Network) mesh network | |
CN105827440B (en) | Intelligent terminal and routing configuration method thereof | |
JP2023156495A (en) | Access point devices and programs | |
CN112235794A (en) | WAPI module with encryption chip and transmission method | |
WO2007045134A1 (en) | A communication system and a communication method | |
JP6269025B2 (en) | Wireless connection apparatus, method for copying setting information related to wireless communication, and network system | |
WO2013174312A2 (en) | Control method and device, and mobile terminal | |
US20130171982A1 (en) | Method and apparatus for remote secure access to wireless network | |
WO2010097003A1 (en) | Method for realizing integration of wapi and capwap by split mac mode | |
WO2015168920A1 (en) | Method for managing base station and base station |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C41 | Transfer of patent application or patent right or utility model | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20160928 Address after: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park) Applicant after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park) Applicant before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Applicant before: QIKU INTERNET NETWORK SCIENTIFIC (SHENZHEN) Co.,Ltd. |
|
TA01 | Transfer of patent application right |
Effective date of registration: 20170720 Address after: 100102, 18 floor, building 2, Wangjing street, Beijing, Chaoyang District, 1801 Applicant after: BEIJING ANYUNSHIJI TECHNOLOGY Co.,Ltd. Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park) Applicant before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20191213 |
|
CF01 | Termination of patent right due to non-payment of annual fee |