Is it possible to set up Android in ad-hoc peer-to-peer wifi mode? For example, I would like to have one phone broadcast a message, and have all peers in the network receive the broadcast, without having a server. I would like to use wifi since bluetooth range is more limited.
11 Answers
Here's a bug report on the feature you're requesting.
It's status is "reviewed" but I don't believe it's been implemented yet.
-
21Please vote this bug up, anyone who has an interest in Ad Hoc on Android - I've got an app idea that's much trickier because of the lack of ad hoc Nov 7, 2010 at 2:38
Although Android can't find and connect to ad-hoc networks it sure can connect to Access Points. So as a work-around you can turn your Wireless Card into an Access Point using, for example, Connectify.
-
3
-
Best answer! This worked quickly and flawlessly. Connectify is very cool. Apr 12, 2011 at 14:43
-
1
my friend and I are currently developing a java library implementing the AODV protocol (multihop routing suitable for mobile networks), in our bachelor thesis. The final 'product' includes a easy way to create/join an adhoc network on several android devices and an interface through the library, to send and receive messages. Unfortunately each type of phone such as hero, nexsus one... have a phonedepended way for createing a adhoc network so currently we are only supporting a few phones).
this means that once this project is finished, people with rooted phones can implement their distributed applications (file sharing, games, ...) by simply including the library .jar file in their android projects.
it's all open source by the way
-
1totally forgot this post, sorry. If anyone is interested, we have just handed in our thesis today (written in English!), and i would be glad to share information. My mail is jradi88@gmail.com Aug 16, 2010 at 23:01
-
1I have uploaded the source code and documentation (a report) to code.google.com/p/adhoc-on-android Aug 18, 2010 at 9:55
-
-
If you want to support other devices the only way to go unfortunately, is to implement the required commands (depends the phone!) for setting up and tearing down an ad-hoc network and compile a new C library based on the startstopadhoc.c (the file you need to modify). You can find the source code here: code.google.com/p/adhoc-on-android/source/browse/trunk/jni/… If you are lucky the commands you need to execute may be similar as the setup as Nexus One, so simply using the existing compiled C library may be all you need. Jul 30, 2014 at 13:21
-
We basically got help to find out which commands are needed for setup by looking that the following project code.google.com/p/android-wifi-tether Jul 30, 2014 at 13:29
you can connect your android device to a known ad-hoc network.
edit /system/etc/wifi/tiwlan.ini
WiFiAdhoc = 1
dot11DesiredSSID = <your_network_ssid>
dot11DesiredBSSType = 0
edit /data/misc/wifi/wpa_supplicant.conf
ctrl_interface=tiwlan0
update_config=1
eapol_version=1
ap_scan=2
if that is too simplistic, see these instructions.
-
2This ONLY works with devices that use a Texas Instruments WIFI implementation and does NOT work without root, and does not work on every device. Aug 28, 2011 at 16:36
Support for peer to peer WiFi networking is available since API level 14.
-
2
-
1I think it works only on Wifi direct devices. As it is a new hardware feature that is available only on phones these days, we can't use it to connect to laptops.– abatJan 5, 2013 at 23:48
Your answer is Wi-Fi direct which is made available with ICS. Here is a link for explanation in Android doc
It might work to use JmDNS on Android: http://jmdns.sourceforge.net/
There are tons of zeroconf-enabled machines out there, so this would enable discovery with more than just Android devices.
-
1Although this link is very useful, it does not answer the question at all. ZeroConf DNS != Ad Hoc wireless. Aug 28, 2011 at 18:45
I don't think it provides a multi-hop wireless packet routing environment. However you can try to integrate a simple routing mechanism. Just check out Wi-Share to get an idea how it can be done.
Yes, but:
1. root your device (in case you've got Nexus S like me, see this)
2. install root explorer (search in market)
3. find appropriate wpa_supplcant file and replace (and backup) original as shown in this thread
above was tested on my Nexus S I9023 android 2.3.6
-
well that's nice @kreker... so you could use wifi peer to peer using android 2.3 ? good! Could you share the tutorial for us?– gumuruhApr 24, 2014 at 7:53
-
In addition to Telmo Marques answer: I use Virtual Router for this.
Like connectify it creates an accesspoint on your Windows 8, Windows 7 or 2008 R2 machine, but it's open-source.