In this paper we propose a distributed algorithm to construct a scatternet for multi-hop ad hoc networks of Bluetooth devices. This algorithm is fully distributed and does not require the nodes in the networks being in-range (i.e., each pair of nodes in the network may be unable to communicate with each other directly). The role-selection process in existing scatternet formation mostly uses the strategy of message exchange and comparing their weights like IDs or power strength. This results in a large amount of control messages to be sent and a longer scatternet formation time. In our algorithm, the role selection procedure is simple. Nodes can decide their role by a randomly generated counter rather than their 'weights'. According to the proposed approach, nodes can determine their role of either a master or a slave of the piconet without recognizing its neighbors' 'weight'. The algorithm performs better time and reduces the number of control messages remarkably during the role-selection process. In this paper, we also define the gateways of 2-hops and 3-hops for evaluating the distance between two piconets.