Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect android wifi to adhoc wifi?

I'm new on the android system. Is this correct, the android 2.2.1 WIFI only detects non-ad hoc wireless network? I was wondering if there's a way to connect my android to an ad hoc network set-up from my laptop.

like image 221
Cyril Horad Avatar asked Feb 24 '11 05:02

Cyril Horad


People also ask

Can Android phone connect to ad hoc network?

Android phones and Android tablets cannot connect to Ad Hoc networks, by default.

Can Android connect to two Wi-Fi networks?

You can only be connected to one network at the time. However, there is a standard called WiFi direct that will allow you to do what you are asking for, but it isn't yet implemented in Android.


2 Answers

You are correct that this is currently not natively supported in Android, although Google has been saying it will be coming ever since Android was officially launched.

While not natively supported, the hardware on every android device released to date do support it. It is just disabled in software, and you would need to enable it in order to use these features.

It is however, fairly easy to do this, but you need to be root, and the specifics may be slightly different between different devices. Your best source for more informationa about this, would be XDA developers: http://forum.xda-developers.com/forumdisplay.php?f=564. Most of the existing solutions are based on replacing wpa_supplicant, and is the method I would recommend if possible on your device. For more details, see http://szym.net/2010/12/adhoc-wifi-in-android/.

Update: Its been a few years now, and whenever I need an ad hoc network connection on my phone I use CyanogenMod. It gives you both programmatic and scripted access to these functions, and the ability to create ad hoc (ibss) networks in the WiFi settings menu.

like image 62
Andy Avatar answered Oct 05 '22 17:10

Andy


If you specifically want to use an ad hoc wireless network, then Andy's answer seems to be your only option. However, if you just want to share your laptop's internet connection via Wi-fi using any means necessary, then you have at least two more options:

  1. Use your laptop as a router to create a wifi hotspot using Virtual Router or Connectify. A nice set of instructions can be found here.
  2. Use the Wi-fi Direct protocol which creates a direct connection between any devices that support it, although with Android devices support is limited* and with Windows the feature seems likely to be Windows 8 only.

*Some phones with Android 2.3 have proprietary OS extensions that enable Wi-fi Direct (mostly newer Samsung phones), but Android 4 should fully support this (source).

like image 37
Silveri Avatar answered Oct 05 '22 17:10

Silveri