CN113727410A - Method and device for directly connecting mobile terminal with home cloud server - Google Patents

Method and device for directly connecting mobile terminal with home cloud server Download PDF

Info

Publication number
CN113727410A
CN113727410A CN202111284147.4A CN202111284147A CN113727410A CN 113727410 A CN113727410 A CN 113727410A CN 202111284147 A CN202111284147 A CN 202111284147A CN 113727410 A CN113727410 A CN 113727410A
Authority
CN
China
Prior art keywords
mobile terminal
cloud server
home cloud
dhcp
response message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111284147.4A
Other languages
Chinese (zh)
Other versions
CN113727410B (en
Inventor
祝永见
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yici Netlink Hangzhou Technology Co ltd
Original Assignee
Yici Netlink Hangzhou Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yici Netlink Hangzhou Technology Co ltd filed Critical Yici Netlink Hangzhou Technology Co ltd
Publication of CN113727410A publication Critical patent/CN113727410A/en
Application granted granted Critical
Publication of CN113727410B publication Critical patent/CN113727410B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to a method and a device for directly connecting a mobile terminal with a home cloud server, the home cloud server, a DHCP server, the mobile terminal and a storage medium, wherein the method comprises the following steps: when the home cloud server starts the DHCP service after entering the Wi-Fi Direct mode, WiFi Direct connection is established with the mobile terminal; receiving a network configuration request sent by the mobile terminal, generating a DHCP response message according to the network configuration request, and allocating an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a route filling prohibition option. According to the method, the home cloud server works in the standard Wi-Fi Direct mode, when the IP address is distributed to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can also normally access the Internet while being directly connected with the home cloud server.

Description

Method and device for directly connecting mobile terminal with home cloud server
Technical Field
The invention relates to the technical field of internet of things, in particular to a method and a device for directly connecting a mobile terminal with a home cloud server, the home cloud server, a DHCP server, the mobile terminal and a computer readable storage medium.
Background
In many scenarios, a mobile phone is required to be directly connected to a device, and the current direct connection mode includes: (1) the mobile phone is connected with the equipment through the Bluetooth; (2) the mobile phone is connected with the equipment through Wi-Fi Direct (Wi-Fi Direct); (3) the mobile phone is connected with the equipment through AirForp (air delivery); (4) the device serves as an AP (Access Point) terminal, allowing the mobile phone to Access the hotspot.
The above-described method has the following problems: the Bluetooth connection mode needs to increase a Bluetooth hardware module, so that the hardware cost is increased, and the transmission speed and distance of Bluetooth are limited; the mode of Wi-Fi Direct connection can only be compatible with an Android system, but cannot be compatible with an ios system; only an ios system is supported in an AirForp connection mode, the Android system is incompatible, and the hardware cost of equipment is increased by adopting a Bluetooth + Wi-Fi mode; although the Android system and the ios system can be compatible at the same time by using the device as the AP end, the Internet cannot be accessed after the mobile phone is connected with the device.
Disclosure of Invention
Technical problem to be solved
In view of the above disadvantages and shortcomings of the prior art, the present invention provides a method and an apparatus for directly connecting a mobile terminal to a home cloud server, the home cloud server, a DHCP server, the mobile terminal, and a storage medium, which solve the technical problem that the mobile terminal cannot continue to access the internet when the home cloud server is compatible with an ios system and an Android system for connection.
(II) technical scheme
In order to achieve the purpose, the invention adopts the main technical scheme that:
in a first aspect, an embodiment of the present invention provides a method for a mobile terminal to directly connect to a home cloud server, including: when a home cloud server starts a DHCP (Dynamic Host Configuration Protocol) service after entering a Wi-Fi Direct mode, WiFi Direct connection is established with a mobile terminal; receiving a network configuration request sent by the mobile terminal, generating a DHCP response message according to the network configuration request, and allocating an IP (Internet Protocol) address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a route filling prohibition option.
According to the method for directly connecting the mobile terminal with the home cloud server, WiFi Direct connection is established with the mobile terminal when the home cloud server starts a DHCP service after entering a Wi-Fi Direct mode; receiving a network configuration request sent by the mobile terminal, generating a DHCP response message according to the network configuration request, and allocating an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a route filling prohibition option. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
In a second aspect, an embodiment of the present invention provides a method for a mobile terminal to directly connect to a home cloud server, including: when the home cloud server enters a Wi-Fi Direct mode and starts a DHCP service, WiFi Direct connection with the home cloud server is established; sending a network configuration request to the home cloud server, wherein the network configuration request is used for indicating that the home cloud server forbids to modify the default route of the mobile terminal when generating a DHCP response message; and receiving a DHCP response message sent by the home cloud server, and reserving an original default route when IP address allocation is carried out according to the DHCP response message.
According to the method for directly connecting the mobile terminal with the home cloud server, WiFi Direct connection with the home cloud server is established when the home cloud server enters a Wi-Fi Direct mode and starts a DHCP service; sending a network configuration request to the home cloud server, wherein the network configuration request is used for indicating that the home cloud server forbids to modify the default route of the mobile terminal when generating a DHCP response message; and receiving a DHCP response message sent by the home cloud server, and reserving an original default route when IP address allocation is carried out according to the DHCP response message. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
Optionally, the DHCP response message includes an IP address and the DHCP service prohibits populating the routing option when assigning the IP address.
Optionally, when the operating system of the mobile terminal is an Android system, the mobile terminal is connected to the home cloud server in a Wi-Fi Direct manner through the WifiP2 pManager.
Optionally, when the operating system of the mobile terminal is an ios system, the mobile terminal is connected to the home cloud server in a station manner.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a program for a mobile terminal to directly connect to a home cloud server is stored, where the program for the mobile terminal to directly connect to the home cloud server is executed by a processor, and the method for the mobile terminal to directly connect to the home cloud server in the first aspect or the method for the mobile terminal to directly connect to the home cloud server in the second aspect is implemented.
According to the computer-readable storage medium provided by the embodiment of the invention, by the method for directly connecting the mobile terminal with the home cloud server, the mobile terminal does not need to be changed at the bottom layer, and the internet can be normally accessed while the mobile terminal is directly connected with the home cloud server.
In a fourth aspect, an embodiment of the present invention provides a home cloud server, including a memory, a processor, and a program of a mobile terminal directly connected to the home cloud server, where the program is stored in the memory and is executable on the processor, and when the processor executes the program of the mobile terminal directly connected to the home cloud server, the method for directly connecting the mobile terminal to the home cloud server according to the first aspect is implemented.
According to the home cloud server provided by the embodiment of the invention, by the method for directly connecting the mobile terminal with the home cloud server, the mobile terminal does not need to be changed at the bottom layer, and the home cloud server can be directly connected and can also normally access the Internet.
In a fifth aspect, an embodiment of the present invention provides a mobile terminal, which includes a memory, a processor, and a program that is stored in the memory and is run on the processor, and when the processor executes the program that is executed by the mobile terminal and is directly connected to a home cloud server, the method for directly connecting the mobile terminal and the home cloud server according to the second aspect is implemented.
According to the mobile terminal provided by the embodiment of the invention, by the method for directly connecting the mobile terminal with the home cloud server, the bottom layer is not required to be changed, and the internet can be normally accessed while the home cloud server is directly connected.
In a sixth aspect, an embodiment of the present invention provides a device for a mobile terminal to directly connect to a home cloud server, where the device is applied to the home cloud server, and includes: the starting module is used for starting the DHCP service after the home cloud server enters the Wi-Fi Direct mode; the first establishing module is used for establishing WiFi direct connection between the home cloud server and the mobile terminal; the first receiving module is used for receiving a network configuration request sent by the mobile terminal; and the allocation module is used for generating a DHCP response message according to the network configuration request and allocating an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a filling prohibition routing option.
The device for the mobile terminal to be directly connected with the home cloud server is applied to the home cloud server, and after the home cloud server enters a Wi-Fi Direct mode, a starting module starts a DHCP service; the first establishing module establishes WiFi direct connection between the home cloud server and the mobile terminal; a first receiving module receives a network configuration request sent by a mobile terminal; and the allocation module generates a DHCP response message according to the network configuration request and allocates an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a filling prohibition routing option. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
In a seventh aspect, an embodiment of the present invention provides an apparatus for a mobile terminal to directly connect to a home cloud server, where the apparatus is applied to the mobile terminal, and the apparatus includes: the second establishing module is used for establishing WiFi Direct connection between the mobile terminal and the home cloud server when the home cloud server enters a Wi-Fi Direct mode and starts a DHCP service; the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a network configuration request to the home cloud server, and the network configuration request is used for indicating that the default route of the mobile terminal is forbidden to be modified when the home cloud server generates a DHCP response message; the second receiving module is used for receiving a DHCP response message sent by the home cloud server; and the connection module is used for reserving the original default route when IP address allocation is carried out according to the DHCP response message.
The device for the mobile terminal to be directly connected with the family cloud server is applied to the mobile terminal, and when the family cloud server enters a Wi-Fi Direct mode and starts a DHCP service, a second establishing module establishes WiFi Direct connection between the mobile terminal and the family cloud server; the sending module sends a network configuration request to the home cloud server, wherein the network configuration request is used for indicating that the home cloud server forbids to modify the default route of the mobile terminal when generating a DHCP response message; the second receiving module receives a DHCP response message sent by the home cloud server; and the connection module reserves the original default route when the IP address is allocated according to the DHCP response message. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
(III) advantageous effects
The invention has the beneficial effects that: according to the method and the device for directly connecting the mobile terminal with the home cloud server, the DHCP server, the mobile terminal and the storage medium, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of a mobile terminal system is reserved, the mobile terminal does not need to be changed at the bottom layer, and the internet can be normally accessed while the home cloud server is directly connected.
Drawings
Fig. 1 is a flowchart of a method for a mobile terminal to directly connect to a home cloud server according to an embodiment of a first aspect of the present invention;
fig. 2 is a schematic diagram illustrating a method for directly connecting a mobile terminal to a home cloud server according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for directly connecting a mobile terminal to a home cloud server according to a second aspect of the present invention;
fig. 4 is a block schematic diagram of a home cloud server according to one embodiment of the invention;
FIG. 5 is a block diagram of a mobile terminal according to one embodiment of the present invention;
fig. 6 is a block diagram illustrating an apparatus in which a mobile terminal is directly connected to a home cloud server according to an embodiment of the first aspect of the present invention;
fig. 7 is a block diagram illustrating an apparatus for connecting a mobile terminal to a home cloud server directly according to a second aspect of the present invention.
Detailed Description
For the purpose of better explaining the present invention and to facilitate understanding, the present invention will be described in detail by way of specific embodiments with reference to the accompanying drawings.
According to the method and the device for directly connecting the mobile terminal with the home cloud server, the DHCP server, the mobile terminal and the storage medium, WiFi Direct connection is established with the mobile terminal when the DHCP service is started after the home cloud server enters a Wi-Fi Direct mode; receiving a network configuration request sent by the mobile terminal, generating a DHCP response message according to the network configuration request, and allocating an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a route filling prohibition option. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 is a flowchart of a method for a mobile terminal to directly connect to a home cloud server according to an embodiment of a first aspect of the present invention, where as shown in fig. 1, the method for the mobile terminal to directly connect to the home cloud server includes the following steps:
s101, when the home cloud server starts the DHCP service after entering a Wi-Fi Direct mode, WiFi Direct connection is established with the mobile terminal.
S102, receiving a network configuration request sent by the mobile terminal, generating a DHCP response message according to the network configuration request, and allocating an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a route filling prohibition option.
It should be noted that Wi-Fi Direct is a standard that allows devices in a wireless network to be connected to each other without passing through a wireless router, and similar to bluetooth technology, the standard allows wireless devices to be connected to each other in a Peer-to-Peer (Peer-to-Peer) manner, and transmission speed and transmission distance are greatly improved compared to bluetooth. The Wi-Fi Direct mode is as follows: compatible devices provide direct wireless connectivity capabilities without having to use the access point of a wireless network router. The Wi-Fi Direct mode has the advantages that the network of the mobile terminal does not need to be changed, unnecessary data traffic is not brought, and the access right does not need to be opened to other equipment on the local network.
Specifically, after the home cloud server is powered on, the home cloud server enters a Wi-Fi Direct mode, after the home cloud server enters the Wi-Fi Direct mode, DHCP service is started, and when the mobile terminal and the home cloud server J establish WIFI Direct connection, the mobile terminal initiates a DHCP request to request network configuration from the home cloud server. The method comprises the steps that a DHCP service of the home cloud service receives a network configuration request and generates a DHCP response message according to the network configuration request, wherein the DHCP response message comprises an IP address and a route filling prohibition option, namely, the DHCP does not fill the route option of the home cloud server when the IP address is allocated, and therefore the DHCP response message does not contain a route IP. The IP address allocated by the DHCP is a network node for the mobile terminal to access the home cloud server, namely, the mobile terminal can access the home cloud server according to the IP address.
The process that the mobile terminal acquires the IP address from the home cloud server is called as a lease process of DHCP, and when the mobile terminal sends a service request to a DHCP service for the first time, the method comprises the following steps: the mobile terminal sends a request IP address to the DHCP service (the home cloud server sends a DHCP Discover broadcast packet); DHCP service response (DHCP service sends DHCP Offer broadcast packet); the mobile terminal selects a gateway address (the mobile terminal sends a DHCP Request broadcast packet); the DHCP service determines the lease (the DHCP service sends a DHCP ACK broadcast packet). Specifically, after the mobile terminal is powered on, at this time, the mobile terminal does not have an IP address, so a legal IP address needs to be obtained through the DHCP service, at this time, the mobile terminal sends DHCP Discover discovery information in a broadcast manner to find the DHCP service, where the broadcast information includes a MAC address and a computer name of the mobile terminal, so that the DHCP service determines which mobile terminal sent the service request. When the DHCP service receives the information of the IP address requested by the mobile terminal, the legal IP address in the DHCP service is searched, and the legal IP address is marked and added into the DHCP Offer message, then the DHCP service broadcasts a DHCP Offer message, and the message comprises: the MAC address of the mobile terminal, the legal gateway address provided by the DHCP service, the subnet mask, the default gateway, the lease time, and the IP address of the DHCP service.
Next, the mobile terminal extracts an IP address from the first DHCP Offer message received and broadcasts a DHCP Request message to all DHCP services indicating that it receives the provided contents, the message including a service identifier (home cloud server IP address) of a server providing an IP configuration for the mobile terminal, the DHCP service checks the home cloud server identifier field to determine whether the provided IP address is accepted, and if the DHCP Offer is rejected, the DHCP service cancels and retains the IP address to provide a Request for a next IP address lease. After receiving the DHCP Request message, the DHCP service broadcasts a success confirmation to the mobile terminal in the form of a DHCP ACK message, the message contains effective lease of the IP address and other configurable information, and when the mobile terminal receives the DHCP ACK message, the IP gateway address is configured to complete the initialization of TCP/IP.
When the mobile terminal logs in again each time, the mobile terminal does not need to send DHCP Discover information, but directly sends DHCP Request information containing the IP address allocated last time, and after the DHCP service receives the information, the mobile terminal can send response information to enable the mobile terminal to continue using the original gateway address and answer a DHCP ACK confirmation message.
That is to say, when the home cloud server starts the DHCP service after entering the Wi-Fi Direct mode, after the WIFI Direct connection is established between the mobile terminal and the home cloud server, the mobile terminal sends a network configuration request to the home cloud server, and the DHCP service generates a response message according to the network configuration request, prohibits filling of routing options, that is, does not allocate a routing address (gateway IP address), and only requests other configuration information (lease term, gateway, DNS server, etc.). For example, by modifying the DHCP service, the Rout (3) option is not filled in the DHCP service message sent by the DHCP service. For example, the format of the DHCP message sent by the DHCP service is roughly as follows:
Bootstrap Protocol (ACK)
Message type: Boot Reply (2)
Hardware type: Ethernet (0x01)
Hardware address length: 6
Hops: 0
……
Magic cookie: DHCP
Option: (53) DHCP Message Type (ACK)
Option: (54) DHCP Server Identifier
Option: (51) IP Address Lease Time
Option: (1) Subnet Mask
option (3) Router = > avoid filling the Option (Option) by modifying DHCP service configuration or source code
Option: (6) Domain Name Server
Option: (255) End
Padding: 00000000000000000000000000000000000000000000
More specifically, when the DHCP service receives a network configuration request of the mobile terminal, a DHCP response message is generated, and the response message does not include a routing IP address, so that when the home cloud server responds to a direct connection request of the mobile terminal, and the home cloud server allocates an IP address (node IP address) to the mobile terminal, a default route is not issued to the mobile terminal (the routing address generated by the DHCP service, and since there is no routing address in the service message, the home cloud server does not issue a routing address to the mobile terminal, so that the mobile terminal retains its own routing address). Therefore, the mobile terminal can access the home cloud server through the IP address and can access the external network through the routing address of the mobile terminal, such as WeChat, QQ, a browser and the like, so that the mobile terminal can access the home cloud server and the external network.
Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to change the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
It should be noted that the home cloud server is a private network, and not a public network, so when the mobile terminal sends the direct connection request, a node IP address is sent, which indicates that the current mobile terminal is in the private network of the home cloud server, and data transmission and interaction can be realized in the private network without leakage. For example, a family member connected to a family cloud server may share a family image or the like within the private network.
As a specific example, as shown in fig. 2, when a home cloud server enters a Wi-Fi Direct mode and starts a DHCP service, if a mobile terminal accesses the home cloud server, first determining identification information of the home cloud server, for example, SN (Serial Number) information, after determining the identification information of the home cloud server, the mobile terminal establishes WIFI Direct connection with the home cloud server, the mobile terminal initiates a DHCP request to send a network configuration request to the home cloud server, and the DHCP service of the home cloud server generates a DHCP response packet according to the network configuration request and sends the DHCP response packet to the mobile terminal, where the response packet includes an IP address but does not include a default routing address. And the mobile terminal receives the node IP address distributed by the home cloud server, and when the mobile terminal is connected with the home cloud server according to the node IP address, the mobile terminal reserves the original default routing address of the system as the default routing address does not exist in the service message.
It should be noted that the manner in which the mobile terminal obtains the identifier of the home cloud server differs according to different usage scenarios. For example, when the mobile terminal scans and binds a two-dimensional code of a home cloud server, the two-dimensional code includes an identifier of the home cloud server, and the identifier of the corresponding home cloud server can be obtained by continuously analyzing the two-dimensional code. For another example, in the use process after the mobile terminal binds the home cloud server, an APP (Application) corresponding to the home cloud server on the mobile terminal may be information on the bound home cloud server.
In an embodiment of the present invention, an operating system of a current mobile terminal mainly includes an Android system and an ios system. When the operating system of the mobile terminal is an Android system, the mobile terminal is connected to the home cloud server in a Wi-Fi Direct mode through the WifiP2 pManager. When the operating system of the mobile terminal is an ios system, the mobile terminal is connected to the home cloud server in a station mode.
Specifically, the Wi-Fi Direct realized by the Android system is compatible with a standard protocol, so that the Wi-Fi Direct can be directly connected to a home cloud server through a WifiP2pManager in a Wi-Fi Direct mode, and an active connection mode or a passive connection mode can be adopted. The active connection mode is that the mobile terminal actively sends a Probe request frame on each channel to request the home cloud server to respond, so that whether the home cloud server exists or not is known, and when the home cloud server receives the Probe request, the home cloud server responds with a Probe response. The passive connection mode is that the mobile terminal is in a receiving state, receives beacon frames sent by the home server, switches among different channels, monitors the beacon frames in the air, the beacon comprises various parameters required by adding a certain home cloud server, and the beacon is displayed in a list to be connected after being received by the mobile terminal.
In a list to be connected, a user outputs a password on the mobile terminal for identity authentication, the mobile terminal sends an authentication request, the request comprises an algorithm number and a frame sequence number 1, after a home cloud server receives a first frame, the home cloud server processes and replies, and the reply frame comprises an algorithm number 2, a state code 0 and a challenge instruction. And the mobile terminal replies a third frame to a second frame carrying the challenge instruction, wherein the frame comprises the algorithm number, the sequence number is 3 and the challenge instruction, and except for the header, the mobile terminal performs WEP encryption processing on the information and then sends the information. After the home cloud server receives the third frame, a decryption process is performed, integrity is checked, the challenge password is solved, and the integrity check is passed. After the verification, the mobile terminal is proved to have set the WEP key required by joining the network, and then the fourth frame is replied, which comprises the algorithm number, the sequence number of 4 and the status code of 0. After the identity authentication is completed, the terminal equipment can be connected with the family cloud server to perform data interaction and other operations.
When the mobile terminal is an ios system, the wireless access is not accepted due to the characteristics of the ios system, but the mobile terminal can be connected to the home cloud server, and at this time, the mobile terminal can be connected to the home cloud server in a station mode. For example, a hot spot of the mobile terminal is opened, a home cloud server which can be connected around is scanned, and a direct connection request is sent according to an identifier of the home cloud server to be connected. The home cloud server enters a Wi-Fi Direct mode after receiving the Direct connection request, the DHCP service generates a DHCP service message according to the Direct connection request, and when an IP address is allocated to the mobile terminal, the home cloud server prohibits issuing of a default route to the mobile terminal.
Therefore, the original default routing address of the mobile terminal can be reserved no matter the mobile terminal is an Android system or an ios system, and the mobile terminal can also normally access the Internet while being successfully connected with the home cloud server.
In summary, in the method for directly connecting the mobile terminal to the home cloud server according to the embodiment of the present invention, when the home cloud server starts the DHCP service after entering the Wi-Fi Direct mode, WiFi Direct connection is established with the mobile terminal; receiving a network configuration request sent by the mobile terminal, generating a DHCP response message according to the network configuration request, and allocating an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a route filling prohibition option. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
The embodiment of the second aspect of the invention also provides a method for directly connecting the mobile terminal with the home cloud server.
As shown in fig. 3, the method for the mobile terminal to directly connect to the home cloud server may include:
s301, when the home cloud server enters a Wi-Fi Direct mode and starts a DHCP service, WiFi Direct connection with the home cloud server is established.
And S302, sending a network configuration request to the home cloud server, wherein the network configuration request is used for indicating that the home cloud server forbids to modify the default route of the mobile terminal when generating the DHCP response message.
And S303, receiving a DHCP response message sent by the home cloud server, and reserving an original default route when IP address allocation is carried out according to the DHCP response message.
According to one embodiment of the invention, the DHCP response message includes the IP address and the DHCP service prohibits populating the routing option when assigning the IP address.
According to one embodiment of the invention, when the operating system of the mobile terminal is an Android system, the mobile terminal is connected to the home cloud server in a Wi-Fi Direct mode through a WifiP2 pManager.
According to one embodiment of the invention, when the operating system of the mobile terminal is an ios system, the mobile terminal is connected to the home cloud server in a station mode.
It should be noted that details that are not disclosed in the method for directly connecting a mobile terminal to a home cloud server according to the third aspect of the present invention refer to details disclosed in the method for directly connecting a mobile terminal to a home cloud server according to the first aspect of the present invention, and details are not repeated here.
In summary, the method for the mobile terminal to directly connect with the home cloud server provided by the embodiment of the invention establishes WiFi Direct connection with the home cloud server when the home cloud server enters the Wi-Fi Direct mode and starts the DHCP service; sending a network configuration request to the home cloud server, wherein the network configuration request is used for indicating that the home cloud server forbids to modify the default route of the mobile terminal when generating a DHCP response message; and receiving a DHCP response message sent by the home cloud server, and reserving an original default route when IP address allocation is carried out according to the DHCP response message. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
The embodiment of the third aspect of the invention also provides a computer-readable storage medium.
The computer-readable storage medium of the present invention stores thereon a program for connecting a mobile terminal to a home cloud server, where the program for connecting a mobile terminal to a home cloud server is executed by a processor, and implements the method for connecting a mobile terminal to a home cloud server according to the first aspect, or the method for connecting a mobile terminal to a home cloud server according to the second aspect.
According to the computer-readable storage medium provided by the embodiment of the invention, by the method for directly connecting the mobile terminal with the home cloud server, the mobile terminal does not need to be changed at the bottom layer, and the internet can be normally accessed while the mobile terminal is directly connected with the home cloud server.
The embodiment of the fourth aspect of the invention also provides a home cloud server.
As shown in fig. 4, the home cloud server 400 includes a memory 401, a processor 402, and a program of the mobile terminal directly connecting to the home cloud server, which is stored in the memory 401 and is executable on the processor 402, and when the processor executes the program of the mobile terminal directly connecting to the home cloud server, the method of the first aspect is implemented.
According to the home cloud server provided by the embodiment of the invention, by the method for directly connecting the mobile terminal with the home cloud server, the mobile terminal does not need to be changed at the bottom layer, and the home cloud server can be directly connected and can also normally access the Internet.
The embodiment of the fifth aspect of the invention also provides a mobile terminal.
As shown in fig. 5, the mobile terminal 500 includes a memory 501, a processor 502, and a program of the mobile terminal directly connecting to the home cloud server, which is stored in the memory 501 and is executable on the processor 502, and when the processor executes the program of the mobile terminal directly connecting to the home cloud server, the method of the second aspect is implemented.
According to the mobile terminal provided by the embodiment of the invention, by the method for directly connecting the mobile terminal with the home cloud server, the bottom layer is not required to be changed, and the internet can be normally accessed while the home cloud server is directly connected.
The embodiment of the sixth aspect of the invention also provides a device for directly connecting the mobile terminal with the home cloud server.
As shown in fig. 6, the apparatus 600 for the mobile terminal to directly connect to the home cloud server is applied to the home cloud server, and includes: an initiating module 601, a first establishing module 602, a first receiving module 603 and an assigning module 604.
The starting module 601 is configured to start a DHCP service after the home cloud server enters the Wi-Fi Direct mode. The first establishing module 602 is configured to establish a WiFi direct connection between a home cloud server and a mobile terminal. The first receiving module 603 is configured to receive a network configuration request sent by the mobile terminal. The allocating module 604 is configured to generate a DHCP response message according to the network configuration request, and allocate an IP address to the mobile terminal according to the DHCP response message, where the DHCP response message includes a route option to be forbidden to be filled.
According to one embodiment of the invention, the DHCP response message includes an IP address and the DHCP service prohibits populating the routing options when assigning the IP address.
It should be noted that, for details that are not disclosed in the apparatus for directly connecting a mobile terminal to a home cloud server according to the sixth aspect of the present invention, please refer to details disclosed in the method for directly connecting a mobile terminal to a home cloud server according to the first aspect of the present invention, and details are not repeated here.
In summary, the device for the mobile terminal to be directly connected to the home cloud server provided by the embodiment of the invention is applied to the home cloud server, and after the home cloud server enters the Wi-Fi Direct mode, the starting module starts the DHCP service; the first establishing module establishes WiFi direct connection between the home cloud server and the mobile terminal; a first receiving module receives a network configuration request sent by a mobile terminal; and the allocation module generates a DHCP response message according to the network configuration request and allocates an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a filling prohibition routing option. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
The seventh embodiment of the invention also provides a device for directly connecting the mobile terminal with the home cloud server.
As shown in fig. 7, the apparatus 700 for connecting a mobile terminal to a home cloud server is applied to a mobile terminal, and the apparatus includes: a second establishing module 701, a sending module 702, a second receiving module 703 and a connecting module 704.
The second establishing module 701 is configured to establish WiFi Direct connection between the mobile terminal and the home cloud server when the home cloud server enters a Wi-Fi Direct mode and starts a DHCP service. The sending module 702 is configured to send a network configuration request to the home cloud server, where the network configuration request is used to instruct the home cloud server to prohibit modification of a default route of the mobile terminal when generating the DHCP response packet. The second receiving module 703 is configured to receive a DHCP response message sent by the home cloud server. The connection module 704 is configured to reserve an original default route when performing IP address assignment according to the DHCP response packet.
According to one embodiment of the invention, the DHCP response message includes an IP address and the DHCP service prohibits populating the routing options when assigning the IP address.
According to one embodiment of the invention, when the operating system of the mobile terminal is an Android system, the mobile terminal is connected to the home cloud server in a Wi-Fi Direct mode through a WifiP2 pManager.
According to one embodiment of the invention, when the operating system of the mobile terminal is an ios system, the mobile terminal is connected to the home cloud server in a station mode.
It should be noted that, for details that are not disclosed in the apparatus for directly connecting a mobile terminal to a home cloud server according to the tenth aspect of the present invention, please refer to details disclosed in the method for directly connecting a mobile terminal to a home cloud server according to the first aspect of the present invention, and details are not repeated here.
To sum up, the device for the mobile terminal to be directly connected with the home cloud server, which is provided by the embodiment of the invention, is applied to the mobile terminal, and when the home cloud server enters a Wi-Fi Direct mode and starts a DHCP service, the second establishing module establishes WiFi Direct connection between the mobile terminal and the home cloud server; the sending module sends a network configuration request to the home cloud server, wherein the network configuration request is used for indicating that the home cloud server forbids to modify the default route of the mobile terminal when generating a DHCP response message; the second receiving module receives a DHCP response message sent by the home cloud server; and the connection module reserves the original default route when the IP address is allocated according to the DHCP response message. Therefore, the home cloud server works in a standard Wi-Fi Direct mode, when an IP address is allocated to the mobile terminal, the mobile terminal is not sent with the default route, the default route of the mobile terminal system is reserved, and therefore the mobile terminal does not need to be changed at the bottom layer, and the mobile terminal can be directly connected with the home cloud server and can also normally access the Internet.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium; either as communication within the two elements or as an interactive relationship of the two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, a first feature may be "on" or "under" a second feature, and the first and second features may be in direct contact, or the first and second features may be in indirect contact via an intermediate. Also, a first feature "on," "above," and "over" a second feature may be directly or obliquely above the second feature, or simply mean that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the second feature, or may simply mean that the first feature is at a lower level than the second feature.
In the description herein, the description of the terms "one embodiment," "some embodiments," "an embodiment," "an example," "a specific example" or "some examples" or the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it should be understood that the above embodiments are illustrative and not restrictive, and that those skilled in the art may make changes, modifications, substitutions and alterations to the above embodiments without departing from the scope of the present invention.

Claims (10)

1. A method for directly connecting a mobile terminal with a home cloud server is characterized by comprising the following steps:
when the home cloud server starts the DHCP service after entering a Wi-Fi Direct mode, WiFi Direct connection is established with the mobile terminal;
and receiving a network configuration request sent by the mobile terminal, generating a DHCP response message according to the network configuration request, and allocating an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a route filling prohibition option.
2. A method for directly connecting a mobile terminal with a home cloud server is characterized by comprising the following steps:
when the home cloud server enters a Wi-Fi Direct mode and starts a DHCP service, WiFi Direct connection with the home cloud server is established;
sending a network configuration request to the home cloud server, wherein the network configuration request is used for indicating that the home cloud server forbids to modify the default route of the mobile terminal when generating a DHCP response message;
and receiving a DHCP response message sent by the home cloud server, and reserving an original default route when IP address allocation is carried out according to the DHCP response message.
3. The method for enabling the mobile terminal to be directly connected to the home cloud server as claimed in claim 2, wherein the DHCP response message includes an IP address and a DHCP service assignment IP address, and wherein the DHCP response message prohibits filling of routing options.
4. The method for connecting the mobile terminal to the home cloud server directly according to claim 2 or 3, wherein when an operating system of the mobile terminal is an Android system, the mobile terminal is connected to the home cloud server in a Wi-Fi Direct manner through a WifiP2 pManager.
5. The method for connecting the mobile terminal to the home cloud server directly according to claim 2 or 3, wherein the mobile terminal is connected to the home cloud server in a station manner when an operating system of the mobile terminal is an ios system.
6. A computer-readable storage medium, on which a program for a mobile terminal to connect to a home cloud server is stored, the program for the mobile terminal to connect to the home cloud server, when executed by a processor, implementing the method for the mobile terminal to connect to the home cloud server according to claim 1 or the method for the mobile terminal to connect to the home cloud server according to any one of claims 2 to 5.
7. The home cloud server is characterized by comprising a memory, a processor and a program of the mobile terminal which is stored in the memory and can run on the processor, wherein when the processor executes the program of the mobile terminal which is directly connected with the home cloud server, the method of the mobile terminal which is directly connected with the home cloud server is realized according to claim 1.
8. A mobile terminal is characterized by comprising a memory, a processor and a program of the mobile terminal directly connecting with a home cloud server, wherein the program of the mobile terminal directly connecting with the home cloud server is stored in the memory and can be run on the processor, and when the processor executes the program of the mobile terminal directly connecting with the home cloud server, the method of the mobile terminal directly connecting with the home cloud server is realized according to any one of claims 3-6.
9. The device for the mobile terminal to be directly connected with the home cloud server is applied to the home cloud server, and comprises the following components:
the starting module is used for starting the DHCP service after the home cloud server enters the Wi-Fi Direct mode;
the first establishing module is used for establishing WiFi direct connection between the family cloud server and the mobile terminal;
a first receiving module, configured to receive a network configuration request sent by the mobile terminal;
and the allocation module is used for generating a DHCP response message according to the network configuration request and allocating an IP address to the mobile terminal according to the DHCP response message, wherein the DHCP response message comprises a route filling prohibition option.
10. The utility model provides a device of mobile terminal directly links family's cloud server which characterized in that, is applied to mobile terminal, the device includes:
the second establishing module is used for establishing WiFi Direct connection between the mobile terminal and the family cloud server when the family cloud server enters a Wi-Fi Direct mode and starts a DHCP service;
a sending module, configured to send a network configuration request to the home cloud server, where the network configuration request is used to instruct the home cloud server to prohibit modification of a default route of the mobile terminal when generating a DHCP response packet;
the second receiving module is used for receiving a DHCP response message sent by the home cloud server;
and the connection module is used for reserving the original default route when IP address allocation is carried out according to the DHCP response message.
CN202111284147.4A 2021-10-08 2021-11-01 Method and device for directly connecting mobile terminal with home cloud server Active CN113727410B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2021111719831 2021-10-08
CN202111171983 2021-10-08

Publications (2)

Publication Number Publication Date
CN113727410A true CN113727410A (en) 2021-11-30
CN113727410B CN113727410B (en) 2022-01-28

Family

ID=78686350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111284147.4A Active CN113727410B (en) 2021-10-08 2021-11-01 Method and device for directly connecting mobile terminal with home cloud server

Country Status (1)

Country Link
CN (1) CN113727410B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1708111A1 (en) * 2005-03-21 2006-10-04 Marvell World Trade Ltd. Network system for distributing protected content
CN101141372A (en) * 2006-09-07 2008-03-12 上海贝尔阿尔卡特股份有限公司 Method and device for management of routing information and data forwarding in access equipment
CN103067307A (en) * 2013-01-23 2013-04-24 华北石油通信公司 Method and system of broadband access
CN103384157A (en) * 2013-03-14 2013-11-06 上海汉枫电子科技有限公司 Low-power-consumption embedded type WIFI module
US20150208457A1 (en) * 2014-01-17 2015-07-23 GM Global Technology Operations LLC Managing traditional wi-fi and wi-fi direct connections using a wireless device
US20150229604A1 (en) * 2014-02-07 2015-08-13 GM Global Technology Operations LLC Dynamic dhcp for wi-fi connectivity in a vehicle
CN105721220A (en) * 2016-03-11 2016-06-29 北京奇虎科技有限公司 Intelligent terminal and network bottom configuration method thereof
CN105827440A (en) * 2016-03-11 2016-08-03 北京奇虎科技有限公司 Intelligent terminal and route configuration method thereof
CN108141481A (en) * 2015-09-03 2018-06-08 康维达无线有限责任公司 The enhanced neighbours of communication network have found
CN110365557A (en) * 2018-03-26 2019-10-22 中兴通讯股份有限公司 A kind of method and device of network interconnection
CN111988471A (en) * 2020-08-27 2020-11-24 深圳市当智科技有限公司 Wireless phone system, wireless communication method and readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1708111A1 (en) * 2005-03-21 2006-10-04 Marvell World Trade Ltd. Network system for distributing protected content
CN101141372A (en) * 2006-09-07 2008-03-12 上海贝尔阿尔卡特股份有限公司 Method and device for management of routing information and data forwarding in access equipment
CN103067307A (en) * 2013-01-23 2013-04-24 华北石油通信公司 Method and system of broadband access
CN103384157A (en) * 2013-03-14 2013-11-06 上海汉枫电子科技有限公司 Low-power-consumption embedded type WIFI module
US20150208457A1 (en) * 2014-01-17 2015-07-23 GM Global Technology Operations LLC Managing traditional wi-fi and wi-fi direct connections using a wireless device
US20150229604A1 (en) * 2014-02-07 2015-08-13 GM Global Technology Operations LLC Dynamic dhcp for wi-fi connectivity in a vehicle
CN108141481A (en) * 2015-09-03 2018-06-08 康维达无线有限责任公司 The enhanced neighbours of communication network have found
CN105721220A (en) * 2016-03-11 2016-06-29 北京奇虎科技有限公司 Intelligent terminal and network bottom configuration method thereof
CN105827440A (en) * 2016-03-11 2016-08-03 北京奇虎科技有限公司 Intelligent terminal and route configuration method thereof
CN110365557A (en) * 2018-03-26 2019-10-22 中兴通讯股份有限公司 A kind of method and device of network interconnection
CN111988471A (en) * 2020-08-27 2020-11-24 深圳市当智科技有限公司 Wireless phone system, wireless communication method and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ANDRES MARIN LOPEZ: "Wi-Fi Direct:Lessons learned", 《2016 MEDITERRANEAN AD HOC NETWORKING WORKSHOP(MED-HOC-NET)》 *
周克辉: "基于Android设备的Wi-Fi Direct组网方式的研究", 《电子测试》 *

Also Published As

Publication number Publication date
CN113727410B (en) 2022-01-28

Similar Documents

Publication Publication Date Title
US10432632B2 (en) Method for establishing network connection, gateway, and terminal
CN102724102B (en) Method and apparatus for establishing connection with network management system and communication system
CN102301763B (en) Method and nodes for registering a terminal
US8223731B2 (en) Method and system for authentication of WLAN terminal interworking with broadband wireless access network
KR101223235B1 (en) Wibro network interworking method and system for wireless terminal
CN101478576B (en) Method, apparatus and system for selecting service network
CN102833732B (en) System, data card and its implementation that a kind of IPv6 addresses stateless is automatically configured
KR100735265B1 (en) Method and system for configurating ip address in a mobile communication system
CN111432044B (en) Multi-link equipment MAC address management method and device and multi-link equipment
CN114422473B (en) IP address allocation method and device
CN112752240A (en) Direct communication processing method and device, relay terminal and remote terminal
US20180132099A1 (en) Ip address assignment method and apparatus
CN112398959B (en) RLC channel determination method and device
KR20060012849A (en) Apparatus and method of processing massage in portable internet system
CN106888450A (en) Information processing method and device
WO2008095433A1 (en) Method, device and system for providing emergency service
EP3703343A1 (en) Method and device for configuring service flow
KR102295206B1 (en) Operation method of communication node in communication network
KR100684322B1 (en) Method for establishing connection for ip management messages in mobile communication system and method for allocating ip address thereby
CN113766434B (en) File sharing method and device, home cloud server and storage medium
CN113727410B (en) Method and device for directly connecting mobile terminal with home cloud server
US10798054B2 (en) IP address allocation method in D2D communication and user equipment
CN107547668B (en) Message processing method and device and DHCP server
CN102781093B (en) The Notification Method and system of a kind of user profile
CN101790146A (en) Method for allocating address information, network equipment and network system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant