I have a Sony Ericsson Arc S, running on Android 4.0.4

I rooted my cellphone and added android.hardware.wifi.direct.xml in /system/etc/permissions/.

I can see the WiFi Direct option in my Settings. When I enable WiFi Direct, it shows that WiFi Direct is opened, but the WiFi is disabled. If I enable WiFi, my WiFi Direct changes to disabled.

When I run WiFiDirectDemo, it fails when I enable WiFi Direct. Once it reaches discoverPeers, WifiP2pManager.ActionListener returns 'Discovery Failed : reason Code is 0'.

I don't know what happened. Does anybody know how to enable WiFi Direct for my phone? Or is it impossible? Why?

  • Is this a programming question? If so, it should be in StackOverflow.com – geffchang Jan 10 '13 at 14:28
  • @geff_chang it does not appear to be. It looks like Tony is trying to use Wifi Direct, after putting the Wifi Direct xml file in place. – ZnewmaN Jan 10 '13 at 14:34
  • @Tony I think you can't use it due to any old hardware. From XDA dev you can try a tweak. – avirk Jan 10 '13 at 14:37
  • @ZnewmaN Thanks. I was just curious about the WiFiDirectDemo, and the mention of ActionListener. – geffchang Jan 10 '13 at 14:40
  • 4
    This is the behavior on a lot of devices. You can see that it turns off on the device in this post as well. The Wifi chip in the device has to support running in both "modes" at the same time. – Ryan Conrad Jan 10 '13 at 14:44

Very possibly my solution has nothing to do with the real problem of this person, but the topic is the same, so I consider this answer may help someone:

It is very common nowadays for AP's (access points) to have dual-band frequency 2,4Ghz and 5Ghz and to assign same SSID for both bands. Not all devices have 5Ghz support and, even having it, they may choose the 2,4Ghz band, since they may have bad signal at their current spot for the 5Ghz. The point is that if you are accessing your LAN from a different AP, or using different bands in the same AP with each device, your devices won't be able to use wifi-direct without engaging an adhoc connection between them, thus they will disable the wifi connection to your AP. The simple solution is to use different SSIDs for each band, and connect with both devices to the same SSID (if both can connect to 5Ghz, go for it).

Different combinations:

  • A) different AP's same local network - wifi turned off to adhoc between devices
  • B) same AP different band - wifi turned off to adhoc between devices
  • C) same AP same band - bingo! wifi stays on in infraestructure with my AP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.