In an ad hoc network connection establishment is done to secure a path for routing packets from source to destination. This path is then maintained to secure further transmissions. In the case of Wireless Personal Area Networks (WPAN) which are more flexible, this is not usable. This is especially the case for Bluetooth. Some constraints in Bluetooth demands a more flexible on-demand ad hoc network compared to other types of ad hoc network protocols. Initially we found that creating a scatternet is not practically possible using Bluetooth version 1.1. The slave/slave bridge is not implemented into the hardware to create a scatternet. In this paper, we present a modified version of the Reverse Path Forwarding (RPF) algorithm to make it suitable for Bluetooth routing. With an on-demand ad hoc network solution together with the modified RPF algorithm we present a suitable solution for Bluetooth packets to be routed in a flexible ad hoc network. To be able to test the modified RPF and the on-demand ad hoc network, a test platform has also been developed.