System-on-chip (SoC) design is extensively used in the Internet of Things (IoT) devices, cyber-physical systems, and embedded systems. However, due to the increasing complexity of on-chip components and the long supply chain, SoC devices, such as ESP8266 IoT devices, are vulnerable to numerous cyber-attacks. Consequently, developing and implementing security solutions for protecting these devices and their Device-to-Device (D2D) communications is increasingly becoming crucial. For the first time, this paper presents and investigates securing D2D communication of limited resources ESP8266 IoT devices in Wireless Mesh Network(WMN) using ultra light-weight encryption algorithms, including Speck Small and Diffie-Hellman key exchange using Curve 25519. This is important for protecting these limited-resources devices' data confidentiality and integrity in critical applications. The experiment results prove that Speck Small and Curve25519 are more efficient than other core algorithms in computation time, demonstrating their suitability for ESP8266 IoT devices in WMN.