I have made following changes in to my android source code make ad-hoc wifi connection in Android 4.0 with wpa_supplicant_8:
1. In WifiSettings.java file comment the code that does not allow to display IBSS type of stations:
// Ignore hidden and ad-hoc networks.
if (result.SSID == null || result.SSID.length() == 0) { // ||
//result.capabilities.contains(“[IBSS]“)) {
continue;
}
Location of that file is packages/apps/Settings/src/com/android/settings/wifi
2. In wpa_supplicant_8 change the wpa_supplicatn/events.c file :
static struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
int i, struct wpa_scan_res *bss,
struct wpa_ssid *group) {
….
if (bss->caps & IEEE80211_CAP_IBSS) {
wpa_dbg(wpa_s, MSG_DEBUG, “ skip – IBSS (adhoc) “
“network”);
//continue; //Allow IBSS connection.
}
….
}
After making the above changes i was able to connect to ad-hoc stations. ( i have tried with my tethered iphone). Another method to make ad-hoc connection is add the network information in wpa_supplicant.conf file.
|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )
GMT+8, 2024-6-8 14:19 , Processed in 0.119194 second(s), 5 queries , Gzip On, Redis On.
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.