Is it possible to find a connected device by device discovery? E.g. if device #1 is connected to the device #2, device #3 makes a device discovery, and finds both devices (#1 and #2)?
Is there any implemantation possibility to create situation described above?
Yes and no. If #1 and #2 are in range of #3, it will find both. If #1 is out of range but connected to #2 which is in range, #3 will find only #2. #3 must not find #1 because it is not in range and cannot be contacted. To contact devices over multiple hops, a multihop routing algorithm is needed, which is still very hard to realize.
And if this would be possible, where are the boundaries? You would be able to find hundreds of devices because they are all connected in some way to each other!
If you want to do something like this, you have to do this on application layer. There you have also to do the multihop routing and network topology and everything the bluetooth layer does normally on its own.
I mean that all the devices are in range and #1 and #2 are having a bluetooth session ongoing. Then #3 does a device discovery.
So, as far as I know, the #3 cannot find the either #1 or #2.
The question is: is it possible somehow to implement a Bluetooth connection between two devices so, that the third device can find the either connected device through device discovery?