Monday, November 28, 2011
Embedded: Language Pack change(MUI) Windows 7 Home SP1
Embedded: Language Pack change(MUI) Windows 7 Home SP1: Hi, I would like to share that i was able to change the language pack in Windows 7 SP1 Home Premium if i download the load the language pa...
Embedded: Embedded: Wifi Study Materials
Embedded: Embedded: Wifi Study Materials: Embedded: Wifi Study Materials : 1)802.11 Wireless Networks, The Definitive Guide, 2nd Ed.chm 2)802.11n.pdf 3)Next Generation WirelessLANs...
Embedded: Wifi Study Materials
Embedded: Wifi Study Materials: 1)802.11 Wireless Networks, The Definitive Guide, 2nd Ed.chm 2)802.11n.pdf 3)Next Generation WirelessLANs Throughput,Robustness,andReliab...
Thursday, November 24, 2011
Language Pack change(MUI) Windows 7 Home SP1
Hi,
I would like to share that i was able to change the language pack in Windows 7 SP1 Home Premium if i download the load the language pack from the link
http://bx.businessweek.com/windows-7/view?url=http%3A%2F%2Fwww.pcdiy.com%2F146%2Fwindows-7-service-pack-1-language-packs-download
and follow the steps given in this video http://www.youtube.com/watch?v=NwdmukiE7xM
to install language pack
I would like to share that i was able to change the language pack in Windows 7 SP1 Home Premium if i download the load the language pack from the link
http://bx.businessweek.com/windows-7/view?url=http%3A%2F%2Fwww.pcdiy.com%2F146%2Fwindows-7-service-pack-1-language-packs-download
and follow the steps given in this video http://www.youtube.com/watch?v=NwdmukiE7xM
to install language pack
Tuesday, September 27, 2011
Monday, September 26, 2011
Tuesday, September 20, 2011
Saturday, September 17, 2011
Top 10 USB drive / pen drive related problems and fixes:
http://www.troublefixers.com/solutions-to-top-10-usb-pen-drive-problems/
Friday, September 16, 2011
FTP WINDOWS command line
@echo off
echo user anonymous> ftpcmd.dat
echo anon@localhost>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo get %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat 192.168.33.119
del ftpcmd.dat
Thursday, September 15, 2011
Wifi Study Materials
1)802.11 Wireless Networks, The Definitive Guide, 2nd Ed.chm
2)802.11n.pdf
3)Next Generation WirelessLANs
Throughput,Robustness,andReliabilityin802.11n
ELDAD PERAHIA AND ROBERT STACEY
4)WiFi_P2P_Technical_Specification_v1.00.pdf
5)WMM (including WMMTM Power Save) Specification
2)802.11n.pdf
3)Next Generation WirelessLANs
Throughput,Robustness,andReliabilityin802.11n
ELDAD PERAHIA AND ROBERT STACEY
4)WiFi_P2P_Technical_Specification_v1.00.pdf
5)WMM (including WMMTM Power Save) Specification
Monday, September 12, 2011
How to use the latest 802.11 drivers and stack with Linux
http://nilvec.com/how-to-use-the-latest-802-11-drivers-and-stack-with-linux/
How to use the latest 802.11 drivers and stack with Linux
There might be several reasons why the wireless drivers from your distro don’t fit the bill. You purchased a new wifi card which doesn’t have a driver in the kernel of your Linux system, or you would like to play with some cool new feature or just to make sure you have the latest and greatest, cutting edge 802.11 software.
Thanks to the work of the Linux wireless developers it is now possible to do that without upgrading your kernel. Using a compatibility layer you can compile and install the latest drivers and the 802.11 stack, and use it with your current kernel (that is, if you have a relatively recent kernel — if you have 2.6.24 or anything more recent, you’re good to go).
To use bleeding edge drivers, first make sure your kernel headers package is installed. Then fetch the necessary git trees:
mkdir compat-wireless && cd compat-wireless
git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/compat.git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/compat-wireless-2.6.git
The linux-next git tree contains the code for the next kernel release, and 802.11 updates are pulled into it on a regular basis. The compat and compat-wireless-2.6 trees implement the necessary compatibility layer, thus making it possible to use the wireless subsystem from linux-next with your kernel. You can also use your git trees to follow development, and keep your wireless drivers up to date: just pull from the remote repositories when you’d like to update. However, the linux-next repository is rebased on a regular basis, so you may want to check out the daily tag instead of pulling.
You can use the compat-wireless-2.6 directory to actually build the wireless subsystem:
cd compat-wireless-2.6
Specify where your newly fetched kernel tree and the compat tree are:
export GIT_TREE=`pwd`/../linux-next/
export GIT_COMPAT_TREE=`pwd`/../compat/
Then refresh compat-wireless-2.6 with the contents of your git trees:
./scripts/admin-refresh.sh
You can also select just a specific driver or group of drivers, e.g. if you only need the ath5k driver:
./scripts/driver-select ath5k
And that’s it, everything should be ready for the build.
make
sudo make install
Your newly built modules will go into the updates folder inside your kernel module directory. Reboot your box (or use the scripts supplied with compat-wireless-2.6 to reload any drivers).
Saturday, September 10, 2011
Thursday, September 1, 2011
Size of the linux library
http://groups.google.com/group/gnu.gcc.help/browse_thread/thread/275b49bca43300be?pli=1
Hi Guys!
I have such library:
$ size -A lib.so.1 :
section size addr
.hash 172504 180
.dynsym 427408 172684
.dynstr 248347 600092
.gnu.version 53426 848440
.gnu.version_r 144 901868
.rel.dyn 19750456 902012
.rel.plt 336 20652468
.init 23 20652804
.plt 688 20652828
.text 135412 20653520
.fini 28 20788932
.rodata 4215968 20788960
.eh_frame 4 25004928
.ctors 8 25009028
.dtors 8 25009036
.jcr 4 25009044
.data.rel.ro 15683552 25009056
.dynamic 240 40692608
.got 352 40692848
.got.plt 180 40693200
.data 136 40693380
.bss 108 40693536
.comment 5220 0
Total 40694552
I've noticed .rel.dyn section is pretty big (almost 20M).What is
the possible reason of that size and how to reduce it?
Wow! You must have a *lot* of external data and constants referenced
from that library.
readelf -r lib.so.1
For .data.rel.ro, do this:
objdump -T lib.so.1 | grep data.rel.ro
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Hi Guys!
I have such library:
$ size -A lib.so.1 :
section size addr
.hash 172504 180
.dynsym 427408 172684
.dynstr 248347 600092
.gnu.version 53426 848440
.gnu.version_r 144 901868
.rel.dyn 19750456 902012
.rel.plt 336 20652468
.init 23 20652804
.plt 688 20652828
.text 135412 20653520
.fini 28 20788932
.rodata 4215968 20788960
.eh_frame 4 25004928
.ctors 8 25009028
.dtors 8 25009036
.jcr 4 25009044
.data.rel.ro 15683552 25009056
.dynamic 240 40692608
.got 352 40692848
.got.plt 180 40693200
.data 136 40693380
.bss 108 40693536
.comment 5220 0
Total 40694552
I've noticed .rel.dyn section is pretty big (almost 20M).What is
the possible reason of that size and how to reduce it?
Wow! You must have a *lot* of external data and constants referenced
from that library.
> I've noticed .rel.dyn section is pretty big (almost 20M).What is
> the possible reason of that size and how to reduce it?
You can see what goes into rel.dyn with: > the possible reason of that size and how to reduce it?
readelf -r lib.so.1
For .data.rel.ro, do this:
objdump -T lib.so.1 | grep data.rel.ro
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
![]() |
> You can see what goes into rel.dyn with: That's really interesting: > readelf -r lib.so.1 I have 2470084 entries like that: 013b572f 00000008 R_386_RELATIVE 013b5738 00000008 R_386_RELATIVE 013b574b 00000008 R_386_RELATIVE 013b5768 00000008 R_386_RELATIVE 013b5776 00000008 R_386_RELATIVE I've googled that: "The dummy R_386_RELATIVE relocations are used to adjust the required absolute addresses at run time." M. |
![]() |
mkaszc...@gmail.com writes: You probably didn't look far enough into the list to find >> You can see what goes into rel.dyn with: >> readelf -r lib.so.1 > That's really interesting: > I have 2470084 entries like that: > 013b572f 00000008 R_386_RELATIVE > 013b5738 00000008 R_386_RELATIVE > 013b574b 00000008 R_386_RELATIVE > 013b5768 00000008 R_386_RELATIVE > 013b5776 00000008 R_386_RELATIVE "meaningful" entries. Try 'readelf -r lib.so.1 | grep 013b572f' > I've googled that: That was possibly written by someone clueless, or else you took > "The dummy R_386_RELATIVE relocations are used to adjust the required > absolute addresses at run time." the statement out of context. There is nothing "dummy" about R_386_RELATIVE relocations. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. |
Tuesday, June 28, 2011
Monday, June 13, 2011
Tuesday, May 24, 2011
Not able to get IP address after deep sleep
Not able to get IP address from previously connected AP after its resumed from deep sleep,the issue was more due to filters is enabled.
If Filters are enabled these are the messages you get
./wl pkt_filter_list 1
./wl pkt_filter_list 1
Num filters: 1
Id :100
Negate :0
Type :0
Offset :0
Pattern len :3
Mask :0xffffff
Pattern :0xffffff
To disable filter use this
./wl pkt_filter_enab le 100 0
If Filters are enabled these are the messages you get
./wl pkt_filter_list 1
./wl pkt_filter_list 1
Num filters: 1
Id :100
Negate :0
Type :0
Offset :0
Pattern len :3
Mask :0xffffff
Pattern :0xffffff
To disable filter use this
./wl pkt_filter_enab
Porting Wifi Drivers to Android
Porting WiFi drivers to Android
This guide provides a step by step explanation of what’s involved in adding a new wifi driver and making wifi work in a custom Android build (this guide was written for android 2.1 but should be applicable to previous android releases and hopefully future releases).
Contents
0. Understand how Android WiFi works.
1. Enable building of wpa_supplicant in your BoardConfig.mk
2. (Optional) Enable debug for wpa_supplicant.
3. Provide a proper wpa_supplicant.conf for your device
4. Have the correct paths and permissions created from init.rc
5. Make sure your wpa_supplicant and dhcpcd (optional) are starting from init.rc
6. Provide your driver either as a module or built in kernel and proper kernel support for it and modify Android source code accordingly.
7. Provide a firmware if your module needs it.
8. Make your driver work with Android custom wpa_supplicant commands and SIOCSIWPRIV ioctl
Contents
0. Understand how Android WiFi works.
1. Enable building of wpa_supplicant in your BoardConfig.mk
2. (Optional) Enable debug for wpa_supplicant.
3. Provide a proper wpa_supplicant.conf for your device
4. Have the correct paths and permissions created from init.rc
5. Make sure your wpa_supplicant and dhcpcd (optional) are starting from init.rc
6. Provide your driver either as a module or built in kernel and proper kernel support for it and modify Android source code accordingly.
7. Provide a firmware if your module needs it.
8. Make your driver work with Android custom wpa_supplicant commands and SIOCSIWPRIV ioctl
Now onto details.
0. Understand how Android WiFi works.
Android uses a modified wpa_supplicant ( external/wpa_supplicant ) daemon for wifi support which is controlled through a socket by hardware/libhardware_legacy/wifi/wifi.c (WiFiHW) that gets controlled from Android UI through android.net.wifi package from frameworks/base/wifi/java/android/net/wifi/ and it’s corresponding jni implementation in frameworks/base/core/jni/android_net_wifi_Wifi.cpp Higher level network management is done in frameworks/base/core/java/android/net
Android uses a modified wpa_supplicant ( external/wpa_supplicant ) daemon for wifi support which is controlled through a socket by hardware/libhardware_legacy/wifi/wifi.c (WiFiHW) that gets controlled from Android UI through android.net.wifi package from frameworks/base/wifi/java/android/net/wifi/ and it’s corresponding jni implementation in frameworks/base/core/jni/android_net_wifi_Wifi.cpp Higher level network management is done in frameworks/base/core/java/android/net
1. Enable building of wpa_supplicant in your BoardConfig.mk
This is by simply adding: BOARD_WPA_SUPPLICANT_DRIVER := WEXT to your BoardConfig.mk . This will set WPA_BUILD_SUPPLICANT to true in external/wpa_supplicant/Android.mk enabling building of driver_wext.c
If you have a custom wpa_supplicant driver (like madwifi or my custom android private commands emulation – see last paragraph) you can replace WEXT with AWEXT or your driver name (MADWIFI, PRISM etc).
This is by simply adding: BOARD_WPA_SUPPLICANT_DRIVER := WEXT to your BoardConfig.mk . This will set WPA_BUILD_SUPPLICANT to true in external/wpa_supplicant/Android.mk enabling building of driver_wext.c
If you have a custom wpa_supplicant driver (like madwifi or my custom android private commands emulation – see last paragraph) you can replace WEXT with AWEXT or your driver name (MADWIFI, PRISM etc).
2. (Optional) Enable debug for wpa_supplicant.
By default wpa_supplicant is set to MSG_INFO that doesn’t tell much.
To enable more messages:
2.1 modify common.c and set wpa_debug_level = MSG_DEBUG
2.2 modify common.h and change #define wpa_printf from if ((level) >= MSG_INFO) to if ((level) >= MSG_DEBUG)
By default wpa_supplicant is set to MSG_INFO that doesn’t tell much.
To enable more messages:
2.1 modify common.c and set wpa_debug_level = MSG_DEBUG
2.2 modify common.h and change #define wpa_printf from if ((level) >= MSG_INFO) to if ((level) >= MSG_DEBUG)
3. Provide a proper wpa_supplicant.conf for your device
Providing a wpa_supplicant.conf it’s important because the control socket for android is specified in this file (ctrl_interface= ). This file should be copied by your AndroidBoard.mk to $(TARGET_OUT_ETC)/wifi (usually /system/etc/wifi/wpa_supplicant.conf ). This location will be used on wpa_supplicant service from init.rc.
There are two different ways in which wpa_supplicant can be configured, one is to use a “private” socket in android namespace, created by socket_local_client_connect() function in wpa_ctrl.c and another is by using a standard unix socket.
Providing a wpa_supplicant.conf it’s important because the control socket for android is specified in this file (ctrl_interface= ). This file should be copied by your AndroidBoard.mk to $(TARGET_OUT_ETC)/wifi (usually /system/etc/wifi/wpa_supplicant.conf ). This location will be used on wpa_supplicant service from init.rc.
There are two different ways in which wpa_supplicant can be configured, one is to use a “private” socket in android namespace, created by socket_local_client_connect() function in wpa_ctrl.c and another is by using a standard unix socket.
Minimum required config options in wpa_supplicant.conf :
– Android private socket
– Android private socket
ctrl_interface=wlan0
update_config=1
update_config=1
– Unix standard socket
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
update_config=1
update_config=1
Depending on your driver you might also want to add:
ap_scan=1
ap_scan=1
If you have AP association problems with should change to ap_scan=0 to let the driver do the association instead of wpa_supplicant.
If you want to let wpa_supplicant connect to non-WPA or open wireless networks (by default it skips these kind) add:
If you want to let wpa_supplicant connect to non-WPA or open wireless networks (by default it skips these kind) add:
network={
key_mgmt=NONE
}
key_mgmt=NONE
}
4. Have the correct permissions and paths created from init.rc
Incorrect permisions will result in wpa_supplicant not being able to create/open the control socket and libhardware_legacy/wifi/wifi.c won’t connect.
Since Google modified wpa_supplicant to run as wifi user/group the directory structure and file ownership should belong to wifi user/group (see os_program_init() function in wpa_supplicant/os_unix.c ).
Incorrect permisions will result in wpa_supplicant not being able to create/open the control socket and libhardware_legacy/wifi/wifi.c won’t connect.
Since Google modified wpa_supplicant to run as wifi user/group the directory structure and file ownership should belong to wifi user/group (see os_program_init() function in wpa_supplicant/os_unix.c ).
Otherwise errors like:
E/WifiHW ( ): Unable to open connection to supplicant on “/data/system/wpa_supplicant/wlan0″: No such file or directory will appear.
E/WifiHW ( ): Unable to open connection to supplicant on “/data/system/wpa_supplicant/wlan0″: No such file or directory will appear.
Also wpa_supplicant.conf should belong to wifi user/group because wpa_supplicant will want to modify this file. If your system has /system as read-only use a location like /data/misc/wifi/wpa_supplicant.conf and modify wpa_supplicant service in init.rc with new location.
Make sure the paths are correctly created in init.rc:
Make sure the paths are correctly created in init.rc:
mkdir /system/etc/wifi 0770 wifi wifi
chmod 0770 /system/etc/wifi
chmod 0660 /system/etc/wifi/wpa_supplicant.conf
chown wifi wifi /system/etc/wifi/wpa_supplicant.conf
#wpa_supplicant control socket for android wifi.c (android private socket)
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
chown wifi wifi /data/misc/wifi
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
chmod 0770 /system/etc/wifi
chmod 0660 /system/etc/wifi/wpa_supplicant.conf
chown wifi wifi /system/etc/wifi/wpa_supplicant.conf
#wpa_supplicant control socket for android wifi.c (android private socket)
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
chown wifi wifi /data/misc/wifi
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
If you use a Unix standard socket in wpa_supplicant.conf (see above) add:
# wpa_supplicant socket (unix socket mode)
mkdir /data/system/wpa_supplicant 0771 wifi wifi
chmod 0771 /data/system/wpa_supplicant
chown wifi wifi /data/system/wpa_supplicant
mkdir /data/system/wpa_supplicant 0771 wifi wifi
chmod 0771 /data/system/wpa_supplicant
chown wifi wifi /data/system/wpa_supplicant
Do not add these if you use Android private socket because it will make wpa_supplicant non-functional, because hardware/libhardware_legacy/wifi/wifi.c check for existence of the /data/system/wpa_supplicant folder and will pass a wrong interface name to wpa_ctrl_open() function.
5. Make sure your wpa_supplicant and dhcpcd are starting from init.rc
For wpa_supplicant the init.rc startup like should be depending on which path you chosen:
– Android private socket:
– Android private socket:
service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -iwlan0 -c /system/etc/wifi/wpa_supplicant.conf
socket wpa_wlan0 dgram 660 wifi wifi
group system wifi inet
disabled
oneshot
socket wpa_wlan0 dgram 660 wifi wifi
group system wifi inet
disabled
oneshot
– Unix standard socket:
service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -iwlan0 -c /system/etc/wifi/wpa_supplicant.conf
group system wifi inet
disabled
oneshot
group system wifi inet
disabled
oneshot
If your wifi driver creates a wifi interface with other name than wlan0 you will have to modify the above line accordingly.
You also should have dhcpcd starting from init.rc
You also should have dhcpcd starting from init.rc
service dhcpcd /system/bin/dhcpcd wlan0
group system dhcp
disabled
oneshot
group system dhcp
disabled
oneshot
6. Provide your driver either as a module or built in kernel and proper kernel support for it.
First make sure that CONFIG_PACKET and CONFIG_NET_RADIO (wireless extensions) are enabled in your kernel. The driver can be built as module (default android way) or built in kernel (if you want to rely in kernel auto probing to support multiple driver eg. USB wifi) but will require source code modifications (see below).
– As kernel module:
Define in your BoardConfig.mk :
1. WIFI_DRIVER_MODULE_PATH := path to the module to be loaded
You need to specify module name in that path too, usually should look something like /system/lib/modules/wlan.ko
2. WIFI_DRIVER_MODULE_NAME:= the name of the network interface that the driver creates, for example wlan0
3. WIFI_DRIVER_MODULE_ARG:= any arguments that you want to pass to the driver on insmod, for example nohwcrypt
First make sure that CONFIG_PACKET and CONFIG_NET_RADIO (wireless extensions) are enabled in your kernel. The driver can be built as module (default android way) or built in kernel (if you want to rely in kernel auto probing to support multiple driver eg. USB wifi) but will require source code modifications (see below).
– As kernel module:
Define in your BoardConfig.mk :
1. WIFI_DRIVER_MODULE_PATH := path to the module to be loaded
You need to specify module name in that path too, usually should look something like /system/lib/modules/wlan.ko
2. WIFI_DRIVER_MODULE_NAME:= the name of the network interface that the driver creates, for example wlan0
3. WIFI_DRIVER_MODULE_ARG:= any arguments that you want to pass to the driver on insmod, for example nohwcrypt
Make sure you copy your kernel module when building android to the correct location.
– As built in kernel:
- First init.rc needs to be modified to inform hardware/libhardware_legacy/wifi/wifi.c about the name of the interface, that the driver is already loaded and set the status of wpa_supplicant to running:
– As built in kernel:
- First init.rc needs to be modified to inform hardware/libhardware_legacy/wifi/wifi.c about the name of the interface, that the driver is already loaded and set the status of wpa_supplicant to running:
setprop wifi.interface “wlan0″
setprop wlan.driver.status “ok”
setprop wlan.driver.status “ok”
Do NOT add setprop init.svc.wpa_supplicant “running” as I previously mentioned as it will prevent wpa_supplicant from starting from init.
- Secondly hardware/libhardware_legacy/wifi/wifi.c need to be modified so the functions insmod() and rmmod() return 0 (simply add return 0; as the first line in functions since they are not needed when driver is built in kernel) and return before checking for /proc/modules in check_driver_loaded() function.
You might encounter problems with WifiHW module not being able to connect to wpa_supplicant socket even with the correct permisions. Try to turn off / turn on Wifi from the GUI.
- Secondly hardware/libhardware_legacy/wifi/wifi.c need to be modified so the functions insmod() and rmmod() return 0 (simply add return 0; as the first line in functions since they are not needed when driver is built in kernel) and return before checking for /proc/modules in check_driver_loaded() function.
You might encounter problems with WifiHW module not being able to connect to wpa_supplicant socket even with the correct permisions. Try to turn off / turn on Wifi from the GUI.
7. Provide a firmware if your driver needs it
If your driver needs a firmware you will have to copy this firmware file to /etc/firmware on your android build. Android doesn’t use a standard hotplug binary (although there is an implementation available on android-x86system/code/toolbox/hotplug.c ) instead the init process takes care of firmware events and loads the firmware file from /etc/firmware (see: system/core/init/devices.c handle_firmware_event() function).
Firmware file name is defined by the driver and might also contain a folder like: RTL8192SU/rtl8192sfw.bin, entire file path should be available in /etc/firmware
Firmware file name is defined by the driver and might also contain a folder like: RTL8192SU/rtl8192sfw.bin, entire file path should be available in /etc/firmware
8. Make your driver work with Android custom wpa_supplicant commands and SIOCSIWPRIV ioctl.
Android uses SIOCSIWPRIV ioctl to send commands to modify driver behaviour and receive information like signal strength, mac address of the AP, link speed etc. This ioctl is usually not implemented in any known wireless drivers except bcm4329 which is in google msm kernel branch .
The errors from not having this ioctl implemented will look like:
E/wpa_supplicant( ): wpa_driver_priv_driver_cmd failed wpa_driver_priv_driver_cmd RSSI len = 4096
E/wpa_supplicant( ): wpa_driver_priv_driver_cmd failed
D/wpa_supplicant( ): wpa_driver_priv_driver_cmd LINKSPEED len = 4096
E/wpa_supplicant( ): wpa_driver_priv_driver_cmd failed
I/wpa_supplicant( ): CTRL-EVENT-DRIVER-STATE HANGED
The errors from not having this ioctl implemented will look like:
E/wpa_supplicant( ): wpa_driver_priv_driver_cmd failed wpa_driver_priv_driver_cmd RSSI len = 4096
E/wpa_supplicant( ): wpa_driver_priv_driver_cmd failed
D/wpa_supplicant( ): wpa_driver_priv_driver_cmd LINKSPEED len = 4096
E/wpa_supplicant( ): wpa_driver_priv_driver_cmd failed
I/wpa_supplicant( ): CTRL-EVENT-DRIVER-STATE HANGED
After 4, WEXT_NUMBER_SEQUENTIAL_ERRORS errors, android will abort using the device.
To quickly test your wifi from interface you can disable error checking in external/wpa_supplicant/driver_wext.c by simply making ret = 0; in wpa_driver_priv_driver_cmd() function after the SIOCSIWPRIV ioctl call. This will make all access points in android UI appear without signal or MAC address.
To proper implement the ioctl you will need to modify your kernel driver to reply to SIOCSIWPRIV ioctl with RSSI (signal strength) and MACADDR commands being the most important.
A better way is to add a custom driver_xxx.c to google external/wpa_supplicant/ implementing wpa_driver_priv_driver_cmd() function that will take care of RSSI, MACADDR and others, through calls to SIOCGIWSTATS, SIOCGIFHWADDR ioctls, with the rest of the functions being called from driver_wext.c.
Below is a link to a patch for wpa_supplicant that I did for mini-box.com picoPC Android build. It creates a new driver awext which “emulates” android driver commands using wireless extensions ioctls.
To proper implement the ioctl you will need to modify your kernel driver to reply to SIOCSIWPRIV ioctl with RSSI (signal strength) and MACADDR commands being the most important.
A better way is to add a custom driver_xxx.c to google external/wpa_supplicant/ implementing wpa_driver_priv_driver_cmd() function that will take care of RSSI, MACADDR and others, through calls to SIOCGIWSTATS, SIOCGIFHWADDR ioctls, with the rest of the functions being called from driver_wext.c.
Below is a link to a patch for wpa_supplicant that I did for mini-box.com picoPC Android build. It creates a new driver awext which “emulates” android driver commands using wireless extensions ioctls.
How to use the new driver:
1. In your BoardConfig.mk define: BOARD_WPA_SUPPLICANT_DRIVER := AWEXT
2. Change init.rc wpa_supplicant service command line by replacind -Dwext with -Dawext
2. Change init.rc wpa_supplicant service command line by replacind -Dwext with -Dawext
AWEXT driver patch download: android_wext_emulation_driver_awext.patch
Friday, April 29, 2011
SDIO
http://www.varsanofiev.com/inside/WritingLinuxSDIODrivers.htm
Learn abt SDIO Interrupts,there are two interrupts available
1)OUt of Band -which is dedicated interrupt line.
2)In band Shared with SDIO data[1] line.
http://www.sdcard.org/developers/tech/sdio/sdio_spec/Simplified_SDIO_Card_Spec.pdf
Learn even abt Suspend and Resume operation
Learn abt SDIO Interrupts,there are two interrupts available
1)OUt of Band -which is dedicated interrupt line.
2)In band Shared with SDIO data[1] line.
http://www.sdcard.org/developers/tech/sdio/sdio_spec/Simplified_SDIO_Card_Spec.pdf
Learn even abt Suspend and Resume operation
Wednesday, March 2, 2011
Diffference between Soft AP and ADHOC mode
1.SoftAP allows for the Associated devices to go into Power mode.
2.SoftAP allows WPA2 level certification.
3.SoftAP can use full data rates.
2.SoftAP allows WPA2 level certification.
3.SoftAP can use full data rates.
Tuesday, February 1, 2011
Embedded: Guide on adding WIFI drivers on Android.
Embedded: Guide on adding WIFI drivers on Android.: "I struggled couple of days to run successfully WIFI driver on Android Froyo version, Below are the Steps which includes porting of Wifi Driv..."
Guide on adding WIFI drivers on Android.
I struggled couple of days to run successfully WIFI driver on Android Froyo version, Below are the Steps which includes porting of Wifi Drivers to Android:-
Step1:-Modified "wpa_supplicant.conf " ,ctrl_interface modification is important here..,This file actually will be loaded to device @ path /etc/wifi/
##### wpa_supplicant configuration file template #####
update_config=1
ctrl_interface=DIR=/data/misc/wifi GROUP=wifi
eapol_version=1
ap_scan=1
fast_reauth=1
Step2:-Modification of file BoardConfig.mk ,Modify Module path and FW path depending on the requirement.BOARD_WPA_SUPPLICANT_DRIVER should be WEXT..,if its custom change it.
BOARD_WPA_SUPPLICANT_DRIVER := WEXT
WPA_SUPPLICANT_VERSION := VER_0_6_X
#BOARD_WLAN_DEVICE := bcm4329
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/bcm4329.ko"
WIFI_DRIVER_FW_STA_PATH := "/system/vendor/firmware/fw_bcm4329.bin"
WIFI_DRIVER_FW_AP_PATH := "/system/vendor/firmware/fw_bcm4329_apsta.bin"
WIFI_DRIVER_MODULE_ARG := "firmware_path=/system/vendor/firmware/fw_bcm4329.bin nvram_path=/system/etc/nvram.txt"
WIFI_DRIVER_MODULE_NAME := "bcm4329"
Step3:-Modification of system.prop file
wifi.interface=eth0
Step4:-Modifiication of init.rc file
Step1:-Modified "wpa_supplicant.conf " ,ctrl_interface modification is important here..,This file actually will be loaded to device @ path /etc/wifi/
##### wpa_supplicant configuration file template #####
update_config=1
ctrl_interface=DIR=/data/misc/wifi GROUP=wifi
eapol_version=1
ap_scan=1
fast_reauth=1
Step2:-Modification of file BoardConfig.mk ,Modify Module path and FW path depending on the requirement.BOARD_WPA_SUPPLICANT_DRIVER should be WEXT..,if its custom change it.
BOARD_WPA_SUPPLICANT_DRIVER := WEXT
WPA_SUPPLICANT_VERSION := VER_0_6_X
#BOARD_WLAN_DEVICE := bcm4329
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/bcm4329.ko"
WIFI_DRIVER_FW_STA_PATH := "/system/vendor/firmware/fw_bcm4329.bin"
WIFI_DRIVER_FW_AP_PATH := "/system/vendor/firmware/fw_bcm4329_apsta.bin"
WIFI_DRIVER_MODULE_ARG := "firmware_path=/system/vendor/firmware/fw_bcm4329.bin nvram_path=/system/etc/nvram.txt"
WIFI_DRIVER_MODULE_NAME := "bcm4329"
Step3:-Modification of system.prop file
wifi.interface=eth0
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0770 /data/misc/wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/wifi 0770 wifi wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
setprop wifi.interface "eth0"
setprop wlan.driver.status "ok"
setprop wlan.interface "eth0"
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -ieth0 -c/system/etc/wifi/wpa_supplicant.conf -dd
disabled
oneshot
group system
service dhcpcd /system/bin/logwrapper /system/bin/dhcpcd -d eth0
disabled
oneshot
Tuesday, January 18, 2011
Cache Memory....
Cache Memory is well explained in this link
http://www.youtube.com/watch?v=4McNhpkDNpQ
http://www.youtube.com/watch?v=4McNhpkDNpQ
Tools
Android Debug Bridge(adb) is tool used to control devices.for more info please follow the below link
http://developer.android.com/guide/developing/tools/adb.html
http://developer.android.com/guide/developing/tools/adb.html