Systems and methods for connecting devices through intermediate nodes

Methods and systems are presented in this disclosure that enable mobile devices without access to an active network connection (e.g. cellular, satellite or Internet network) to communicate between each other by sending and receiving data packets (e.g. text, location, or image) through a mesh of connected devices. A mobile device receives a request to send a packet having an identifier of a recipient device. Based on the identifier, the mobile device determines whether the recipient device is in a list of mobile devices within a wireless range of the mobile device. Based on the determination, the mobile device includes the packet into an outgoing queue having packets for forwarding. The mobile device establishes one or more connections with one or more mobile devices in the list, and forwards one or more packets from the outgoing queue to the one or more mobile devices using the one or more connections.

BACKGROUND

This disclosure generally relates to systems and methods for wireless communications, and more particularly relates to systems and methods for connecting devices through intermediate nodes.

In various situations, stable and reliable cellular, satellite and Internet connections can all be unavailable. In order to provide connectivity to wireless devices without cellular, satellite and Internet connections, wireless devices may communicate between each other through a mesh of devices connected through a local mesh network.

A wireless communication network can be realized through the use of a mesh network. A mesh network is a distributed network having multiple wireless mesh points or wireless nodes. Each mesh wireless node in the mesh network may act as a relay node capable of receiving wireless signals and relaying the wireless signals to the next mesh wireless node in the mesh network. A wireless signal may proceed from an origination mesh wireless node to a destination mesh wireless node by hopping from one mesh wireless node to another mesh wireless node. Existing systems and methods for routing wireless signals through the mesh network need to insure that the signals are routed efficiently from their origination mesh wireless node to their destination mesh wireless node.

SUMMARY

Disclosed embodiments include methods and systems by which mobile devices that do not have connectivity to a network (“unattached devices”) can still communicate by sending and receiving packets (e.g., text messages, locations, images, etc.) through a local mesh of inter-connected mobile devices. In general, a packet may comprise information or data to be communicated between mobile devices of the local mesh. The information encapsulated into the packet may comprise a text message, an image, location information, voice content, or some other data content that can be communicated between mobile devices.

Disclosed embodiments include methods for mesh forwarding of packets from an unattached device to nearby devices of the local mesh. In some embodiments, a mobile device executes a method for mesh forwarding of packets. The mobile device receives from an unattached mobile device (i.e., a device that does not have a connection to a network other than the local mesh) a request to forward a packet previously received at the mobile device, the packet includes an identifier of a recipient device of the packet. The packet therefore has a destination on the local mesh network. The mobile device determines, based on the identifier, whether the recipient device of the packet is in a list of mobile devices within the wireless range of the mobile device. The mobile device includes, based on the determination, the packet into a local outgoing queue in the memory of the mobile device, where the queue comprises a list of packets to be forwarded. The mobile device establishes one or more wireless connections with one or more mobile devices in the list of mobile devices. Upon including the packet into the local outgoing queue, the mobile device decrements a value in the packet indicating a remaining number of times the packet is allowed to be transferred from one mobile device to another mobile device. The mobile device forwards, in accordance with the decremented value, the packet from the local outgoing queue to the one or more mobile devices via the established one or more wireless connections.

Disclosed embodiments include an apparatus for wireless communication (i.e., wireless device, mobile device, or wireless node). The apparatus includes a first module (i.e., a messaging module) and a second module (i.e., a connectivity module) coupled to the first module. The first module is configured to receive a request to forward a packet previously received at the apparatus, the packet includes an identifier of a recipient device of the packet. The first module is further configured to determine, based on the identifier, whether the recipient device is in a list of wireless devices within a wireless range of the apparatus, and to include, based on the determination, the packet into an outgoing queue comprising a list of packets to be forwarded. The second module is configured to establish one or more wireless connections with one or more wireless devices in the list of wireless devices. The first module decrements, upon including the packet into the outgoing queue, a value in the packet indicating a remaining number of times the packet is allowed to be transferred from one wireless device to another wireless device. After that, the first module forwards, in accordance with the decremented value, the packet from the outgoing queue to the one or more wireless devices via the established one or more wireless connections.

The figures depict embodiments of the present disclosure for purposes of illustration only. One skilled in the art will readily recognize from the following description that alternative embodiments of the structures and methods illustrated herein is employed without departing from the principles, or benefits touted, of the disclosure described herein.

DETAILED DESCRIPTION

The techniques described herein are used for various wireless communication systems. Examples of such communication systems include Spatial Division Multiple Access (SDMA), Time Division Multiple Access (TDMA), Orthogonal Frequency Division Multiple Access (OFDMA) systems, Single-Carrier Frequency Division Multiple Access (SC-FDMA) systems, and other wireless communication systems of fourth generation (4G) and fifth generation (5G).

The teachings herein is incorporated into (e.g., implemented within or performed by) a variety of wireless apparatuses, generally referred to as wireless devices, mobile devices, or wireless nodes. Such wireless node may provide, for example, connectivity for or to a network (e.g., a wide area network such as the Internet or a cellular network) via a wired or wireless communication link. A wireless node implemented in accordance with the teachings herein may comprise an access point or an access terminal.

An access point (“AP”) may comprise, be implemented as, or known as NodeB, Radio Network Controller (“RNC”), eNodeB, Base Station Controller (“BSC”), Base Transceiver Station (“BTS”), Base Station (“BS”), Transceiver Function (“TF”), Radio Router, Radio Transceiver, Basic Service Set (“BSS”), Extended Service Set (“ESS”), Radio Base Station (“RBS”), or some other terminology. In some implementations, an access point may comprise a set top box kiosk, a media center, or any other suitable device that is configured to communicate via a wireless or wired medium.

