Home > Back-end >  Android Nearby Connection - Keeping wifi direct connection, reconnection with more than 4 devices
Android Nearby Connection - Keeping wifi direct connection, reconnection with more than 4 devices

Time:04-22

We're building an app for sending image payload between 1 to 4~5 devices using STAR strategy. and we are keeping the connection as much as possible, and faster is better for sharing images along the devices. As we tested more than 6 devices, after 4~5 devices connected to host device, link was not upgraded to wifi direct anymore. I guess it is restricted from code level for a performance.

But things happen when first connected device was reconnected. As our expect, when 3 devices connect to host and 1 reconnect device, it should be upgraded to wifi cuz wifi direct slots(?) are enough. But actually not. Somehow, it is treated as 5nd connected device so it cannot be promoted to wifi slot. even if we gave some minutes to be upgrade.

Is there a way to ensure that devices are maintained with Wifi direct?

CodePudding user response:

There's no limitation within Nearby Connections for the number of devices we upgrade to WiFi Direct. Any limitations you're hitting are likely device specific.

I'd recommend looking at the logs (adb logcat NearbyConnections:* NearbyMediums:* *:S) to see if anything jumps out at you. They're quite verbose and relatively easy to follow along. If I'm right, and the problem is lower in the stack, turn on WiFi Verbose Logging and Bluetooth HCI Logs inside developer options (and then reboot), to get more logging at the platform layer.

  • Related