前回から2ヶ月近く経過してしまったが, 第3回は各種設定ファイルの変更や動作ログの解説などを行っていく.
1. 設定ファイルの変更
1.1 ./vender/asus/eeepc/BoardConfig.mk
サスペンド機能を有効にすると, サスペンドから復帰した際にWLANモジュールが正常に復帰しなかったので, サスペンド機能をOFFした.
:
LOCAL_PATH := $(call my-dir)
TARGET_DISK_LAYOUT_CONFIG := $(LOCAL_PATH)/disk_layout.conf
BOARD_KERNEL_CMDLINE := root=/dev/ram0 androidboot.hardware=eeepc acpi_sleep=s3_bios,s3_mode
BOARD_BOOTIMAGE_MAX_SIZE := 8388608
:
1.2 ./vender/asus/eeepc/system.prop
wlan.interfaceを"eth1"に設定する.
:
ro.simulated.phone=true
# Wi-Fi settings
wifi.interface=eth1
# end system.prop for eeepc
1.3 ./vender/asus/eeepc/init.rc
dhcp, wpa_supplicantについてサービスの追加, 修正を行う.
DHCPクライアントは. 有線LANはdhcpcdeth0, 無線LANはdhcpcdeth1となる.
:
### Load some modules
on boot
# basic network init
ifup lo
ifup eth1
hostname localhost
domainname localdomain
:
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -ieth1 -c /data/misc/wifi/wpa_supplicant.conf -dd
group system wifi
disabled
# oneshot
:
service dhcpcdeth1 /system/bin/logwrapper /system/bin/dhcpcd eth1
group system dhcp
disabled
oneshot
on property:init.svc.wpa_supplicant=stopped
stop dhcpcdeth1
1.4 ./external/dhcpcd/android.conf
WLANインタフェース名を"eth1"に変更する.
# dhcpcd configuration for Android Wi-Fi interface
# See dhcpcd.conf(5) for details.
interface eth1
# dhcpcd-run-hooks uses these options.
option subnet_mask, routers, domain_name_servers
1.5 ./external/wpa_supplicant/Android.mk
wpa_cli, libwpa_clientのmake記述にcommon.cが抜けているので追加する.
:
INCLUDES = external/openssl/include frameworks/base/cmds/keystore
OBJS = config.c common.c md5.c md4.c rc4.c sha1.c des.c if_index.c
OBJS_p = wpa_passphrase.c sha1.c md5.c md4.c common.c des.c
OBJS_c = wpa_cli.c wpa_ctrl.c common.c
:
include $(CLEAR_VARS)
LOCAL_MODULE = libwpa_client
LOCAL_CFLAGS = $(L_CFLAGS)
LOCAL_SRC_FILES = wpa_ctrl.c os_unix.c common.c
LOCAL_C_INCLUDES = $(INCLUDES)
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_COPY_HEADERS_TO := libwpa_client
LOCAL_COPY_HEADERS := wpa_ctrl.h
include $(BUILD_SHARED_LIBRARY)
1.6 ./external/wpa_supplicant/wpa_supplicant.conf
networkには, 接続するAPの情報を記述する.
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=system
update_config=1
#ctrl_interface=wlan0
network={
ssid="XXXXXXX"
key_mgmt=NONE
priority=1
}
2. ビルド
ビルドは, Android-x86をビルドするを参照ください.
$ make -j2 usb_img TARGET_PRODUCT=eeepc
3. 動作ログ解説
Androidで無線LAN接続にチャレンジ!! (1)のWi-Fi制御の下回りの関係なども参照しながら見ていただくとよい.
注) 動作ログをすべて掲載しようと思ったが, ブログの文字数制限にひっかかったので, 冗長な部分や直接関連のない部分は省略している.
3.1 WiFiドライバのロード
ConnectivityService→WifiServiceからwifi_load_deriver()がコールされ, WLANドライバソフトのロードが行われる.
V/ConnectivityService( 2227): ConnectivityService starting up
V/ConnectivityService( 2227): Starting Wifi Service.
I/WifiService( 2227): WifiService starting up with Wi-Fi enabled
// wifi_load_dirver()コール
I/WifiHW ( 2227): Loading WiFi Modules
// WLANドライバーをロード
I/WifiHW ( 2227): insmod : /lib/modules/wlan_if.ko
D/vold ( 2203): [UEVENT] Sq: 2093 S: module A: 0 P: /module/wlan_if
D/vold ( 2203): DEVPATH=/module/wlan_if
D/vold ( 2203): No uevent handlers registered for 'module' subsystem
I/WifiHW ( 2227): insmod : /lib/modules/wlan_sdio.ko
D/vold ( 2203): [UEVENT] Sq: 2094 S: module A: 0 P: /module/wlan_sdio
D/vold ( 2203): DEVPATH=/module/wlan_sdio
D/vold ( 2203): No uevent handlers registered for 'module' subsystem
D/vold ( 2203): [UEVENT] Sq: 2095 S: drivers A: 0 P: /bus/sdio/drivers/wlan_sdio
D/vold ( 2203): DEVPATH=/bus/sdio/drivers/wlan_sdio
D/vold ( 2203): No uevent handlers registered for 'drivers' subsystem
// WLANデバイスの起動完.
I/WifiHW ( 2227): driver startup OK
I/WifiHW ( 2227): start wifi_start_supplicant
I/WifiHW ( 2227): ensure_config_file_exists
:
3.2 APへの接続
WLANデバイスが動作すると, wpa_supplicantによりAPへの接続が行われる.
// wpa_supplicantのスタートを指示.
I/WifiHW ( 2227): start wifi_start_supplicant
I/WifiHW ( 2227): ensure_config_file_exists
// AP接続(wpa_supplicant)開始.
D/wpa_supplicant( 2314): wpa_supplicant start
D/wpa_supplicant( 2314): wpa_supplicant_init
D/wpa_supplicant( 2314): wpa_supplicant_global_ctrl_iface_init()
D/wpa_supplicant( 2314): Initializing interface 'eth1' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
// wpa_supplicant.confの読み込み
D/wpa_supplicant( 2314): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 2314): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 2314): ctrl_interface='DIR=/data/system/wpa_supplicant GROUP=system'
D/wpa_supplicant( 2314): update_config=1
D/wpa_supplicant( 2314): Priority group 1
D/wpa_supplicant( 2314): id=0 ssid='XXXXX'
// eth1初期化
D/wpa_supplicant( 2314): Initializing interface (2) 'eth1'
D/wpa_supplicant( 2314): EAPOL: SUPP_PAE entering state DISCONNECTED
D/wpa_supplicant( 2314): EAPOL: KEY_RX entering state NO_KEY_RECEIVE
D/wpa_supplicant( 2314): EAPOL: SUPP_BE entering state INITIALIZE
D/wpa_supplicant( 2314): EAP: EAP entering state DISABLED
D/wpa_supplicant( 2314): EAPOL: External notification - portEnabled=0
D/wpa_supplicant( 2314): EAPOL: External notification - portValid=0
D/wpa_supplicant( 2314): wpa_driver_wext_init()
D/wpa_supplicant( 2314): wpa_driver_wext_finish_drv_init()
D/wpa_supplicant( 2314): wpa_driver_wext_flush_pmkid
D/wpa_supplicant( 2314): wpa_driver_wext_pmksa
D/wpa_supplicant( 2314): wpa_driver_wext_set_mode
D/wpa_supplicant( 2314): wpa_driver_wext_get_ifflags_ifname()
D/wpa_supplicant( 2314): wpa_driver_wext_set_ifflags()
D/wpa_supplicant( 2314): wpa_driver_wext_set_ifflags_ifname()
:
D/wpa_supplicant( 2314): wpa_driver_wext_event_wireless(len=50)
D/wpa_supplicant( 2314): Wireless event: cmd=0x8c02 len=50
D/wpa_supplicant( 2314): wpa_driver_wext_event_wireless_custom(XXX(SCANNOTIFICATION,policy=0x2,jobid=0x0))
D/wpa_supplicant( 2314): State: DISCONNECTED -> SCANNING
I/wpa_supplicant( 2314): CTRL-EVENT-STATE-CHANGE id=-1 state=2
// APのスキャン開始
W/wpa_supplicant( 2314): Starting AP scan (broadcast SSID)
W/wpa_supplicant( 2314): Trying to get current scan results first without requesting a new scan to speed up initial association
D/wpa_supplicant( 2314): wpa_supplicant_event: event=3
D/wpa_supplicant( 2314): wpa_supplicant_event_scan_results
D/wpa_supplicant( 2314): wpa_driver_wext_get_scan_results()
D/wpa_supplicant( 2314): wpa_scan_result_compar()
D/wpa_supplicant( 2314): Received 751 bytes of scan results (2 BSSes)
// AP 2つ発見
D/wpa_supplicant( 2314): Scan results: 2
I/wpa_supplicant( 2314): CTRL-EVENT-SCAN-RESULTS Ready
D/wpa_supplicant( 2314): Selecting BSS from priority group 1
D/wpa_supplicant( 2314): Try to find WPA-enabled AP
D/wpa_supplicant( 2314): 0: 00:12:23:34:45:56 ssid='YYYYY'' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
D/wpa_supplicant( 2314): skip - no WPA/RSN IE
D/wpa_supplicant( 2314): 1: 00:55:66:77:88:99 ssid='XXXXX' wpa_ie_len=0 rsn_ie_len=0 caps=0x1
D/wpa_supplicant( 2314): skip - no WPA/RSN IE
D/wpa_supplicant( 2314): Try to find non-WPA AP
D/wpa_supplicant( 2314): 0: 00:12:23:34:45:56 ssid='YYYYY' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
D/wpa_supplicant( 2314): skip - SSID mismatch
D/wpa_supplicant( 2314): 1: 00:55:66:77:88:99 ssid='XXXXX' wpa_ie_len=0 rsn_ie_len=0 caps=0x1
D/wpa_supplicant( 2314): wpa_supplicant_match_privacy
D/wpa_supplicant( 2314): selected non-WPA AP 00:55:66:77:88:99 ssid='XXXXX'
D/wpa_supplicant( 2314): wpa_supplicant_scard_init
I/wpa_supplicant( 2314): Trying to associate with 00:55:66:77:88:99 (SSID='XXXXX' freq=2442 MHz)
D/wpa_supplicant( 2314): Cancelling scan request
D/wpa_supplicant( 2314): WPA: clearing own WPA/RSN IE
D/wpa_supplicant( 2314): Automatic auth_alg selection: 0x1
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_alg
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): WPA: clearing AP WPA IE
D/wpa_supplicant( 2314): WPA: clearing AP RSN IE
D/wpa_supplicant( 2314): WPA: clearing own WPA/RSN IE
D/wpa_supplicant( 2314): No keys have been configured - skip key clearing
D/wpa_supplicant( 2314): wpa_driver_wext_set_drop_unencrypted
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): State: SCANNING -> ASSOCIATING
I/wpa_supplicant( 2314): CTRL-EVENT-STATE-CHANGE id=-1 state=3
D/wpa_supplicant( 2314): wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant( 2314): wpa_driver_wext_send_oper_ifla()
D/wpa_supplicant( 2314): WEXT: Operstate: linkmode=-1, operstate=5
W/wpa_supplicant( 2314): wpa_driver_wext_associate
D/wpa_supplicant( 2314): wpa_driver_wext_set_mode
D/wpa_supplicant( 2314): wpa_driver_wext_set_gen_ie
W/wpa_supplicant( 2314): wpa_driver_wext_set_gen_ie fail.
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): wpa_driver_wext_cipher2wext
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): wpa_driver_wext_cipher2wext
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): wpa_driver_wext_keymgmt2wext
:
I/WifiHW ( 2227): wait_for_event: result=0 nread=40 string="<2>CTRL-EVENT-STATE-CHANGE id=-1 state=2"
I/WifiHW ( 2227): returning nread
V/WifiMonitor( 2227): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2]
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
I/WifiHW ( 2227): wait_for_event: result=0 nread=33 string="<2>CTRL-EVENT-SCAN-RESULTS Ready"
I/WifiHW ( 2227): returning nread
I/WifiHW ( 2227): wifi_command called, cmd:AP_SCAN 1
I/WifiHW ( 2227): wifi_send_command, cmd = AP_SCAN
I/WifiHW ( 2227): returning reply OK
I/WifiHW ( 2227): for cmd AP_SCAN 1
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
I/WifiHW ( 2227): wait_for_event: result=0 nread=76 string="<2>Trying to associate with 00:55:66:77:88:99 (SSID='XXXXX' freq=2442 MHz)"
I/WifiHW ( 2227): returning nread
V/WifiMonitor( 2227): Event [Trying to associate with 00:55:66:77:88:99 (SSID='XXXXX' freq=2442 MHz)]
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
I/WifiHW ( 2227): wait_for_event: result=0 nread=40 string="<2>CTRL-EVENT-STATE-CHANGE id=-1 state=3"
I/WifiHW ( 2227): returning nread
V/WifiMonitor( 2227): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=3]
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
I/WifiHW ( 2227): wait_for_event: result=0 nread=43 string="<2>Association request to the driver failed"
I/WifiHW ( 2227): returning nread
V/WifiMonitor( 2227): Event [Association request to the driver failed]
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
:
D/wpa_supplicant( 2314): wpa_driver_wext_set_wpa
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): No keys have been configured - skip key clearing
D/wpa_supplicant( 2314): wpa_driver_wext_set_countermeasures
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): wpa_driver_wext_set_drop_unencrypted
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): Setting scan request: 13 sec 100000 usec
D/wpa_supplicant( 2314): wpa_driver_wext_event_wireless(len=20)
D/wpa_supplicant( 2314): Wireless event: cmd=0x8b15 len=20
D/wpa_supplicant( 2314): Wireless event: new AP: 00:55:66:77:88:99
D/wpa_supplicant( 2314): wpa_driver_wext_event_assoc_ies()
D/wpa_supplicant( 2314): wpa_supplicant_event: event=4
D/wpa_supplicant( 2314): wpa_supplicant_event_associnfo
D/wpa_supplicant( 2314): Association info event
D/wpa_supplicant( 2314): WPA: clearing own WPA/RSN IE
D/wpa_supplicant( 2314): wpa_supplicant_event: event=0
D/wpa_supplicant( 2314): wpa_supplicant_event_assoc
D/wpa_supplicant( 2314): State: ASSOCIATING -> ASSOCIATED
I/wpa_supplicant( 2314): CTRL-EVENT-STATE-CHANGE id=0 state=4
D/wpa_supplicant( 2314): wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant( 2314): wpa_driver_wext_send_oper_ifla()
D/wpa_supplicant( 2314): WEXT: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant( 2314): wpa_driver_wext_get_bssid()
D/wpa_supplicant( 2314): Associated to a new BSS: BSSID=00:55:66:77:88:99
D/wpa_supplicant( 2314): wpa_supplicant_select_config
I/wpa_supplicant( 2314): Associated with 00:55:66:77:88:99
D/wpa_supplicant( 2314): wpa_supplicant_scard_init
D/wpa_supplicant( 2314): WPA: Association event - clear replay counter
D/wpa_supplicant( 2314): EAPOL: External notification - portEnabled=0
D/wpa_supplicant( 2314): EAPOL: External notification - portValid=0
D/wpa_supplicant( 2314): EAPOL: External notification - portEnabled=1
D/wpa_supplicant( 2314): EAPOL: SUPP_PAE entering state S_FORCE_AUTH
D/wpa_supplicant( 2314): EAPOL: SUPP_BE entering state IDLE
D/wpa_supplicant( 2314): Cancelling authentication timeout
D/wpa_supplicant( 2314): State: ASSOCIATED -> COMPLETED
I/wpa_supplicant( 2314): CTRL-EVENT-STATE-CHANGE id=0 state=7
I/wpa_supplicant( 2314): CTRL-EVENT-CONNECTED - Connection to 00:55:66:77:88:99 completed (auth) [id=0 id_str=]
D/wpa_supplicant( 2314): wpa_driver_wext_set_operstate: operstate 0->1 (UP)
D/wpa_supplicant( 2314): wpa_driver_wext_send_oper_ifla()
D/wpa_supplicant( 2314): WEXT: Operstate: linkmode=-1, operstate=6
D/wpa_supplicant( 2314): Cancelling scan request
D/wpa_supplicant( 2314): wpa_driver_wext_rtm_netlink()
D/wpa_supplicant( 2314): wpa_driver_wext_own_ifindex(3,0:3)
D/wpa_supplicant( 2314): RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
D/wpa_supplicant( 2314): wpa_driver_wext_event_link(del=0)
D/wpa_supplicant( 2314): RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added
D/wpa_supplicant( 2314): wpa_supplicant_event: event=5
D/wpa_supplicant( 2314): wpa_supplicant_event_interface_status: ifname eth1, ievent=0
D/wpa_supplicant( 2314): wpa_s->removed = 0
D/wpa_supplicant( 2314): Configured interface was added.
D/wpa_supplicant( 2314): Own MAC address: 00:11:22:33:44:55
D/wpa_supplicant( 2314): wpa_driver_wext_set_wpa
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): No keys have been configured - skip key clearing
D/wpa_supplicant( 2314): wpa_driver_wext_set_countermeasures
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): wpa_driver_wext_set_drop_unencrypted
D/wpa_supplicant( 2314): wpa_driver_wext_set_auth_param()
D/wpa_supplicant( 2314): Setting scan request: 14 sec 100000 usec
I/WifiHW ( 2227): wait_for_event: result=0 nread=39 string="<2>CTRL-EVENT-STATE-CHANGE id=0 state=4"
I/WifiHW ( 2227): returning nread
V/WifiMonitor( 2227): Event [CTRL-EVENT-STATE-CHANGE id=0 state=4]
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
I/EthernetMonitor( 2227): get event
I/WifiHW ( 2227): wait_for_event: result=0 nread=36 string="<2>Associated with 00:55:66:77:88:99"
I/WifiHW ( 2227): returning nread
V/WifiMonitor( 2227): Event [Associated with 00:55:66:77:88:99]
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
I/WifiHW ( 2227): wait_for_event: result=0 nread=39 string="<2>CTRL-EVENT-STATE-CHANGE id=0 state=7"
I/WifiHW ( 2227): returning nread
V/WifiMonitor( 2227): Event [CTRL-EVENT-STATE-CHANGE id=0 state=7]
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
// APとの接続処理
I/WifiHW ( 2227): wait_for_event: result=0 nread=89 string="<2>CTRL-EVENT-CONNECTED - Connection to 00:55:66:77:88:99 completed (auth) [id=0 id_str=]"
I/WifiHW ( 2227): returning nread
V/WifiMonitor( 2227): Event [CTRL-EVENT-CONNECTED - Connection to 00:55:66:77:88:99 completed (auth) [id=0 id_str=]]
I/WifiHW ( 2227): wifi_wait_for_event called
I/WifiHW ( 2227): monitor_conn checking
I/WifiHW ( 2227): calling wpa_ctrl_recv
D/wpa_supplicant( 2314): RX EAPOL from 00:55:66:77:88:99
D/wpa_supplicant( 2314): Ignored received EAPOL frame since no key management is configured
D/wpa_supplicant( 2314): RX EAPOL from 00:55:66:77:88:99
:
I/WifiHW ( 2227): returning reply bssid=00:55:66:77:88:99
I/WifiHW ( 2227): ssid=XXXXX
I/WifiHW ( 2227): id=0
I/WifiHW ( 2227): pairwise_cipher=NONE
I/WifiHW ( 2227): group_cipher=NONE
I/WifiHW ( 2227): key_mgmt=NONE
I/WifiHW ( 2227): wpa_state=COMPLETED
I/WifiHW ( 2227): for cmd STATUS
V/WifiStateTracker( 2227): Connection to supplicant established, state=COMPLETED
D/WifiStateTracker( 2227): DhcpHandler: DHCP request started
:
3.3 DHCPの起動
APへの接続が完了するとDHCPが起動され, APからIPアドレスを取得する.
D/WifiStateTracker( 2227): DhcpHandler: DHCP request started
// dhcpcd起動.
I//system/bin/dhcpcd( 2487): eth1: dhcpcd 4.0.1 starting
I//system/bin/dhcpcd( 2487): eth1: host does not support a monotonic clock - timing can skew
I//system/bin/dhcpcd( 2487): eth1: broadcasting for a lease
:
V/WifiStateTracker( 2227): Changing supplicant state: COMPLETED ==> SCANNING
V/WifiStateTracker( 2227): Changing supplicant state: SCANNING ==> ASSOCIATING
V/WifiStateTracker( 2227): Changing supplicant state: ASSOCIATING ==> ASSOCIATED
V/WifiStateTracker( 2227): Changing supplicant state: ASSOCIATED ==> COMPLETED
V/WifiStateTracker( 2227): New network state is CONNECTED
:
// IPアドレス取得
I//system/bin/dhcpcd( 2487): eth1: offered 192.168.11.4 from 192.168.11.1
I//system/bin/dhcpcd( 2487): eth1: checking 192.168.11.4 is available on attached networks
I//system/bin/dhcpcd( 2487): eth1: acknowledged 192.168.11.4 from 192.168.11.1
I//system/bin/dhcpcd( 2487): eth1: leased 192.168.11.4 for 172800 seconds
:
V/WifiStateTracker( 2227): DhcpHandler: DHCP request succeeded
V/WifiStateTracker( 2227): IP configuration: ipaddr 192.168.11.4 gateway 192.168.11.1 netmask 255.255.255.0 dns1 192.168.11.1 dns2 0.0.0.0 DHCP server 192.168.11.1 lease 172800 seconds
V/ConnectivityService( 2227): ConnectivityChange for WIFI: CONNECTED/CONNECTED
V/ConnectivityService( 2227): Handle CONNECT for WIFI
V/ConnectivityService( 2227): Policy requires MOBILE teardown
V/ConnectivityService( 2227): Sending CONNECT bcast for WIFI
I/ConnectivityService( 2227): check nettype: 0
I/ConnectivityService( 2227): nettype 0info is not connection : NetworkInfo: type: MOBILE[EDGE], state: CONNECTED/CONNECTED, reason: simLoaded, extra: (none), roaming: true, failover: false, isAvailable: true
I/ConnectivityService( 2227): check nettype: 1
I/NetworkStateTracker( 2227): look for dns dhcp.eth1.dns1 value 192.168.11.1
I/NetworkStateTracker( 2227): find value 192.168.11.1
I/NetworkStateTracker( 2227): look for dns dhcp.eth1.dns2 value
I/ConnectivityService( 2227): chk dns 1 to 192.168.11.1
I/ConnectivityService( 2227): Set dns 1 to 192.168.11.1
I/ConnectivityService( 2227): check nettype: 2
I/ConnectivityService( 2227): nettype 2info is not connection : NetworkInfo: type: ETH[], state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
I/WifiHW ( 2227): wifi_command called, cmd:STATUS
I/WifiHW ( 2227): wifi_send_command, cmd = STATUS
I/wpa_supplicant( 2227): wpa_ctrl_request()/IFCASE_SOCKET called
I/WifiHW ( 2227): returning reply bssid=00:55:66:77:88:99
I/WifiHW ( 2227): ssid=XXXXX
I/WifiHW ( 2227): id=0
I/WifiHW ( 2227): pairwise_cipher=NONE
I/WifiHW ( 2227): group_cipher=NONE
I/WifiHW ( 2227): key_mgmt=NONE
I/WifiHW ( 2227): wpa_state=COMPLETED
I/WifiHW ( 2227): ip_address=192.168.11.4
I/WifiHW ( 2227): for cmd STATUS
Androidにおける無線LAN制御の概要, Android-x86でのコード修正, 設定および動作について説明してきた.
無線LANデバイスにより多少の違いはあると思うが, 基本的には同様の動作をすると思われる.
これからAndroidで無線LAN接続にチャレンジしてみよう, という方は参考にしてみてください.