An access terminal (“AT”) may comprise, be implemented as, or known as an access terminal, a subscriber station, a subscriber unit, a mobile station, a remote station, a remote terminal, a user terminal, a user agent, a user device, user equipment, a user station, or some other terminology. In some implementations, an access terminal may comprise a cellular telephone, a cordless telephone, a Session Initiation Protocol (“SIP”) phone, a wireless local loop (“WLL”) station, a personal digital assistant (“PDA”), a handheld device having wireless connection capability, a Station (“STA”), or some other suitable processing device connected to a wireless modem. Accordingly, one or more aspects taught herein is incorporated into a phone (e.g., a cellular phone or smart phone), a computer (e.g., a laptop), a portable communication device, a portable computing device (e.g., a personal data assistant), a tablet, an entertainment device (e.g., a music or video device, or a satellite radio), a television display, a flip-cam, a security video camera, a digital video recorder (DVR), a global positioning system device, or any other suitable device that is configured to communicate via a wireless or wired medium. The implementation in such cases is in the form of a dedicated circuit (e.g., ASIC), or installed code executing on a processor. In embodiments of devices such as smartphones, the implementation may take the form of a software application that is downloaded from a host server and installed onto the node device and executed therein to enable the device to provide the mesh forwarding and connection between multiple node devices.

Disclosed embodiments include methods and systems by which unattached mobile devices that do not have connectivity to a network (e.g., cellular network, satellite network, Internet network) can still communicate by sending and receiving packets with information or data content (e.g., text messages, locations, images, etc.) through a local mesh of connected devices configured in the manner described herein.

FIG. 1illustrates an example mesh network100comprising a plurality of communicating devices or wireless nodes102where various embodiments of the present disclosure are implemented. The wireless nodes102may form mesh links104with one another, over which mesh paths are established using a certain routing protocol. Examples of mesh routing protocols may include, for example, Hybrid Wireless Mesh Protocol (HWMP), Ad-hoc On-demand Distance Vector Protocol (AODV), Optimized Link State Routing (OLSR), and/or other routing protocols. A mesh link104is shared by two wireless nodes102which may directly communicate with each other via a wireless medium or a wireless communication channel. In accordance with embodiments of the present disclosure, a plurality of wireless nodes102connected through the mesh links104may form the mesh network100when any other type of communication between the wireless nodes102is not available. It should be understood that all wireless nodes102in the mesh network100are “peer” nodes. Thus, each wireless node102in the mesh network100can be either the intended recipient of a packet or a re-transmitter of the packet.

As illustrated inFIG. 1, stations (STAs) or wireless devices106and108that are not yet members of the mesh network100may lose connectivity with a wireless network110. For example, the wireless network110is a cellular network, an Internet network, a satellite network or some other type of wireless network that associated in the past and connected the STAs106and108. The STAs106and108can lose connectivity with the wireless network110when the STAs106and108are located outside a coverage region of the wireless network110, or the wireless network110is not operational. Connectivity between the STAs106and108can be re-established by establishing new connections112and114, respectively with wireless nodes102of the mesh network100, as illustrated inFIG. 1. After that, the STAs106and108communicates between each other through a mesh of mutually connected wireless nodes102, i.e., through the mesh network100. Before joining the mesh network100, each of the STAs106and108goes through a process of discovering wireless nodes102that are within the wireless range of that STA. For example, each wireless node102of the mesh network100may scan its wireless range for beacons that are periodically transmitted from the STAs106and108. Once each of the STAs106and108is discovered by at least one wireless node102of the mesh network100, the STAs106and108join the mesh network100and communicate between each other through one or more wireless nodes102of the mesh network100. This process of discovering a neighboring device and joining the mesh network100is used any time a wireless device loses connectivity to the wireless network110.

FIG. 2illustrates various components that may be utilized in a wireless device202that is employed within the mesh network100shown inFIG. 1. The wireless device202is an example of a device that is configured to implement the various methods described herein. The wireless device202may be a wireless node102of the mesh network100.

The wireless device202includes a processor204which controls operation of the wireless device202. The processor204can also be referred to as a central processing unit (CPU). Memory206, which may include both read-only memory (ROM) and random access memory (RAM), provides instructions and data to the processor204. A portion of the memory206may also include non-volatile random access memory (NVRAM). The processor204typically performs logical and arithmetic operations based on program instructions stored within the memory206. The instructions in the memory206are executable to implement the methods described herein.

The wireless device202also includes a housing208that includes a transmitter210and a receiver212to allow transmission and reception of data between the wireless device202and another wireless node (e.g., another wireless node in a remote location). The transmitter210and receiver212are combined into a transceiver214. One or more antennas216are attached to the housing208and electrically coupled to the transceiver214. The wireless device202may also include (not shown) multiple transmitters, multiple receivers, and multiple transceivers.

The wireless device202also includes a signal detector218that detects and quantifies the level of signals received by the transceiver214. The signal detector218quantifies detection of such signals using total energy, energy per subcarrier per symbol, power spectral density and/or other quantification metrics. The wireless device202also includes a digital signal processor (DSP)220for use in processing signals.

The various components of the wireless device202are coupled by a bus system222, which may include a power bus, a control signal bus, and a status signal bus in addition to a data bus.

FIG. 3illustrates an example block diagram of an Integration module300that is implemented within the wireless device202shown inFIG. 2for performing wireless communication with one or more other wireless devices of the mesh network100shown inFIG. 1, in accordance with embodiments of the present disclosure. The Integration module300is an embodiment of the processor204of the wireless device202. As illustrated inFIG. 3, the Integration module300comprises a lower-level Connectivity sub-module302and a higher-level Messaging sub-module304.

