Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to connect my android phones (two Galaxy s2 and two nexus1 phones) in adhoc mode through wifi connection. Something like peer to peer network so that I can transfer messages with mobiles in my adhoc through wi-fi connection.

Does android support creating an adhoc connection?

share|improve this question
up vote 1 down vote accepted

It might be possible with an app, but it's not built in. Can't you create an ad-hoc network on a computer, then connect the phones?

share|improve this answer
yeah I tried connecting to adhoc created on my laptop. I rooted my phone, and made use of wpa_supplicant file (which I found online). I am able to see the adhoc network. But it gets stuck at obtaining IP address.. IT doesnot go further. – SyncMaster Feb 5 '12 at 13:49
it could be stuck at obtaining IP because you don't have DHCP enabled on the laptop. You will need to use static IP addresses on the devices if DHCP isn't available on the laptop. – Ryan Conrad Feb 5 '12 at 14:09
thanks for pointing that out Ryan. I will try using static ip. – SyncMaster Feb 5 '12 at 17:26

There is no such thing on Android's menus, but since Android is Linux based you can run a few commands on ADB in order to do that (phones must be rooted though).

if you have some knowledge with Linux command line you may know ifconfig and iwconfig:

ifconfig wlan0 up
iwconfig mode auto;iwconfig wlan0 essid "your SSID" channel 11 mode auto
ifconfig wlan0 10.0.0.x netmask

Where your SSID should be replaced with the name of your Adhoc network, and 10.0.0.x is a different IP you give each device.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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