I have some questions:
1. How does the process of getting addresses to the Nodes happen in Mesh stack? Is it automatically or I need to set it when I flashed the firmware?
2. After set-up a working Mesh Network ,Can I connect to one of the Nodes in the Mesh Network with Smartphone?
What do you mean by this question? Could you elaborate?
Yes, it is possible to connect to a node with a smartphone. You need to have the proxy featured enabled in your application. After provisioning, the proxy server(your application) starts advertising a connectable proxy beacon, which can be connected to by a proxy client(your smartphone) to interact with the mesh. The proxy client acts like any other mesh device, but sends all its mesh communication over a BLE connection to a proxy server, which relays it into the mesh.
You would need to develop an app, or you can have a look at our nRF Mesh app.
For the first question I meant who is distribute unique ID (addresses) to the nodes in the mesh network Is it the Gateway?
And whether this was done in the initial process of provisioning.
I assume you mean the unicast addresses, these are provided by the provisioner. And is allocated to each element in a node during provisioning.