The Connectivity sub-module302handles processes related to discovery, connection, and administration of other mobile devices (i.e., wireless nodes) within a wireless range of the wireless device comprising the Integration module300. The Connectivity sub-module302can utilize different types of antennas, e.g., Bluetooth and Wi-Fi antennas. The Connectivity sub-module302provides support for different types of multicast interfaces, e.g., Wifi-Direct and/or Access-Point multicast interfaces.

The Connectivity sub-module302performs a process of discovering nearby mobile devices. The device discovery is a process through which nearby mobile devices within reach (e.g., up to approximately 50 m) are found, identified and reported to one or more users. The device discovery may be performed on one or more supported interfaces, based on which interface or a group of interfaces are activated by the Connectivity sub-module302. Each mobile device being discovered may be reported along with an interface used to discover that nearby mobile device.

The Connectivity sub-module302establishes duration of discovery intervals of one or more nearby mobile devices. The Connectivity sub-module302defines a duration of each connection with a nearby mobile device. The Connectivity sub-module302may also define an expiration time of each packet to be forwarded to the one or more nearby mobile devices. The Connectivity sub-module302discovers at least one nearby mobile device based on receiving a beacon signal from the at least one nearby mobile device. Upon reception of at least one beacon signal, the Connectivity sub-module302stores an identifier of the at least one discovered nearby mobile device in a list of mobile devices.

In order to correctly connect with a nearby mobile device, a connection request may be triggered and sent from either the Messaging sub-module304or from the Connectivity sub-module302. If the connection is successfully established, an event can be reported to the one or more users, and a connection session object may be created. A connection with a discovered nearby mobile device may be requested, e.g., a pre-configured numbers of retries. A controller (not shown inFIG. 3) may verify that the Connectivity sub-module302has compiled information used for creating a complete connection session object. After that, connection information may be exchanged though the handshake process between the wireless device202having the Integration module300and a discovered nearby mobile device.

The Messaging sub-module304is coupled to the Connectivity sub-module302and starts operating when connections have been successfully established (e.g., through the Connectivity sub-module302). The Messaging sub-module304handles all outgoing and incoming requests both for direct communication between wireless nodes and for mesh forwarding. The Messaging sub-module304allows sending of different types of data that can be communicated between mobile devices, such as text, an image, location information, voice content, or some other data content.

The Messaging sub-module304may generate a data packet having a structure that facilitates the scalability and flexibility of a communication system. The packet typically has a structure that comprises: content of the packet, a unique identifier of a final recipient of the packet, a unique identifier of a sender of the packet, a type of the packet (e.g., text, location, image, etc.), a time and date the packet was sent, or a cyclic redundancy check (CRC), e.g., for a local public key or a recipient's public key. The content of the packet is a byte array representing text, location, or binary data (e.g., files or images). The packet may also include a name of a file if the content of the packet is the file. It should be understood that one or more additional fields can be included into the structure of the packet

The Messaging sub-module304handles several follow-up signals received as a response of a packet reception. The follow-up signals act as acknowledgments for having the packet sent, received and read. For example, an acknowledgement signal is triggered when a recipient receives the sent packet. The Messaging sub-module304marks the packet as being received based on reception of the acknowledgement signal from the recipient. A blocked acknowledgement signal is triggered when the recipient receives the sent packet, but the sender is blocked by the recipient. A read acknowledgement signal is optionally sent as an acknowledgement that the conversation between the sender and the recipient has been displayed or “read” (e.g., the conversation window was opened) by the recipient.

Once a packet is set to be sent, the Messaging sub-module304puts the packet in a queue along with any other packets produced at that time slot. The Messaging sub-module304can manage the queue of packets by sending each packet in the queue in a separate time slot or by sending the packets in the queue in the batch mode, i.e., during a same time slot. The Messaging sub-module304may immediately process the queue in an asynchronous thread to secure that packets are delivered in the same order as they were produced.

In order to process the queue, the Connectivity sub-module302determines if there is an active connection session with a recipient device. If the active connection session is established, the Messaging sub-module304initiates sending at least one packet from the queue to the recipient device using the established connection session. Otherwise, the Connectivity sub-module302may request a new connection session to be established with the recipient device. Once a new connection session is established with the recipient device, the Messaging sub-module304initiates sending at least one packet from the queue to the recipient device. Once a packet has been sent, the Messaging sub-module304triggers a notification. On the recipient's side, once a packet is received, any or all of the acknowledgement signals described above may be returned as a response to the sender. Sometimes, packets cannot be delivered successfully due to a connection error or recipient's sudden unavailability. In this case, the Messaging sub-module304triggers generating a specific error message describing why the packets cannot be delivered successfully.

FIG. 4is a flow chart illustrating a method400for mesh forwarding that is implemented at the Messaging sub-module304in communication with the Connectivity sub-module302of the Integration module300shown inFIG. 3, in accordance with embodiments of the present disclosure. The method400for mesh forwarding illustrated inFIG. 4is implemented at a wireless node102of the mesh network100shown inFIG. 1and at the wireless device202shown inFIG. 2, for example in a software application that is downloaded and installed onto the wireless node102and onto the wireless device202.

