資源描述:
《android dhcp獲取ip失敗分析解決》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、android通過DHCP獲取IP初步流程====================================================================1.java中實現(xiàn)log的方法是Log.v(TAG,"StaticIPconfigurationsucceeded");D/WifiStateTracker(860):DhcpHandler:DHCPrequeststarted發(fā)生在./frameworks/base/wifi/java/android/net/wifi/WifiStateTracker.java:22852.java層運行dhcp的地方有兩
2、個./frameworks/base/ethernet/java/android/net/ethernet/EthernetStateTracker.java./frameworks/base/wifi/java/android/net/wifi/WifiStateTracker.java定義在./frameworks/base/core/java/android/net/NetworkUtils.javarunDhcp的jni實現(xiàn)./frameworks/base/core/jni/android_net_NetUtils.cpp:231對應(yīng)的函數(shù)是android_net_util
3、s_runDhcp,此函數(shù)會調(diào)用dhcp_do_request,dhcp_do_request定義在./system/core/libnetutils/dhcp_utils.c中3.rt3070wifi驅(qū)動適配層在./hardware/libhardware_legacy/wifi/wifi_ralink3070.cEthernet分析1.EthernetNative.java的jni在./frameworks/base/core/jni/android_net_ethernet.cpp故障描述:(android手機)LGP350連接wifi(wlan)時若使用動態(tài)ip分配,則總停留
4、在“正在從[SSID名稱]獲取IP地址”,然后獲取失敗,自動斷開。反復(fù)重新連接均如此。設(shè)置靜態(tài)IP則可以連接。good,noloosening.6.5.2DCSsidewiringtocompletetheenclosureandtheothersideafterthewiringiscompleted,DCSwithintheenclosurewhenthepowermoduleshouldbeloosenedorthepowergoesout.6.6lowvoltagecableterminalmaking6.6.1first排查過程:(1)搜索引擎輸入“LGP350wifiob
5、tainipfail”,無有效信息。(2)刷包,刷了3個官方KDZ(V10K_00,V10N_00,V10P_00),無果。(3)今天反編譯關(guān)系,得學(xué)android調(diào)試技術(shù),adblogcat時發(fā)現(xiàn)DHCP獲取ip時,提示有文件無權(quán)限打開,接著就是超時失敗。關(guān)鍵部分信息摘錄如下:D/NetworkStateTracker(1372):setDetailedstate,old=AUTHENTICATINGandnewstate=OBTAINING_IPADDR…...D/WifiStateTracker(1372):DhcpHandler:DHCPrequeststarted….E/d
6、hcpcd?(9576):open`/data/misc/dhcp/dhcpcd-wlan0.pid':Permissiondenied…...V/WifiStateTracker(1372):Changingsupplicantstate:COMPLETED==>DORMANTD/WifiStateTracker(1372):ResetconnectionsandstoppingDHCP…….D/WifiStateTracker(1372):DisablinginterfaceD/NetworkStateTracker(1372):setDetailedstate,old=OBTA
7、INING_IPADDRandnewstate=FAILEDE/WifiInfo(1372):setSSIDnull…….V/WifiStateTracker(1372):NewnetworkstateisDISCONNECTEDV/WifiStateTracker(1372):Changingsupplicantstate:DORMANT==>DORMANTE/WifiInfo(1372):getSSIDnullgood,noloosening.6.5.