Patent ID: 7969914

Claim:
A method for establishing an ad-hoc network comprising a plurality of nodes, where one of the nodes is pre-designated as a root node that constitutes a relay node and said root node periodically broadcasts a heartbeat message which includes an indirection number that indicates the root node being at a first level, said method comprising each non-root node n j of the plurality of nodes, wherein n represents a non-root node, and j represent an integer value greater than 1, repetitively executing the steps of: listening for heartbeat messages, to identify relay nodes of said network that are in neighborhood of said node n j , wherein said heartbeat message further comprises a number representing how long has it been since node n j had its connection to the root confirmed, and how far it has moved geographically since it had its connection to the root confirmed, when node n j is not yet connected to the network and it hears heartbeat messages, selecting a relay node corresponding to one of the heard heartbeat messages as an uplink relay node of said node n j , and assigning to itself an indirection number that is one greater than the indirection number found in the heartbeat message of the selected uplink relay node; when node n j is not a relay node and a first preselected condition is met, conditioning itself for repetitive broadcasting of a heartbeat message that includes the node's own indirection number, thereby becoming a relay node; when node n j is a relay node, while a second preselected condition is not met, broadcasting a heartbeat message; when node n j is a relay node and said second preselected condition is met, conditioning itself to stop broadcasting said heartbeat messages, thereby ceasing to be a relay node.