Doughy
Doughy

Reputation: 4325

Can Android do peer-to-peer ad-hoc networking?

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.

Upvotes: 98

Views: 142778

Answers (10)

Mene
Mene

Reputation: 3799

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.

Upvotes: 0

fatih
fatih

Reputation: 1181

Your answer is Wi-Fi direct which is made available with ICS. Here is a link for explanation in Android doc

Upvotes: 6

CGK
CGK

Reputation: 2662

Support for peer to peer WiFi networking is available since API level 14.

Upvotes: 7

k4dima
k4dima

Reputation: 6251

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

Upvotes: 1

user61051
user61051

Reputation:

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.

Upvotes: 4

Telmo Marques
Telmo Marques

Reputation: 5106

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.

Upvotes: 14

Rabie Jradi
Rabie Jradi

Reputation: 573

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

http://code.google.com/p/adhoc-on-android/

Upvotes: 13

yanokwa
yanokwa

Reputation: 1408

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.

Upvotes: 9

jaxvy
jaxvy

Reputation: 5090

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.

Upvotes: 2

Crowe T. Robot
Crowe T. Robot

Reputation: 2045

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.

http://code.google.com/p/android/issues/detail?id=82

Upvotes: 63

Related Questions