Patent ID: 7460532

Claim:
A method of providing a routing protocol in a sensor network, the method comprising the steps of: (a1) initializing a routing table; (a2) searching a network device of a node to initialize a host; (b) opening a packet socket when there is a request for forwarding of an IP (Internet Protocol) packet from an upper layer node or when there is a request from the network device; (c) determining whether the request is received from the upper layer node or the IP packet is received from the network device; (d) if the request is received from the upper layer node, searching the routing table to determine whether or not there is a destination node which intends to transmit the IP packet, and returning to the step (c) if there is the destination node; and (e) if the IP packet is received from the network device, determining a type of the received IP packet and performing an RREQ (route request) process, an IDLE process, an RREP (route reply) process, an RERR (route error) process, and an RREP_ACK (route reply acknowledgement) process, wherein the step (e) includes steps of: (f) if the received IP packet is RREQ, extracting an energy field value of an RREQ message and determining whether the energy field value is ‘0’ or not; (g) if the energy field value is ‘0’, setting the RREO packet to ‘10’ in an amount of energy, and if the energy field value is not ‘0’, checking whether a current node has processed the RREO; (h) if the current node has never processed the RREQ, measuring an amount of energy at the current node and comparing the measured amount of energy with a first threshold value; (i) if the amount of energy at the current node is smaller than the first threshold value, determining whether or not a difference between the energy of the current node and the energy field value of the received RREQ packet is larger than a second threshold value, and if smaller, setting the energy field value of the RREQ packet to ‘10’, and if larger, setting the energy field to an IDLE message; and (j) if the amount of energy at the node is larger than the second threshold value, forwarding the RREQ packet to next node in the same manner as a general RREQ packet forwarding.