WifiP2pManager return BUSY state on CreateGroup

android, android-wifi, java, wifi-direct

Solution

In my case I was getting this error because I was not removing the group before trying to create it again. In that case the WifiManager is returning a BUSY state. But once i tried to close the group before recreating a new one it works fine.

Hope this helps someone.

Problem

sometime when I try to create a group in WifiDirect it returns back ``` WifiP2pManager.BUSY ``` message as reason for failure. I am not sure why this happens. But if I restart the WIFI interface it will again work. What could be the possible reason for this? How this can be avoided? is there any way to overcome this if it ever happens? Thanks

Original source