Information networks organized according to Internet of Things (IoT) mesh topology have received great recognition over the past one and a half to two decades of years. The scale of projects grows from millions of users connected to hundreds of thousands of access points. IoT mesh nodes offer more fascinating regulations linking a variety of networks and radio technologies and therefore fully meet the ever-growing requirements of subscribers as mobility, quality of service (QoS) and the security. The possibility of organizing local or metropolitan networks using a mesh network topology, desegregating into wide area networks without any difficulty or effort, is considered a tempting condition for urban and individual users. This article, introduces optimal routing protocol for IoT Wireless Mesh Network (WMN) by optimizing the channel and frequency resources of the network based on mathematical calculations for resource allocation. We propose an approach to the synthesis of mesh networks, which allows determining the required number of connections between network nodes, as well as their channel width for a given frequency range while ensuring the minimum data transmission delay time. Optimization results show that the function value is improved for more than 16% and the proposed algorithm provides the most rational use of the allocated frequency range.