开发者

Is Wi-Fi Adhoc Mode operation supported in Android?

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.


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.


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://blog.joint.net/2009/07/connecting-android-phone-through-adhoc.html?showComment=1277115947367#c3774826726667256208

And for what to add to the tiwlan and wpasupplicant files, see here:

http://modmymobile.com/forums/491-root-access/544146-connect-g1-ad-hoc-network-solved.html

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