views:

49

answers:

2

Hi All,

I am fairly new to Android and I am trying to use Wi-Fi Adhoc Mode in my application. But I could not find any API or method to set the same. I read a thread in Android Forum and could not come any concrete solution on how to use enable Adhoc mode in Android.I used to use WPA_Supplicant conf file in Linux to enable Adhoc mode.

I would like know if I can enable Wi-Fi Adhoc mode in Android from my application and how to do the same.

Thanks in advance.

A: 

This may help. It's instructions for the HTC Hero (android device) and shows how to modify tiwlan.ini and wpa_supplicant.conf to enable ad-hoc wifi.

http://www.soligard.com/technology/how-to-connect-htc-hero-to-ad-hoc-wifi-network/

Presumably you recognise the adb commands - these are just for transferring the files to and from the device from your development PC and then remount the /system partition - you would probably want to do this programmatically instead. Should be doable with superuser access, dunno if it's possible without.

thomasrutter
Thank You for the information , I will try enabling it using root access.
pavan
A: 

It is not supported currently but the issue has been accepted and should be available in the future.

The file that would need to be modified to make it work is /system/etc/wifi/tiwlan.ini, like thomasrutter mentioned, but it will require root access to modify the file.

Ryan Conrad
Thank You for the information , I will try enabling it using root access.
pavan