  Prolonging the network lifetime is a major consideration in many Internet of
Things applications. In this paper, we study maximizing the network lifetime of
an energy-harvesting LoRa network. Such a network is characterized by
heterogeneous recharging capabilities across the nodes that is not taken into
account in existing work. We propose a link-layer protocol to achieve a
long-lived LoRa network which dynamically enables the nodes with depleting
batteries to exploit the superfluous energy of the neighboring nodes with
affluent batteries by letting a depleting node offload its packets to an
affluent node. By exploiting the LoRa's capability of adjusting multiple
transmission parameters, we enable low-cost offloading by depleting nodes
instead of high-cost direct forwarding. Such offloading requires
synchronization of wake-up times as well as transmission parameters between the
two nodes which also need to be selected dynamically. The proposed protocol
addresses these challenges and prolongs the lifetime of a LoRa network through
three novel techniques. (1) We propose a lightweight medium access control
protocol for peer-to-peer communication to enable packet offloading which
circumvents the synchronization overhead between the two nodes. (2) We propose
an intuitive heuristic method for effective parameter selections for different
modes (conventional vs. offloading). (3) We analyze the energy overhead of
offloading and, based on it, the protocol dynamically selects affluent and
depleting nodes while ensuring that an affluent node is not overwhelmed by the
depleting ones. Simulations in NS-3 as well as real experiments show that our
protocol can increase the network lifetime up to $4$ times while maintaining
the same throughput compared to traditional LoRa network.