The method400begins by the wireless node102receiving402a request to send a packet comprising information or data from another wireless node. In some embodiments, the request to send the packet is initiated and obtained via the Messaging sub-module304. The packet requested to be sent includes an identifier of a recipient device of the packet (e.g., any wireless node102of the mesh network100), such as user identifier (e.g., a user name). The packet is of a broadcast type, or the packet is a unicast packet to be directly communicated between a pair of wireless nodes102of the mesh network100. The unicast packet may include a direct message that is sent from the wireless node102to another wireless node102of the mesh network100. The direct message is private and only the intendent receiver device can read the received direct message. The broadcast packet may include a broadcast message that is sent from the wireless node102to all nearby wireless nodes, regardless of whether the nearby wireless nodes are associated with known users or not. The broadcast message is typically not encrypted.

The Messaging sub-module304determines404, based on the identifier of the recipient device, whether the recipient device is one of mobile devices within the wireless range of the wireless node102, i.e., whether the recipient device of the packet belong to a list of mobile devices maintained by the wireless node102. The list of mobile devices is maintained by the wireless node102based on determining presence of at least one new mobile device within the wireless range of the wireless node102. The wireless node102updates the list of mobile devices based on the determined presence of mobile devices within the wireless range of the wireless node102by including identifiers of the mobile devices and identifiers of respective users associated with the mobile devices. The presence of new mobile devices within the wireless range of the wireless node102can be determined based on detecting beacons or other notification signals of the mobile devices. The wireless node102has already established one or more sessions (or connections) with one or more mobile devices within the wireless range of the wireless node102. Furthermore, the wireless node102may establish, before forwarding the packet, at least one new session (connection) with at least one newly discovered mobile device within the wireless range of the wireless node102.

If the intended recipient device of the packet is included in the list of mobile devices maintained at the wireless node102, then the Messaging sub-module304directly sends406the packet to the intended recipient device. If the direct transmission406of the packet fails, the Messaging sub-module304includes the packet in an outgoing queue and forwards the packet to mobile devices (including the intended recipient device) specified within the outgoing queue. The outgoing queue comprises a list of packets of a same structure waiting to be retransmitted (forwarded) through the mesh mechanism. The Messaging sub-module304determines a size of the outgoing queue, and discards at least one packet from the outgoing queue if the size of the outgoing queue is larger than a defined maximum queue size.

If the recipient device of the packet is not in the list of mobile devices, i.e., if the recipient device is not within the wireless range of the wireless node102performing operations of the mesh forwarding method400, then the Messaging sub-module304adds408the packet into the outgoing queue. The outgoing queue comprises a list of packets waiting to be retransmitted (forwarded) from the wireless node102to the mobile devices within the wireless range of the wireless node102. For each packet in the outgoing queue, the Messaging sub-module304allocates a transmission time slot (TTS) and sets an indication about a number of mobile devices to which that packet is to be propagated based on a number of mobile devices in the list of mobile devices. The Messaging sub-module304starts TTS for each new packet that is within the outgoing queue and ready to be forwarded to one or more mobile devices within the wireless range of the wireless node102.

The wireless node102detects410one or more new peer nodes (i.e., mobile devices) based on presence signaling of the peer node(s) in the range of the wireless node102performing operations of the mesh forwarding method400. After that, the Connectivity sub-module302establishes412sessions (connections) with the newly detected peer nodes. The Messaging sub-module304includes identifiers of the peer nodes detected410in the list of mobile devices in order to determine whether the intended recipient device of the packet is one of the mobile devices within the wireless range of the wireless node102. In addition, the Connectivity sub-module302maintains412existing connection sessions with one or more wireless devices in the list of wireless devices. The Connectivity sub-module302transmits a request for connection with a mobile device within the wireless range of the wireless node102. The Connectivity sub-module302receives a hand-shake message transmitted from the mobile device in response to the request, wherein the hand-shake message comprises a unique identifier of the mobile device. The Connectivity sub-module302creates a connection session with the mobile device based on the received handshake message. The Messaging sub-module304includes in the packet one or more identifiers of the one or more mobile devices where the packet is being forwarded and an identifier of the wireless node102forwarding the packet. The Messaging sub-module304also includes in the packet an indication about a number of times the packet is forwarded from the wireless node102.

The Messaging sub-module304forwards414one or more packets from the outgoing queue to the one or more mobile devices within the wireless range of the wireless node102via the established connection sessions. Before the forwarding414, the Messaging sub-module304divides the one or more packets from the outgoing queue into a plurality of blocks of a defined size, and the wireless node102transmits the plurality of blocks to the one or more mobile devices within the wireless range of the wireless node102. In general, a block structure used for packet transmission is based on a defined operator, i.e., based on a connection interface between a pair of communicating wireless nodes, which can be defined in the Connectivity sub-module302or the Messaging sub-module304. Each block of the plurality of blocks comprises an optional position flag (PF), a chunk identifier (CI) and data. PF can be either a start flag (SF) indicating that the block is a first block in a packet or an end flag (EF) indicating that the block is a last block in the packet. CI indicates a type of the block, such as a data type or a dictionary type. Data included in the block may comprise an array of bytes of information.

The Messaging sub-module304generates a package that encapsulates the packet. Each packet in the outgoing queue is encapsulated within a corresponding package. Once the Messaging sub-module304includes the packet in the outgoing queue and the packet is ready for forwarding414, the Messaging sub-module304decrements a value in the package that indicates a remaining number of hops associated with the packet, i.e., a remaining number of times the packet can be forwarded from one wireless node to another before being discarded.

