An electronic device, comprising: a network interface configured to wirelessly couple the electronic device to a second target electronic device via an intermediary electronic device in a wireless mesh network; and a processor configured to: establish at least one mesh link to the intermediary electronic device on a data link layer using an IEEE 802.15.4 standard; establish a session with the target electronic device through the intermediary electronic device using a Datagram Transport Layer Security, DTLS, protocol, wherein application layer communication during the session is secured at the electronic device and at the target electronic device using the DTLS protocol; and transmit session packets to the target electronic device via the intermediary electronic device using the IPv6 standard, wherein the electronic device uses a unique IPv6 address to identify itself and a unique IPv6 address to identify the target electronic device, wherein the session packets being routed based on routing data received from the intermediary electronic device, the routing data including a routing table of distances between electronic devices, and wherein the routing table specifies how each node in the wireless mesh network is connected to each other, and specifies which intermediary electronic devices data is transferred to for transferring data from the electronic device to the target electronic devices. a network interface configured to wirelessly couple the electronic device to a second target electronic device via an intermediary electronic device in a wireless mesh network; and a processor configured to: establish at least one mesh link to the intermediary electronic device on a data link layer using an IEEE 802.15.4 standard; establish a session with the target electronic device through the intermediary electronic device using a Datagram Transport Layer Security, DTLS, protocol, wherein application layer communication during the session is secured at the electronic device and at the target electronic device using the DTLS protocol; and transmit session packets to the target electronic device via the intermediary electronic device using the IPv6 standard, wherein the electronic device uses a unique IPv6 address to identify itself and a unique IPv6 address to identify the target electronic device, wherein the session packets being routed based on routing data received from the intermediary electronic device, the routing data including a routing table of distances between electronic devices, and wherein the routing table specifies how each node in the wireless mesh network is connected to each other, and specifies which intermediary electronic devices data is transferred to for transferring data from the electronic device to the target electronic devices. establish at least one mesh link to the intermediary electronic device on a data link layer using an IEEE 802.15.4 standard; establish a session with the target electronic device through the intermediary electronic device using a Datagram Transport Layer Security, DTLS, protocol, wherein application layer communication during the session is secured at the electronic device and at the target electronic device using the DTLS protocol; and transmit session packets to the target electronic device via the intermediary electronic device using the IPv6 standard, wherein the electronic device uses a unique IPv6 address to identify itself and a unique IPv6 address to identify the target electronic device, wherein the session packets being routed based on routing data received from the intermediary electronic device, the routing data including a routing table of distances between electronic devices, and wherein the routing table specifies how each node in the wireless mesh network is connected to each other, and specifies which intermediary electronic devices data is transferred to for transferring data from the electronic device to the target electronic devices.