This non-provisional application claims priority under 35 U.S.C. §119(a) on Patent Application No. 103138183 filed in Taiwan, R.O.C. on 2014, Nov. 4, the entire contents of which are hereby incorporated by reference.
The present invention relates to a point-to-point (P2P) apparatus and a P2P connection method and more particularly relates to a P2P apparatus and a P2P connection method via a gateway.
Various electronic devices are developed for improving human life. Still, there are lots of technical problems to be solved to achieve more convenience and more application possibilities. Current network environment is usually composed of multiple homogenous or heterogeneous sub-networks. Specifically, the Internet serves as the main body and various gateways and routers are used for connecting private local networks, telecommunication networks. When two terminal devices want to be connected under a point-to-point connection, there are still many difficult technical problems to be solved. Things become particularly complicated when the two terminal devices are located in different sub-networks. For example, when terminal devices are located in different sub-networks behind different NAT (Network Address Translation) devices, these terminal devices may have different private network addresses. Besides, it is also challenging to find a better way to establish efficient network connection.
According to an embodiment of the present invention, a point-to-point (P2P) apparatus includes a device resource, a processor, a storage and a network interface. The processor processes the device resource, e.g. to collect information of a heartbeat sensor. The device resource may refer to various bio-information sensors for collecting information like heartbeat, blood pressure and blood oxygen level. The storage is used for storing an unique identification code. The point-to-point apparatus connects to a gateway among multiple gateways via the network interface over a firs network. The term of gateway may refer to various electronic devices like a mobile phone, a tablet computer, a portable device like a watch, a router, a television box, or a computer. The first network may refer to a short range communication network like a Bluetooth, Zigbee, NFC, iBeacon wireless network or a USB wire network. Under different needs, a user may connect one point-to-point apparatus to different gateways at different times. For example, a point-to-point apparatus for detecting heartbeat may be connected to a computer as a gateway during office hours for a user. When the user goes home, the same point-to-point apparatus for detecting heartbeat may be connected to a television box at home.
Besides, the point-to-point apparatus submits the unique identification code to a server over a second network via the gateway. The second network may refer to any kind of wire or wireless networks. In addition, when the first network is a non-TCP/IP network, e.g. a Bluetooth network, and the second network is a TCP/IP network, the point-to-point apparatus may connect to the TCP/IP network via the gateway to further connect to a local TCP/IP network or the Internet. Such configuration makes a point-to-point apparatus with only Bluetooth connectivity to extend connectivity to the Internet indirectly.
Because each point-to-point apparatus has its own unique identification code and each point-to-point apparatus registers its unique identification code on the server via an associated gateway, the server knows which gateway serving the point-to-point apparatus and how to connect to the gateway.
Therefore, the external device may query the unique identification code to the server to find out the associated gateway currently corresponding to the point-to-point apparatus to use the gateway to access the device resource. For example, a user may use a mobile phone via a television box as a gateway that connects to the Internet to access heartbeat information of his father with a heartbeat detector that has only Bluetooth connectivity.
In addition, after the external device retrieves the unique identification code and connection information of the gateway, the external device may establish point-to-point connection with the gateway to save complicated server establishment and maintenance cost and to avoid bottleneck problem.
In addition to the point-to-point apparatus, the gateway may have its own unique identification code that is also sent to the server to be registered to update most current status and new connection information.
If the point-to-point apparatus does not have proper operating interface, the first gateway may also provide an interface for a user to configure the point-to-point apparatus. Such interface may be used for the user to set the unique identification code of the point-to-point apparatus on the server.
According to another embodiment of the present invention, a method for P2P connecting includes following steps. A first process, e.g. a program, is provided to be installed in multiple gateways. An unique identification code is provided to be installed in a point-to-point apparatus that has a device resource. A server is also provided. When an external device requests to be connected to the point-to-point apparatus according to the unique identification code, the server finds out a first gateway connected to the point-to-point apparatus and assists establishing a point-to-point connection between the first gateway and the external device for the external device to access the device resource of the point-to-point apparatus. The first gateway is one of the multiple gateways and the point-to-point apparatus is selectively connected to the first gateway.
Under different needs, the server may be configured in different ways. For example, the server may include a main server and multiple point-to-point servers. The point-to-point apparatus periodically registers the unique identification code on the main server via the first gateway. The main server assigns a service point-to-point server selected from the multiple point-to-point servers. When the external device requests the server for accessing the point-to-point apparatus associated to the unique identification code, the main server informs the external device to request the assigned service point-to-point server and the assigned service point-to-point server assists the external device to establish a point-to-point connection with the first gateway.
This method also provides a second process to be installed in the point-to-point apparatus, e.g. a terminal device like a heartbeat detector, to process the communication to the server. The first process and the second process may be application programs, program modules, Apps or corresponding hardware logic circuits.
In addition, this method may further include providing an operating interface for a user to set the point-to-point apparatus. This method may also provide a second operating interface for the user to set the first gateway. This method may also include providing the unique identification code to the point-to-point apparatus.
With such design, various point-to-point apparatuses, even without capability of TCP/IP, may still connect to a TCP/IP network via gateways. In addition, even these point-to-point apparatuses are connected with different gateways, the external device may also find these point-to-point apparatuses according to their unique identification codes and thereafter access their device resources.
Please refer to
In addition, the point-to-point apparatus 60 submits the unique identification code to a server 64 over a second network 63 via the gateway 611. The second network may be any kind of wire or wireless network. When the first network 62 may be a non-TCP/IP network like a Bluetooth network and the second network 63 is a TCP/IP network, the point-to-point apparatus 60 may connect to a TCP/IP network via the gateway 611 so as to further connect to a local TCP/IP network or the Internet. Therefore, such configuration enables a point-to-point apparatus that originally only has Bluetooth connectivity to connect to the Internet indirectly.
Because each point-to-point apparatus has its own unique identification code and the point-to-point apparatus registers the unique identification code on the server 64 via the gateway 611, the server 64 knows which gateway 611 is serving the point-to-point apparatus 60 and how to connect to the gateway 611.
Therefore, the external device 65 may query the server 64 with the unique identification code to find out the gateway 611 currently associated to the point-to-point apparatus 60 and further access the device resource 601 via the gateway 611. For example, a user may use a mobile phone connecting to a television box as the gateway 611 over the Internet to access heartbeat information of his father with a heartbeat detector that originally has Bluetooth connectivity.
In addition, the external device 65 may construct a point-to-point connection with the gateway 611 after receiving the unique identification code and the connection information of the gateway 611. Such scheme saves establishment cost of complicated servers and avoids unnecessary bottleneck problem.
In addition to the point-to-point apparatus 60, the gateway 611 may have an unique identification code and the gateway 611 may register its new status and updated connection information on the server 64.
If the point-to-point apparatus 60 does not have a proper operating interface, the first gateway 611 may provide an operating interface for a user to set the point-to-point apparatus 60. In addition, the operating interface may provide the user to set the unique identification code of the point-to-point apparatus 60 or other settings on the server 64. For example, such operating interface may use an App or a web interface to receive user input and communicate with the remote server 64 to show corresponding setting information.
Please refer to
The server may have various configuration under different needs. For example, the server may include a main server and multiple point-to-point servers. When the point-to-point apparatus periodically registers the unique identification code on the main server, the main server assigns one service point-to-point server from the multiple point-to-point servers. When the external device requests the main server for accessing the point-to-point apparatus with the unique identification code, the main server informs the external device to requests service from the assigned service point-to-point server. The assigned service point-to-point server assists the external device to perform a point-to-point connection to the first gateway.
The method also provides a second process to be installed in the point-to-point apparatus for handling communication to the server or the gateway. For example, the second process is installed on a terminal device like a heartbeat detector point-to-point apparatus. The first process and the second process may be a corresponding application program, a program module, an App or corresponding hardware logic circuits.
In addition, the method may also provide an operating interface for a user to set the point-to-point apparatus. The method may also provide a second operating interface for the user to set the first gateway. The method may also include providing the unique identification code to the point-to-point apparatus.
Under such scheme, even a point-to-point apparatus having no TCP/IP connectivity may also connect to a TCP/IP network via a gateway. In addition, even these point-to-point apparatuses are connected to different gateways, the external device may also find these point-to-point apparatuses with their unique identification codes and access their device resources.
The first process, the second process and the operating interfaces may be implemented as Apps and located in an App store to be downloaded by a user. The first process may be implemented as a web page with corresponding Javascript codes or as other program format. The first process may be installed in the gateway in advance by manufacturers or installed by a user when the user wants to do so.
Please refer to
In addition to direct connection to the Internet 111, some devices are connected to the Internet 111 via an Internet Service Provider (ISP). Usually, an ISP provides NAT (Network Address Translation) devices to convert limited IPv4 or IPv6 addresses to private addresses of a private network of the ISP so that the devices in the private network 113 of the ISP may share these network resources. According to RFC 1918, three kinds of private addresses correspond to different number of private addresses. For example, 10.0.0.0-10.255.255.255 provide 16,777,216 private addresses, 172.16.0.0-17.31.255.255 provide 1,048,576 private addresses, and 192.168.0.0-192.168.255.255 provide 65,536 private addresses.
One private address may be assigned to different devices in different networks. Therefore, if only depending on these private addresses, the routers over the Internet 111 are not able to determine which devices are to be connected. If the computer 133 wants to access a device in a private network 113 of an ISP, the ISP provides a public address of its NAT to the computer 133. The NAT of the ISP finds which private address should be correspond to the address to transmit data.
There are various ways to implement NAT. In addition, in different network environments, NAT may have various nested combinations. For example, two home NAT 123 and 125 are located in a private network 113 of an ISP. The home NATs 123 and 125 respectively have their own home networks 115 and 117. Various terminal devices like a mobile phone 135, a computer 137 and a server 141 are connected to these home networks.
Because the home NAT 123 and the home NAT 125 are located in the private network 113 of the ISP, their IP addresses are private IP addresses like 192.168.1.131 provided by the NAT 121 of the ISP. If the computer wants to transmit data to the mobile phone 135, router or other devices, the public IP address of the NAT 121 of the ISP, the private IP address of the home NAT 123, and the private IP address of the mobile phone need to be found.
RFC1918 teaches how a device in a private network connects to the Internet 111, e.g. connecting to a Web server. Nevertheless, due to network complexity and various NAT designs, it is very complicated for two devices to perform point-to-point connection.
For example, if the mobile phone 135 wants to establish a point-to-point connection for connecting to an IP camera 139 in a home network 119 controlled by another NAT 127, the mobile phone 135 cannot access the IP camera 139 with its private address because the mobile phone 135 and the IP camera 139 are located in different private networks. In addition, due to the NAT 127, the mobile phone 135 cannot access the IP camera 139 with the public IP address of the NAT 127. In other network environments, there are firewalls or other network devices making point-to-point connection more complicated and difficult. In the following drawings and disclosures, several embodiments are provided for further explaining the present invention.
As mentioned above, most devices have TCP/IP network interfaces, e.g. Wi-Fi, RJ-45 or other communication interfaces. Nevertheless, due to cost or power consumption consideration, lots of devices do not have TCP/IP connectivity. For example, many heartbeat detectors, blood pressure detectors, EEG detector and other bio-information devices have short range network connectivity like Bluetooth or NFC, but may not have Wi-Fi connectivity. In such cases, mobile phones or other devices may be used as gateways as a bridge for connecting these point-to-point apparatuses to TCP/IP networks like the Internet.
Please refer to
Unlike the above example, in
The gateway 41 has a Bluetooth hardware 414. In software aspect, the gateway 41 has an operating system 413, a library 412 and an application App 411. The major logic for performing the point-to-point connection is constructed by the App 411, e.g. to transmit the unique identification code of the sensor circuit 422 to the server and to perform a point-to-point connection to an external device with help of the server. Besides, the gateway 41 may convert access instructions of an external device to a point-to-point instructions and transmit them to the point-to-point apparatus 42 with the Bluetooth hardware 414 and 421 to perform configuration or data request of the point-to-point apparatus 42. The library 412 may provide corresponding functions provided by unique identification code providers to simplify coding complexity of the App 411. Besides, corresponding tasks may be allocated in various ways between the point-to-point apparatus 42 and the gateway 41 under different needs. For example, in design with concern of power consumption, most computation may be performed by the gateway 41 to share loading of the point-to-point apparatus 42.
More detailed connection flows for connection problems under NATs may be found in documents related to hole punching, like UDP hole punching, TCP hole punching, ICMP hole punching, Session Traversal Utilities for NAT, Traversal Using Relay NAT, NAT-T Negotiation of NAT-Traversal in the IKE, Teredo tunneling using NAT traversal, Session Border Controller, RSIP, Middlebox Communication (MIDOCM), SOCKS, NAT PMP, UPnP, IGD and Application Gateway.
Please be noted that the mobile phone 22, the heartbeat detector 231 and the blood pressure detector 232 are used only examples not to limit the scope of the invention. More and more devices are developed in popular Internet of Things and point-to-point connection may help different application. For example, the mobile phone 22 may use point-to-point connection to watch video content captured by a IP camera. Other devices like a watch, a tablet computer, a wearable device, a wearable eye-glasses, sensors for collecting various signals and robots may be designed under the same invention idea to achieve the technical effect as mentioned above.
In an embodiment, except the public address or private address, each point-to-point apparatus has an unique identification code. Such unique identification code may be assigned by a server like the server 21 mentioned above, or set by manufacturers of these point-to-point apparatuses for performing point-to-point connection. These unique identification codes may further be integrated with user information and a server maintains and manages a database for unique identification codes and corresponding user information. With such, an external device may query all electronic devices registered to a user or a device list authorized to be accessed by the user. Such scheme may be integrated to one or more embodiments as mentioned above.
The server 21 is implemented by installing corresponding software on a machine to achieve the point-to-point service for the point-to-point terminal devices as mentioned above. The server 21 may also be implemented by software modules and be executed in multiple machines or be implemented as an application program executed on a cloud environment provided by a cloud service provider.
The foregoing descriptions of embodiments of the present invention have been presented only for purposes of illustration and description. They are not intended to be exhaustive or to limit the present invention to the forms disclosed. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. Additionally, the above disclosure is not intended to limit the present invention. The scope of the present invention is defined by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
103138183 | Nov 2014 | TW | national |