The Messaging sub-module304of the wireless node102may discard the packet reaching the wireless node102if the packet was transferred from one wireless node to another before reaching the wireless node102a number of times equal to a predefined maximum allowed number of times. The Messaging sub-module304may also discard the packet reaching the wireless node102if the packet has been already forwarded by the wireless node102a predefined maximum number of times, i.e., if a predefined propagation limit has been reached. The Messaging sub-module304may also discard the packet if an expiration time of the packet indicated in the packet is reached or if a reach packet is received at the wireless node102that indicates the packet has reached its destination. The Messaging sub-module304compares, with the list of mobile devices, at least one identifier included in the packet of at least one mobile device to which the packet was previously delivered. After that, the Messaging sub-module304excludes the at least one mobile device from the list of mobile devices to which the packet will be forwarded, if the at least one identifier is found in the list of mobile devices. It should be also noted that the Messaging sub-module304can automatically switch operation of the wireless node102between directly sending a packet to a final recipient of the packet and forwarding the one or more packets to the one or more mobile devices within the wireless range of the wireless node102.

The wireless node102performing operations of the method400for mesh forwarding receives416(e.g., from a wireless node102within the wireless range of the wireless node102) an incoming packet (mesh message) from a user associated with other wireless node102. The incoming packet received by the wireless node102comprises another identifier of another intended recipient device of the incoming packet.

The Messaging sub-module304of the wireless node102determines418, based on the other identifier, whether the other intended recipient device of the incoming packet is different from the wireless node102. If the other intended recipient device is different from the wireless node102(i.e., the wireless node102that received the incoming packet is not an intended recipient device of the incoming packet), the Messaging sub-module304adds408the incoming packet to the outgoing queue. The Messaging sub-module304discards the incoming packet after reaching an expiration time indicated in the incoming packet, if the list of mobile devices is empty and no connection is established with any mobile device within the wireless range of the wireless node102. The Messaging sub-module304may determine that the incoming packet is intended to the wireless node102performing operations of the method400for mesh forwarding. Then, the wireless node102receives420a message encapsulated into the incoming packet. After that, the wireless node102directly sends a reach packet to the mobile devices within the wireless range of the wireless node102informing the mobile devices that the packet is successfully received at the indented recipient device and that the mobile devices should stop forwarding the received packet.

FIG. 5illustrates an example block diagram of a Message Manager module500that is implemented within the wireless device202shown inFIG. 2for performing wireless communication with one or more other wireless devices of the mesh network100shown inFIG. 1, in accordance with embodiments of the present disclosure. The Message Manager module500is an embodiment of the processor204of the wireless device202. As illustrated inFIG. 5, the Message Manager module500includes a Crypto-Manager sub-module502, a List of Message-Operator Objects sub-module504and a Mesh Forwarder sub-module506.

The Crypto-Manager sub-module502performs encryption and decryption of packets communicated between wireless nodes of the mesh network. The Crypto-Manager sub-module502generates private and public keys of the mesh network users. To encrypt a packet (data message) for a mesh network user, the Crypto-Manager sub-module502may first obtain a public key and a unique user identifier (UUID) for the user, e.g., through the handshake process. The Crypto-Manager sub-module502encrypts the packet by using the UUID of the receiving user. The Crypto-Manager sub-module502decrypts a packet being received based on a local key pair, i.e., based in part on an encryption key of a device sending the packet. The Crypto-Manager sub-module502can further generate a CRC validation for a local public key or other encryption key of a user. The CRC can be used by other components to verify if an encryption key being used is correct and updated.

The List of Message-Operator Objects sub-module504comprises a list of Message Operator objects, wherein each Message Operator object is configured to send and receive information using a determined connection interface with a device within a wireless range of the wireless device202having the Message Manager Module500. Each Message Operator object from the list controls one type of node connection, and encapsulates all implementation details utilized by the Message Manager module500. Each Message Operator object implements an interface known by the Message Manager module500, so all Message Operator objects can be handled in the same manner. In an embodiment, one type of node connection controlled by the List of Message-Operator Objects sub-module504comprises a Bluetooth Low Energy (BLE) based connection. BLE is a version of the standard Bluetooth connection with low energy consumption. Other types of connections between wireless nodes of a local mesh can be also defined and controlled by the List of Message-Operator Objects sub-module504.

The Mesh Forwarder sub-module506of the Message Manager module500performs a mesh forwarding process. The Mesh Forwarder sub-module506operates on packets that cannot be directly delivered from one wireless node to another, and utilizes a broadcast algorithm with wireless nodes within the wireless range. The Mesh Forwarder sub-module506is configured to deliver one or more packets to one or more devices within the wireless range of the wireless device202, wherein the one or more packets are dedicated to one or more recipients that are not within the wireless range of the wireless device202. The Mesh Forwarder sub-module506attempts sending a packet encapsulating the information to a wireless node using a type of connection interface controlled by the List of Message-Operator Objects sub-module504.

The Mesh Forwarder sub-module506obtains a packet that encapsulates information content. The Mesh Forwarder sub-module506then determines whether the packet is dedicated to the wireless device202or to be delivered to one or more peer nodes within the wireless range of the wireless device202. The Mesh Forwarder sub-module506also determines whether the packet is expired or not. If the packet is to be delivered to the one or more peer nodes and the packet is not expired, the Mesh Forwarder sub-module506includes the packet into a mesh forwarding list comprising a plurality of packets of a same structure for forwarding to the one or more peer nodes. The Mesh Forwarder sub-module506may receive notification, e.g., from the List of Message-Operator Objects sub-module504, about at least one new connection to the one or more peer nodes. The Mesh Forwarder sub-module506checks, in each packet within the mesh forwarding list, a list with at least one identifier of at least one wireless device that received the packet in the past. The Mesh Forwarder sub-module506then forwards the mesh forwarding list to the one or more peer nodes via the at least one new connection, based on the checked one or more identifiers.

