can we get android devices in ad-hoc mode using WIFI-card but without access internet ? i mean to connect peers to send and receive messages between them but without having internet connection ?

i see this link talk about wpa_supplicant.conf to enable ad-hoc mode, but it seems that there are problems in this thing.

and see this command iwconfig but this doesn't support on android !!

4 Answers 4


Ad-hoc is not natively supported by Android. But starting with Android 4.0 (Ice Cream Sandwich), a new feature called WiFi Direct was introduced:

Wi-Fi Direct, previously known as Wi-Fi P2P, is a standard that allows Wi-Fi devices to connect to each other without the need for a wireless access point. This allows Wi-Fi Direct devices to directly transfer data between each other with greatly reduced setup.

(Source: Wikipedia)

Support for Wi-Fi Direct lets users connect directly to nearby peer devices over Wi-Fi, for more reliable, higher-speed communication. No internet connection or tethering is needed. Through third-party apps, users can connect to compatible devices to take advantage of new features such as instant sharing of files, photos, or other media; streaming video or audio from another device; or connecting to compatible printers or other devices.

(Source: Android.Com)

To me, this looks like what you are asking for: directly connecting two Android devices via WiFi without the need of a "mediator".


While you can solve the ad-hoc wifi connection issue, I think your bigger problem is on the application level. All standard messaging applications do use some sort of a server to send the messages. Without the internet access you would have to set up your own server and at this point the ad-hoc wifi issue becomes a moot point - you will still need some infrastructure (the server) to be able to send the messages - why not the wifi access point then?

  • ok can i go low level to make this thing ? can i enter the native code and linux to do this ?
    – H.H
    Mar 5, 2013 at 8:26

ad-hoc mode used to be supported in the Cyanogen ROMS, it is not in the stock images AFAIK.

Depending on your application, you might use Wifi Direct but I think it's a different API (rather than just behaving like an ethernet segment) and it does not cover all the uses cases that ad-hoc does.


Wifi direct is not wifi in ad hoc mode. Wifi Direct (p2p) is build over Soft Acces Point and make one of the device as "mediator" (call Group Owner). I had the same issue for one of my dev.

Wifi Direct is very interesting for dev betwenn many device without acces point but it still a application client/server

  • 1
    Are you commenting on another answer or attempting to answer the original question?
    – ale
    Apr 14, 2013 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .