service wpa_supplicant /system/bin/wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
socket wpa_tiwlan0 dgram 660 wifi wifi
disabled
oneshot
http://man.he.net/man8/wpa_supplicant
wpa_supplicant [ -BddfhKLqqtuvW ] [ -iifname ] [ -cconfig file ] [
-Ddriver ] [ -PPID_file ] [ -foutput file ]
2010年11月24日 星期三
Look Android ramdisk image
Tar:
#cd /tmp/data
#cat ../ramdisk.img | gunzip | cpio -idv
store:
find . | cpio -o -H newc | gzip > ../ramdisk.img
#cd /tmp/data
#cat ../ramdisk.img | gunzip | cpio -idv
store:
find . | cpio -o -H newc | gzip > ../ramdisk.img
2010年11月23日 星期二
wifi hal layer on android
- wifi ap layer on Android
frameworks/base/core/jni/android_net_wifi_Wifi.cpp
framwworks/base/wifi/java/android/net/wifi/WifiStateTracker.java
- Wifi HAL layer
Android/hardware/libhardware_legacy/wifi/wifi.c
- Tool: wpa_suplicant and wpa_cli.c
external/wpa_supplicant/wpa_cli.c
frameworks/base/core/jni/android_net_wifi_Wifi.cpp
framwworks/base/wifi/java/android/net/wifi/WifiStateTracker.java
- Wifi HAL layer
Android/hardware/libhardware_legacy/wifi/wifi.c
- Tool: wpa_suplicant and wpa_cli.c
external/wpa_supplicant/wpa_cli.c
2010年11月19日 星期五
using wpa_cli setting wifi
#!/system/bb/ash
start wpa_supplicant
sleep 1
wpa_cli -i tiwlan0 scan
wpa_cli -i tiwlan0 scan_result
wpa_cli -i tiwlan0 add_network
wpa_cli -i tiwlan0 set_network 0 key_mgmt NONE
wpa_cli -i tiwlan0 set_network 0 ssid '"QQ"'
wpa_cli -i tiwlan0 enable_network 0
;--------------------------------------------------
#!/system/bb/ash
start wpa_supplicant
sleep 1
wpa_cli -i tiwlan0 scan
wpa_cli -i tiwlan0 scan_result
wpa_cli -i tiwlan0 add_network
wpa_cli -i tiwlan0 set_network 0 key_mgmt NONE
wpa_cli -i tiwlan0 set_network 0 ssid '"'$1'"'
wpa_cli -i tiwlan0 enable_network 0
echo $1
;--------------------------------------------------
使用wpa_cli控制和管理wpa_supplicant
# wpa_cli -i wlan0 status (看看目前的狀態)
# wpa_cli -i wlan0 help (查看參數與指令)
# wpa_cli -i wlan0 terminate (關閉wpa_supplicant)
# wpa_cli -i wlan0 interface (查看有那些無線網卡介面)
# wpa_cli -i wlan0 list_networks (查看wpa_supplicant.conf檔裡的設定)
# wpa_cli -i wlan0 select_network (選擇不同的AP,id為AP代號0,1,2,3...)
# wpa_cli -i wlan0 enable_network
# wpa_cli -i wlan0 disable_network
# wpa_cli -i wlan0 remove_network (刪除AP資訊)
# wpa_cli -i wlan0 reconfigure (重新讀取wpa_supplicant.conf設定內容)
# wpa_cli -i wlan0 save_config (儲存寫入到wpa_supplicant.conf中,否責變更無效)
# wpa_cli -i wlan0 disconnect (斷線)
# wpa_cli -i wlan0 reconnect (重新連線)
# wpa_cli -i wlan0 scan (掃描附近的AP)
# wpa_cli -i wlan0 scan_results (印出附近AP的相關資訊)
;---------------------------------------
http://linux.die.net/man/8/wpa_cli
wpa_cli [ -p path to ctrl sockets ] [ -i ifname ] [ -hvB ] [ -a action file ] [ -P pid file ] [ command ... ]
start wpa_supplicant
sleep 1
wpa_cli -i tiwlan0 scan
wpa_cli -i tiwlan0 scan_result
wpa_cli -i tiwlan0 add_network
wpa_cli -i tiwlan0 set_network 0 key_mgmt NONE
wpa_cli -i tiwlan0 set_network 0 ssid '"QQ"'
wpa_cli -i tiwlan0 enable_network 0
;--------------------------------------------------
#!/system/bb/ash
start wpa_supplicant
sleep 1
wpa_cli -i tiwlan0 scan
wpa_cli -i tiwlan0 scan_result
wpa_cli -i tiwlan0 add_network
wpa_cli -i tiwlan0 set_network 0 key_mgmt NONE
wpa_cli -i tiwlan0 set_network 0 ssid '"'$1'"'
wpa_cli -i tiwlan0 enable_network 0
echo $1
;--------------------------------------------------
使用wpa_cli控制和管理wpa_supplicant
# wpa_cli -i wlan0 status (看看目前的狀態)
# wpa_cli -i wlan0 help (查看參數與指令)
# wpa_cli -i wlan0 terminate (關閉wpa_supplicant)
# wpa_cli -i wlan0 interface (查看有那些無線網卡介面)
# wpa_cli -i wlan0 list_networks (查看wpa_supplicant.conf檔裡的設定)
# wpa_cli -i wlan0 select_network (選擇不同的AP,id為AP代號0,1,2,3...)
# wpa_cli -i wlan0 enable_network
# wpa_cli -i wlan0 disable_network
# wpa_cli -i wlan0 remove_network (刪除AP資訊)
# wpa_cli -i wlan0 reconfigure (重新讀取wpa_supplicant.conf設定內容)
# wpa_cli -i wlan0 save_config (儲存寫入到wpa_supplicant.conf中,否責變更無效)
# wpa_cli -i wlan0 disconnect (斷線)
# wpa_cli -i wlan0 reconnect (重新連線)
# wpa_cli -i wlan0 scan (掃描附近的AP)
# wpa_cli -i wlan0 scan_results (印出附近AP的相關資訊)
;---------------------------------------
http://linux.die.net/man/8/wpa_cli
wpa_cli [ -p path to ctrl sockets ] [ -i ifname ] [ -hvB ] [ -a action file ] [ -P pid file ] [ command ... ]
2010年11月3日 星期三
indent
find . -name '*.[hc]' -exec indent -kr -l 80 -ts 8 {} \;
indent -kr -i8 -ts 8 -l 80 ilitek_ts.c
indent -kr -i8 -ts 8 -l 80 ilitek_ts.c
2010年11月2日 星期二
study input device
http://www.mask.org.tw/blog/category/linux/
http://blog.csdn.net/colorant/archive/2007/04/12/1561837.aspx
Driver -> InputCore -> Eventhandler -> userspace
# EV_RST 0x00 Reset
# EV_KEY 0x01 按键
# EV_REL 0x02 相对坐标
# EV_ABS 0x03 绝对坐标
# EV_MSC 0x04 其它
# EV_LED 0x11 LED
# EV_SND 0x12 声音
# EV_REP 0x14 Repeat
http://blog.csdn.net/colorant/archive/2007/04/12/1561837.aspx
Driver -> InputCore -> Eventhandler -> userspace
# EV_RST 0x00 Reset
# EV_KEY 0x01 按键
# EV_REL 0x02 相对坐标
# EV_ABS 0x03 绝对坐标
# EV_MSC 0x04 其它
# EV_LED 0x11 LED
# EV_SND 0x12 声音
# EV_REP 0x14 Repeat
訂閱:
文章 (Atom)