FIG. 6is a flow chart illustrating a method600for mesh forwarding that is implemented at the Mesh Forwarder sub-module506shown inFIG. 5in communication with other portions of the Message Manager module500, in accordance with embodiments of the present disclosure. The method600for mesh forwarding illustrated inFIG. 6is implemented at a wireless node102of the mesh network100shown inFIG. 1and at the wireless device202shown inFIG. 2, for example in a software application that is downloaded and installed onto the wireless node102and onto the wireless device202.

Operations of the method600begin by receiving602a packet that encapsulates information or data (e.g., text message, location, image, etc.). In one or more embodiments, the packet with the encapsulated information is provided to the Mesh Forwarder sub-module506by the Message Manager module500, and the packet may originate from the wireless node102. Alternatively, the packet may not originate from the wireless node102. Instead, the packet with the encapsulated information is received from a peer node within the range of the wireless node102, such as from some other wireless node102in the mesh network100.

A structure of the packet comprises at least one of: a unique identifier of the packet, an indication about a type of the packet, information for decryption of the packet at the one or more peer nodes, an identifier of a sender device where the information content originates, an identifier of an intended recipient device of the information content, information about a remaining number of times the information content is allowed to be transferred from one node to another, information about expiration of the packet, an array of at least one element identifying at least one peer node that has received the information content, or information about a number of peer nodes within the wireless range of the wireless device202to which the packet is forwarded. It should be understood that one or more additional fields can be included into the structure of the packet. Before transmission of the packet, the Mesh Forwarder sub-module506updates the information about the remaining number of times the packet is allowed to be transferred from one node to another. In addition, the Mesh Forwarder sub-module506updates the information about the number of peer nodes within the wireless range of the wireless device202to which the packet is forwarded.

When the Mesh Forwarder sub-module506receives602the packet, the Mesh Forwarder sub-module506requests from the Message Manager module500to determine604whether the packet belongs to the wireless node102or the packet still needs to be forwarded to one or more peer nodes within the wireless range of the wireless node102. The packet comprises an identifier of an intended recipient device of the information encapsulated in the packet. The Message Manager module500is configured to determine604, based on the identifier of the intended recipient device, whether the packet reached its destination or the packet still needs to be forwarded to reach its intended receiver.

The Message Manager module300is also configured to determine606whether the packet has been expired. If the packet has been expired, then the Mesh Forwarder sub-module506discards the packet from forwarding to the one or more peer nodes within the wireless range of the wireless node102. The packet is expired if any of the following are true: (1) an attribute ‘propagation’ in the packet indicating a number of peer nodes to which the packet propagates is greater than a defined propagation limit; (2) an attribute ‘hops’ in the packet indicating a remaining number of times the packet is allowed to be transferred from one peer node to another reaches zero value; or (3) a time elapsed since creation of the packet (an elapsed time attribute also included in the packet) is greater than a defined sharing time limit.

If the Message Manager module500determines (in communication with the Mesh Forwarder sub-module506) that the packet still needs to be forwarded to nearby peer node(s) and the packet has not been expired, the Mesh Forwarder sub-module506includes608the packet into a mesh forwarding list comprising a plurality of packets of a same structure for forwarding to the one or more peer nodes. The Mesh Forwarder sub-module506determines whether a number of packets in the mesh forwarding list reaches a defined maximum mesh capacity. If the number of packets reaches the defined maximum mesh capacity, the Mesh Forwarder sub-module506discards at least one packet from the mesh forwarding list (e.g., the oldest packet among the packets in the mesh forwarding list), before adding any new packet to the mesh forwarding list.

The Mesh Forwarder sub-module506receives610notification from the Message Manager module500about at least one new connection established between the wireless node102and the one or more peer nodes. The Message Manager module500stores information about established connection(s) between the wireless node102and the one or more peer nodes in the List of Message-Operator Objects sub-module504. In one embodiment, the List of Message-Operator Objects sub-module504can be configured to control a BLE based connection between the wireless node102and the one or more peer nodes. In general, the List of Message-Operator Objects sub-module504can be configured to control different types of connections between the wireless node102and the one or more peer nodes.

Before forwarding packets in the mesh forwarding list, the Mesh Forwarder sub-module506checks612each packet of the mesh forwarding list to determine at least one identifier of at least one peer node that has already received that packet. If the Mesh Forwarder sub-module506determines that the packet has already been received by at least one peer node within the wireless range of the wireless node102, the Mesh Forwarder sub-module506is configured to avoid transmission of the packet to the least one peer node within its range. The Mesh Forwarder sub-module506discards the packet from the mesh forwarding list when transmitting the mesh forwarding list to the at least one peer node that has already received the packet. Otherwise, Mesh Forwarder sub-module506includes identifiers of all peer nodes within the wireless range of the wireless node102in a track list of the packet, before forwarding the packet within the mesh forwarding list to the one or more peer nodes within the track list.

The Mesh Forwarder sub-module506is configured to forward614the mesh forwarding list with the plurality of packets to the one or more peer nodes within the wireless range of the wireless node102via the at least one established connection. Before forwarding the mesh forwarding list, the Mesh Forwarder sub-module506determines whether the one or more peer nodes scheduled to receive the mesh forwarding list have received before any of the forwarded packets.

In some embodiments, the Mesh Forwarder sub-module506initiates transmitting a reach packet to the one or more peer nodes to stop forwarding the packet, if the packet is dedicated to the wireless node102. The reach packet may comprise an identifier of the information content encapsulated in the packet. The wireless node102may receive a reach packet indicating to stop forwarding the packet. The Mesh Forwarder sub-module506may then discard the packet from the mesh forwarding list based on the received reach packet.

