2

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?

1

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?

  • 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
3

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 255.255.255.0

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.

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.