Is xbee firmware already having any inbuilt protocol to form mesh network?

Actually after flashing xbee s2 modules with znet 2.5 firmware one as Coordinator, 2 routers and 2 end devices…
They are getting some network address while using in API mode(I confirmed with transmit status paket using arduino xbee library)…

My question is will they automatically form mesh network or do we need to form a mesh network among modules using API mode coding?

First off, the product you are referring to is a Mesh based product and will form a mesh on its own.

Next, the Znet 2.5 code you are referencing is about 5 years out of date and not supported. I would strongly suggest updating to the current 2xA7 Zigbee based code.

As for API mode. API mode is not required. API mode is only an extension of the radios firmware which uses Frame based communications for the data flow in and out of the UART of that specific module. Both AT and API versions will perform a mesh network and will use the lowest path cost to send the data from Point A to point D.

Hi mvut,
What is the “path cost” used here?