After establishing connection between a pair of peer nodes (e.g., between the wireless node102and one of the peer nodes within the wireless range of the wireless node102), a handshake process is performed between the connected pair of peer nodes in order to exchange devices and users information to determine their identities and allow secure information sharing. The handshake process represents a session of questions and answers between two peer nodes that want to communicate.

A first peer node creates an initial request and sends the initial request to a second node. The second peer node creates a first response from the received request. The second peer node also creates a first request for the first peer node. The second peer node then sends the first request and the first response to the first peer node. Upon reception, the first peer node processes the first response and creates a second request if necessary. The first peer node also creates a second response based on the received first request. The first peer node then sends the second response and the optional second request to the second peer node. Upon reception, the second peer node processes the second response and a third request is created when necessary. A third response, if necessary, is also created from the received second request. This handshake process continues until both peer nodes obtain all requested information from each other. The handshake process may be initiated by a peer node having a central role in communicating, using, e.g., BLE connection, with other peer nodes. Alternatively, the handshake process may be initiated by a peer node having a largest CRC of both peer nodes.

A request represents a petition for required information from other peer node. The request includes a first field with a type of request being processed and a second field for sending an encryption key's 32-bit CRC obtained from the other peer node. There are three different types of requests that can be sent. A first type of request is “general” type, which is used to ask the other peer node for all of its information as the other peer node was not previously registered in the local database. A send type of request is “key” type, which is used to solicit the other peer node for its public key with which messages will be encrypted. A third type of request is “confirmation” type, which is used when the other peer node's encryption key is obtained, but it is not known if that encryption key is still valid.

A response comprises information that was solicited by the other peer node. The response includes a first field indicating a response type, a second field indicating a session username, a third field indicating a country associated with a user of the other peer node, and a fourth field that contains a key used to encrypt messages. There are three different types of responses that can be sent. A first type of response is “general” type, which is a response to a request of “general” type. A second type of response is “key” type, which is a response to a request of “key” type. A third type of response is “confirmation” type, which is used when a validation request of the encryption key has been received and the encryption key is correct.

FIG. 7is a flow chart illustrating a method700of sending a packet that is implemented at the Mesh Forwarder sub-module506in communication with the Message Manager module500shown inFIG. 5, in accordance with embodiments of the present disclosure. The method700for sending the packet is implemented at a wireless node102of the mesh network100shown inFIG. 1and at the wireless device202shown inFIG. 2, for example in a software application that is downloaded and installed onto the wireless node102and onto the wireless device202.

Operations of the method700begin by receiving702information or data content (e.g., a sender message) from the Message Manager module500, and the information content may originate from the wireless node102, i.e., a sender device.

The Message Manager module500encapsulates704the information content into a packet that comprises following attributes: ‘Time-To-Live’ indicating an elapse time of the packet (e.g., in seconds), ‘Sender ID’ indicating a unique identifier of the sender device, ‘Receiver ID’ indicating a unique identifier of an intended receiver device of the packet and the packet, ‘Accumulated hops’ indicating a remaining number of times the packet is allowed to be transferred from one device to another, and ‘Timestamp’ indicating a creation time of the packet. Some additional attributes may be also included in the packet.

If the Mesh Forwarder sub-module506determines706that ‘Accumulated hops’ is greater than zero and propagation attribute of the packet is less than a defined ‘Propagation Limit’, if the Mesh Forwarder sub-module506determines708that ‘Time-To-Live’ is less than a defined elapsed time, i.e., Actual Time−Sender Time (equal to ‘Timestamp’), if the Mesh Forwarder sub-module506determines710that a time for sharing the packet (which is also included as an attribute into the packet) has not been elapsed, and if the Mesh Forwarder sub-module506determines712that there is at least one new peer node that has not received the packet with the encapsulated information content, the Mesh Forwarder sub-module506is configured to send714the packet with the encapsulated information content to one or more peer nodes within the wireless range of the wireless node102.

If the Mesh Forwarder sub-module506determines706that Accumulated hops' is equal to zero and the defined Propagation Limit of the packet has been reached or exceeded, if the Mesh Forwarder sub-module506determines708that ‘Time-To-Live’ of the packet has been elapsed, or if the Mesh Forwarder sub-module506determines710that the time for sharing the packet has been elapsed, the Mesh Forwarder sub-module506removes716the packet from a mesh forwarding queue. If the Mesh Forwarder sub-module506determines712that there is no new peer node that has not yet received the packet with the encapsulated information content, then the Mesh Forwarder sub-module506blocks forwarding of the packet, and Mesh Forwarder sub-module506keeps the packet in the mesh forwarding queue. The Mesh Forwarder sub-module506keeps the packet in the mesh forwarding queue until the wireless node102(i.e., the sender device) detects presence of a new peer node that has not yet received the packet. Then, the Mesh Forwarder sub-module506forwards714the packet to the newly detected peer node. The Mesh Forwarder sub-module506also keeps the packet in the mesh forwarding queue until the packet elapses (e.g., by exceeding a propagation limit, by reaching a hops limit, a duration of the packet is elapsed, or a sharing time of the packet is elapsed). In this case, the Mesh Forwarder sub-module506removes716the elapsed packet from the mesh forwarding queue.

Upon sending714the packet with information content, the sender device (i.e., the wireless node102) may receive an acknowledgment from a peer node about successful reception of the packet. In an embodiment, the wireless node102receives the acknowledgment only if the peer node is within the wireless range of the wireless node102. If the wireless node102determines718that the acknowledgment is received, the Mesh Forwarder sub-module506removes716the packet from the mesh forwarding queue. Otherwise, if the wireless node102determines718that the acknowledgment is not received and the packet was not successfully received by the peer node, the Mesh Forwarder sub-module506keeps the packet encapsulating the information content in the mesh forwarding queue in order to forward the packet to the peer node again in the future.

FIG. 8is a flow chart illustrating a method800of receiving a packet that is implemented by the Mesh Forwarder sub-module506in communication with the Message Manager module500shown inFIG. 5, in accordance with embodiments of the present disclosure. The method800for receiving the packet is implemented at a wireless node102of the mesh network100shown inFIG. 1and at the wireless device202shown inFIG. 2, for example in a software application that is downloaded and installed onto the wireless node102and onto the wireless device202.

Operations of the method800begin by the Mesh Forwarder sub-module506receiving802an information or data content (e.g., a text message, image, location, etc.), wherein the information content is encapsulated within a packet.

In an embodiment, the Mesh Forwarder sub-module506may determine804to opt out from handling the received packet encapsulating the information content. Alternatively, the Mesh Forwarder sub-module506determines804to opt in. Then, the Message Manager module500determines806, upon request from the Mesh Forwarder sub-module506, whether the wireless node102that received the packet is actually an intended (chosen) receiver device of the packet.

If the Message Manager module500determines806that the wireless node102that received the packet encapsulating the information content is actually the intended receiver device of the packet, the Message Manager module500reads808the encapsulated information content, and the Mesh Forwarder sub-module506send810a confirmation to a sender of the information content where the information content was created. Otherwise, if the Message Manager module500determines806that the wireless node102that received the packet is not the intended receiver device of the packet, the Mesh Forwarder sub-module506pushes812the packet encapsulating the information content to a mesh forwarding queue for forwarding to peer nodes.

If the Mesh Forwarder sub-module506determines814that the encapsulated information content does not need to be forwarded to nearby peer(s), the Mesh Forwarder sub-module506discards the packet encapsulating the information content. If the Mesh Forwarder sub-module506determines814that the encapsulated information content still needs to be forwarded to nearby peer(s), the Mesh Forwarder sub-module506is configured to check whether the packet encapsulating the information content has been elapsed or not.

If the Mesh Forwarder sub-module506determines816that ‘Accumulated hops’ is greater than zero and propagation attribute of the packet is less than a defined ‘Propagation Limit’, if the Mesh Forwarder sub-module506determines818that ‘Time-To-Live’ is less than a defined elapsed time, i.e., Actual Time−Sender Time (equal to ‘Timestamp’), if the Mesh Forwarder sub-module506determines820that a time for sharing the packet (which is also included as an attribute into the packet) has not been elapsed, and if the Mesh Forwarder sub-module506determines822that there is at least one new peer node that has not received the packet with the encapsulated information content, the Mesh Forwarder sub-module506is configured to send824the packet with the encapsulated information content to one or more peer nodes.

If the Mesh Forwarder sub-module506determines816that Accumulated hops' is equal to zero and the defined Propagation Limit of the packet has been reached or exceeded, if the Mesh Forwarder sub-module506determines818that ‘Time-To-Live’ of the packet has been elapsed, or the Mesh Forwarder sub-module506determines820that the time for sharing the packet has been elapsed, the Mesh Forwarder sub-module506removes826the packet encapsulating the information content from a mesh forwarding queue. If the Mesh Forwarder sub-module506determines822that there is no new peer node that has not yet received the packet with the encapsulated information content, the Mesh Forwarder sub-module506blocks forwarding of the packet, and Mesh Forwarder sub-module506keeps the packet in the mesh forwarding queue. The Mesh Forwarder sub-module506keeps the packet in the mesh forwarding queue until the wireless node102detects presence of a new peer node that has not yet received the packet encapsulating the information content. Then, the Mesh Forwarder sub-module506forwards824the packet to the newly detected peer node. The Mesh Forwarder sub-module506also keeps the packet in the mesh forwarding queue until the packet elapses (e.g., by exceeding a propagation limit, by reaching a hops limit, a duration of the packet is elapsed, or a sharing time of the packet is elapsed). In this case, the Mesh Forwarder sub-module506removes826the elapsed packet from the mesh forwarding queue.

Upon sending824the packet encapsulating the information content, the wireless node102may receive an acknowledgment from a peer node about successful reception of the packet. In an embodiment, the wireless node102receives the acknowledgment only if the peer node is within the wireless range of the wireless node102. If the wireless node102determines828that the acknowledgment is received, the Mesh Forwarder sub-module506removes826the packet from the mesh forwarding queue. Otherwise, if the wireless node102determines828that the acknowledgment is not received and the packet encapsulating the information content was not successfully received by the peer node, the Mesh Forwarder sub-module506keeps the packet encapsulating the information content in the mesh forwarding queue in order to forward the packet to the peer node again in the future.

The various operations of methods described above are performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and/or software component(s) and/or module(s), including, but not limited to a circuit, an application specific integrated circuit (ASIC), or processor.

The various operations of methods described above are performed by any suitable means capable of performing the operations, such as various hardware and/or software component(s), circuits, and/or module(s). Generally, any operations illustrated in the Figures are performed by corresponding functional means capable of performing the operations.

Disclosed embodiments may also relate to an apparatus for performing the operations herein. This apparatus are specially constructed for the required purposes, and/or it may comprise a general-purpose computing device selectively activated or reconfigured by a computer program stored in the computer. Such a computer program is stored in a non-transitory, tangible computer readable storage medium, or any type of media suitable for storing electronic instructions, which are coupled to a computer system bus. Furthermore, any computing systems referred to in the specification may include a single processor or are architectures employing multiple processor designs for increased computing capability.