Porting a WiFi Driver on a android supported platform

712 views
Skip to first unread message

Maneesh

unread,
Feb 12, 2009, 1:28:20 AM2/12/09
to android-porting
Hi

I have to port a Wi-Fi driver on Android supported platform.

can you somebody tell me, the steps to follow the porting a WiFi
driver on android.

Is this any tools require if yes please let me know.



Maneesh

vinay

unread,
Feb 12, 2009, 2:19:48 AM2/12/09
to android...@googlegroups.com
muneesh,
 
First verify your drivers are getting inserted and you are able to connect AP with static Ip adress (use wlan_cfg). This is independent of Android and it should work FIRST.
 
1. Add HAVE_CUSTOM_WIFI_DRIVER_2 := true to build/target/board/generic/BoardConfig.mk file.
 
2. make sure external/wpa_supplicant/.config has got below entries
CONFIG_WIRELESS_EXTENSION=y
CONFIG_CTRL_IFACE=y
CONFIG_DRIVER_WEXT=y
3. Build android with this you will get support for WEXt and wpa_supplicant client.
 
4. After the system boot, insert driver and know the interface (in my case it is eth1)
 
5. Modify wpa_supplicant.conf file for AP configuration and Run 
/system/bin/wpa_supplicant -Dwext -ieth1 -c/sdcard/wpa_supplicant.conf 
 
5. Run dhcp to get the IP
/system/bin/dhcpcd -d eth1
 
6. Ping to AP to check connectivity.
 
regards,
-vinay

ehun...@gmail.com

unread,
Mar 11, 2009, 11:15:47 PM3/11/09
to android-porting
Hi vinay:
I had meet a question about wifi in android.
I had suceessful to insmod my wifi driver but the wifi not up yet.
when I typed "netcfg wlan0 up", I got the some error.

# ifconfig wlan0 up
firmware: requesting zd1211/zd1211b_ub
init: untracked pid 2425 exited
usb 1-7.3: Could not load firmware file zd1211/zd1211b_ub. Error
number -2
zd1211rw 1-7.3:1.0: couldn't load firmware. Error number -2
error: SIOCSIFFLAGS (No such file or directory)

Could you give me some suggestion?
Sorry to trouble you.
Thanks in advance.

ehung
> > Maneesh- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

이성준

unread,
Mar 12, 2009, 2:10:25 AM3/12/09
to android...@googlegroups.com
Hi, ehung1111!

>> sb 1-7.3: Could not load firmware file zd1211/zd1211b_ub. Error number -2
>> zd1211rw 1-7.3:1.0: couldn't load firmware. Error number -2 
>> error: SIOCSIFFLAGS (No such file or directory)

Please check your firmware file location. 
It must be located under /etc/firmware/* (= /system/etc/firmware/*)  

regards,


SH

unread,
Mar 13, 2009, 2:07:47 AM3/13/09
to android-porting
Hi vinay

I'd like to know the detail description of wpa_supplicant.conf.

I would be grateful for your support.
Best regards,
> > Maneesh- 引用テキストを表示しない -
>
> - 引用テキストを表示 -

malkin...@gmail.com

unread,
Mar 13, 2009, 6:20:45 PM3/13/09
to android-porting
I have a similar setup. My wifi shows up as eth1. I tried to follow
your instructions, did not quite work. So I am able to load
wpa_supplicant, can connect to AP, can ping and wget files from web.
My system does not resolve domain names for some reason. What do I
need to have DNS working? But the biggest concern is that despite the
fact I can download files from internet, android does not see my wifi.
UI says "unable to start wifi", and log has "E/WifiService( 601):
Failed to load Wi-Fi driver." How do I actually make android's wifi
friends with my driver that is underneath eth1?

On Feb 12, 12:19 am, vinay <vinc...@gmail.com> wrote:
> muneesh,
>
> First verify your drivers are getting inserted and you are able to connect
> AP with static Ip adress (use wlan_cfg). This is independent of Android and
> it should work FIRST.
>
> 1. Add HAVE_CUSTOM_WIFI_DRIVER_2 := true to
> build/target/board/generic/BoardConfig.mk file.
>
> 2. make sure external/wpa_supplicant/.config has got below entries
> CONFIG_WIRELESS_EXTENSION=y
> CONFIG_CTRL_IFACE=y
> CONFIG_DRIVER_WEXT=y
> 3. Build android with this you will get support for WEXt and wpa_supplicant
> client.
>
> 4. After the system boot, insert driver and know the interface (in my case
> it is eth1)
>
> 5. Modify wpa_supplicant.conf file for AP configuration and Run
> /system/bin/wpa_supplicant -Dwext -ieth1 -c/sdcard/wpa_supplicant.conf
>
> 5. Run dhcp to get the IP
> /system/bin/dhcpcd -d eth1
>
> 6. Ping to AP to check connectivity.
>
> regards,
> -vinay
>

SH

unread,
Mar 16, 2009, 4:01:56 AM3/16/09
to android-porting
I am getting the following error.

D/WifiService( 2436): Unable to open connection to supplicant on "/
data/system/wpa_supplicant/wlan0" Permisiion Denied.

mvniekerk

unread,
Mar 16, 2009, 7:32:21 AM3/16/09
to android-porting
Hi SH
Make sure that all the correct directories is in the right place
(google for /data/misc wifi android)
Search through all the android code and make sure that tiwlan0 is
changed to whatever your wifi device's name is.

That will save you considerable time...

ehun...@gmail.com

unread,
Mar 17, 2009, 7:00:52 AM3/17/09
to android-porting
Hi everyone:
I have a question about wpa_supplicant. I hope someone can offer some
suggestion for me.
I have successful load driver and firmware file in android.
But I have problem at wpa_supplicant.

#wpa_supplicant -Dwext -iwlan0 -c/etc/wifi/wpa_supplicant.conf
ioctl[SIOCSIWAUTH]: Operation not supported on transport endpoint.
WEXT auth param 4 value 0x0 - CTRL-EVENT-STATE-CHANGE id=-1 state=2
CTRL-EVENT-SCAN-RESULTS Ready
CTRL-EVENT-SCAN-RESULTS Ready
Trying to associate with 00:90:cc:e1:ab:aa (ssid='Iamawifi'
freq=2437MHz)
CTRL-EVENT-STATE-CHANGE id=-1 state=3
CTRL-EVENT-STATE-CHANGE id=0 state=4
Associate with 00:90:cc:e1:ab:aa
CTRL-EVENT-STATE-CHANGE id=0 state=7
CTRL-EVENT-CONNECTED - Connection to 00:90:cc:e1:ab:aa completed
(auth) [id=0 id_str=]

Then, the system crashed and I can't control anymore.
Could someone give me some suggestion?
Thanks in advance

ehung


On 3月16日, 下午7時32分, mvniekerk <mvniek...@gmail.com> wrote:
> Hi SH
> Make sure that all the correct directories is in the right place
> (google for /data/miscwifiandroid)
> Search through all theandroidcode and make sure that tiwlan0 is
> changed to whatever yourwifidevice's name is.
>
> That will save you considerable time...
>
> On Mar 16, 10:01 am, SH <kidsjr_...@yahoo.co.jp> wrote:
>
>
>
> > I am getting the following error.
>
> > D/WifiService( 2436): Unable to open connection to supplicant on "/
> > data/system/wpa_supplicant/wlan0" Permisiion Denied.
>
> > I would be grateful for your support.
> > Best regards,- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

>> Jith911

unread,
Mar 17, 2009, 11:40:36 AM3/17/09
to android-porting
In you supplicant conf file.. try mentioning..

ctrl_interface=DIR=/data/system/wpa_supplicant/ GROUP=system

By default the permission of the socket would be root and the service
running on behalf of system won't b able to access it.



-JJ.

SH

unread,
Mar 17, 2009, 10:04:31 PM3/17/09
to android-porting
Thank you for your advices .

I've got it solved.

but next error below:

V/WifiStateTracker( 2422): Changing supplicant state: INACTIVE ==>
SCANNING
V/WifiMonitor( 2422): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1]
V/WifiStateTracker( 2422): Changing supplicant state: SCANNING ==>
INACTIVE
V/WifiMonitor( 2422): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2]
V/WifiStateTracker( 2422): Changing supplicant state: INACTIVE ==>
SCANNING
:


I don't know why Changing supplicant state of wpa_supplicant. is
INACTIVE.

Androidphan

unread,
Mar 27, 2009, 6:39:31 AM3/27/09
to android-porting
I'm getting the following error at the moment:
D/WifiHW ( 2325): Unable to open connection to supplicant on "/data/
system/wpa_supplicant/wlan0": No such file or directory

I got wpa_supplicant running.

# ls -l /data/system/wpa_supplicant/
srwxrwx--- root system 2009-03-27 11:39 wlan0

So it exists.

Why is this??

Androidphan

unread,
Mar 27, 2009, 6:44:10 AM3/27/09
to android-porting
This is the output when starting wpa_supplicant:

Initializing interface 'wlan0' conf '/system/etc/wifi/
wpa_supplicant.conf'
drive
r 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/system/etc/wifi/wpa_supplicant.conf' -> '/system/
etc/wifi/
w
pa_supplicant.conf'
Reading configuration file '/system/etc/wifi/wpa_supplicant.conf'
update_config=1
ctrl_interface='DIR=/data/system/wpa_supplicant/ GROUP=system'
eapol_version=1
ap_scan=1
fast_reauth=1
Initializing interface (2) 'wlan0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:22:43:2c:fa:a6
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
ioctl[SIOCSIWAUTH]: Operation not supported on transport endpoint
WEXT auth param 4 value 0x0 - wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
ctrl_interface_group=1000 (from group name 'system')
Added interface wlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
Ignore event for foreign ifindex 4
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
State: DISCONNECTED -> SCANNING
CTRL-EVENT-STATE-CHANGE id=-1 state=2
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan
to
speed
up initial association
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
CTRL-EVENT-SCAN-RESULTS Ready
No suitable AP found.
Setting scan request: 0 sec 0 usec
No enabled networks - do not scan
State: SCANNING -> INACTIVE
CTRL-EVENT-STATE-CHANGE id=-1 state=1

Michael Trimarchi

unread,
Mar 27, 2009, 7:15:07 AM3/27/09
to android...@googlegroups.com
Hi,
Hi, test you wifi connection using the wpa_cli program. The parse
function of the
scan result expect a - to the signal stregh (if I remember) to parse the
result, otherwise
fail.

wpa_cli has an interractive mode to operate, and you can send command like:
scan and scan-results.
> No suitable AP found.
> Setting scan request: 0 sec 0 usec
> No enabled networks - do not scan
> State: SCANNING -> INACTIVE
> CTRL-EVENT-STATE-CHANGE id=-1 state=1
>
>
> On 27 mrt, 11:39, Androidphan <niels.kee...@tass.nl> wrote:
>
>> I'm getting the following error at the moment:
>> D/WifiHW ( 2325): Unable to open connection to supplicant on "/data/
>> system/wpa_supplicant/wlan0": No such file or directory
>>
>> I got wpa_supplicant running.
>>
>> # ls -l /data/system/wpa_supplicant/
>> srwxrwx--- root system 2009-03-27 11:39 wlan0
>>
>> So it exists.
>>
>> Why is this??
>>
> >
>
>
Regards Michael

Androidphan

unread,
Mar 27, 2009, 7:49:49 AM3/27/09
to android-porting
# wpa_cli -p/data/system/wpa_supplicant/ scan
Selected interface 'wlan0'
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or
directory

On 27 mrt, 12:15, Michael Trimarchi <trimar...@gandalf.sssup.it>
wrote:

Androidphan

unread,
Mar 27, 2009, 8:00:46 AM3/27/09
to android-porting
My bad,

I forgot to create the directory /data/misc/wifi/sockets

Luca Belluccini

unread,
Apr 9, 2009, 4:19:10 AM4/9/09
to android-porting
I did that but I get a similar error of ehung1111..
The output:
ioctl[SIOCSIWAUTH]: Operation not supported on transport endpoint.
WEXT auth param 4 value 0x0 - CTRL-EVENT-STATE-CHANGE id=-1 state=2
CTRL-EVENT-SCAN-RESULTS Ready
CTRL-EVENT-STATE-CHANGE id=-1 state=1

And it locks.
I'm running on EeePc, atk5 dd as built-in in kernel.
wlan0 & wmaster0 (I think they're the same dev) are displaying under /
sys/class/net/

nail

unread,
Apr 9, 2009, 10:19:55 PM4/9/09
to android-porting
Hi, I have enabled wifi using the following command written in
init.rc:

"mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/system/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp

ifup wlan0

service wpa_supplicant /system/bin/logwrapper /system/bin/
wpa_supplicant -iwlan0 -c/system/etc/wifi/wpa_supplicant.conf -dd
group wifi

service wlan_dhcpcd /system/bin/dhcpcd wlan0 "

and it can connetc to the network, but when i type "wpa_cli -p/data/
system/wpa_supplicant/ scan"

it shows "Failed to connect to wpa_supplicant - wpa_ctrl_open: Unknown
error: 0"

do you have any idea about this ? thank you
> > Hi, test youwificonnection using the wpa_cli program. The parse
> > function of the
> > scan result expect a - to the signal stregh (if I remember) to parse the
> > result, otherwise
> > fail.
>
> > wpa_cli has an interractive mode to operate, and you can send command like:
> > scan and scan-results.
>
> > > No suitable AP found.
> > > Setting scan request: 0 sec 0 usec
> > > No enabled networks - do not scan
> > > State: SCANNING -> INACTIVE
> > > CTRL-EVENT-STATE-CHANGE id=-1 state=1
>
> > > On 27 mrt, 11:39, Androidphan <niels.kee...@tass.nl> wrote:
>
> > >> I'm getting the following error at the moment:
> > >> D/WifiHW ( 2325): Unable to open connection to supplicant on "/data/
> > >> system/wpa_supplicant/wlan0": No such file or directory
>
> > >> I got wpa_supplicant running.
>
> > >> # ls -l /data/system/wpa_supplicant/
> > >> srwxrwx--- root system 2009-03-27 11:39 wlan0
>
> > >> So it exists.
>
> > >> Why is this??
>
> > Regards Michael- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

Roman Baumgaertner

unread,
Apr 9, 2009, 11:23:08 PM4/9/09
to PORTING 6
Hi Nail,

You mentioned that you are connected. What does it mean you are connected?
Did you get an IP address or are you attached to the AP (you should be able
to see the SSID)?

Try first to find out on the AP whether it can see you.


Roman Baumgaertner

Sr. SW Engineer-OSDC
・T・ ・ ・Mobile・ stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.
Roman Baumgaertner

Sr. SW Engineer-OSDC
・T・ ・ ・Mobile・ stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

nail

unread,
Apr 10, 2009, 1:49:22 AM4/10/09
to android-porting
Dear Roman

yes, i got IP and can connect to network,

it is because i have configred the wpa_supplicant.conf, and the
contents is shown below:

wpa_supplicant.conf:
===============================================================
update_config=1
eapol_version=1
ap_scan=1 # ap_scan=1: wpa_supplicant initiates scanning and AP
selection
fast_reauth=1

network={
ssid="simple"
psk="very secret passphrase"
priority=5
}


# Wildcard match for SSID (plaintext APs only). This example selects
any
# open AP regardless of its SSID.
network={
key_mgmt=NONE
}

===============================================================

so, it will do all things needed automatically,

could you please help me to find out where to get the SSID ?





On 4月10日, 上午11時23分, Roman Baumgaertner <roman.baumgaert...@t-
mobile.com> wrote:
> Hi Nail,
>
> You mentioned that you are connected. What does it mean you are connected?
> Did you get an IP address or are you attached to the AP (you should be able
> to see the SSID)?
>
> Try first to find out on the AP whether it can see you.
>
> Roman Baumgaertner
>
> Sr. SW Engineer-OSDC
> ・T・ ・ ・Mobile・ stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On 4/9/09 7:19 PM, "nail" <s894...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi, I have enabledwifiusing the following command written in
> represent those of T-Mobile USA, Inc.- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

Androidphan

unread,
Apr 10, 2009, 2:30:43 AM4/10/09
to android-porting
I have a problem with Wifi that it's not showing any scan results in
the GUI.
Anyone patched that problem already? I think it's the parseresults
function.

Roman Baumgaertner

unread,
Apr 10, 2009, 7:33:35 PM4/10/09
to PORTING 6
Nail,

I don't understand your question. If you are connected you should see with
the command iwconfig to which SSID you are attached to.

It might make sense to send the detail configuration of your supplicant to
find out what is going on. Make sure that you have nowhere a typo in your
configuration files.

Roman Baumgaertner

Sr. SW Engineer-OSDC
・T・ ・ ・Mobile・ stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

nail

unread,
Apr 13, 2009, 12:26:20 AM4/13/09
to android-porting
dear Roman,

sorry for i have not explain my question enough, and i will be glade
to explain it again:

my goal is to enable the "intel 3945 abg" wifi component on our x86
target platform

so my first step is to enable corresponding kernel config and built-in
corresponding firmware

my next step is trying to build wpa_xxx utility into android to
support wifi setting,
these utility include wpa_cli, wpa_supplicant, ... , etc.

after that, i try to config wpa_supplicant.conf, and all the contents
are shown below:

=====================================================================
wpa_supplicant.conf

update_config=1
ctrl_interface=wlan0
eapol_version=1

# ap_scan=1: wpa_supplicant initiates scanning and AP select
ap_scan=1
fast_reauth=1

network={
ssid="simple"
psk="very secret passphrase"
priority=5
}

# Wildcard match for SSID (plaintext APs only).
#This example selects any
# open AP regardless of its SSID.
network={
key_mgmt=NONE
}
===========================================================================


and I enable wifi using the following command written in
init.rc:
=======================================================
"mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/system/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp


ifup wlan0


service wpa_supplicant /system/bin/logwrapper /system/bin/
wpa_supplicant -iwlan0 -c/system/etc/wifi/wpa_supplicant.conf -dd
group wifi


service wlan_dhcpcd /system/bin/dhcpcd wlan0 "

===================================================================

after all steps, i can connect to the newwork , and get IP

but i don't know which AP the wifi has connected, it is

configured automatically.

although wifi has connected, but the "setting wifi" section in the
android UI

does not know this inform, i.e. i can not enable wifi selection on
android UI

so, my next step is to let android UI knows that the wifi

has enabled, i.e. i need to connect upper and below together


BTW, when i type iwconfig, it shows: not found

thank you for your help


On 4月11日, 上午7時33分, Roman Baumgaertner <roman.baumgaert...@t-
mobile.com> wrote:
> Nail,
>
> I don't understand your question. If you are connected you should see with
> the command iwconfig to which SSID you are attached to.
>
> It might make sense to send the detail configuration of your supplicant to
> find out what is going on. Make sure that you have nowhere a typo in your
> configuration files.
>
> Roman Baumgaertner
>
> Sr. SW Engineer-OSDC
> ・T・ ・ ・Mobile・ stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>

Roman

unread,
Apr 13, 2009, 8:42:53 PM4/13/09
to android-porting
Hi Nail,

Here is an article which might help

http://w1.fi/wpa_supplicant//devel/driver_wrapper.html

Of course you still have to find out how to hook up your code exactly
to the Android wifi support.

Have you tried already to install a common Linux Wifi supplicant on
your board?

--Roman

nail

unread,
Apr 13, 2009, 9:59:32 PM4/13/09
to android-porting
Dear Roman,

two weeks ago, i try to build common wpa_supplicant into normal linux
OS,

but i failed to build wpa_supplicant。

thank you for your hint, and i will keep working on this topic :-)

On 4月14日, 上午8時42分, Roman <roman.baumgaert...@t-mobile.com> wrote:
> Hi Nail,
>
> Here is an article which might help
>
> http://w1.fi/wpa_supplicant//devel/driver_wrapper.html
>
> Of course you still have to find out how to hook up your code exactly
> to the Androidwifisupport.
>
> Have you tried already to install a common LinuxWifisupplicant on
> your board?
>
> --Roman
>
> On Apr 12, 9:26 pm, nail <s894...@gmail.com> wrote:
>
>
>
> > dear Roman,
>
> > sorry for i have not explain my question enough, and i will be glade
> > to explain it again:
>
> > my goal is to enable the "intel 3945 abg"wificomponent on our x86
> > and I enablewifiusing the following command written in
> > init.rc:
> > =======================================================
> >    "mkdir /data/misc/wifi0770wifiwifi
> >     mkdir /data/misc/wifi/sockets 0770wifiwifi
> >     mkdir /data/system/wpa_supplicant 0770wifiwifi
> >     mkdir /data/misc/dhcp 0770 dhcp dhcp
> >     chown dhcp dhcp /data/misc/dhcp
>
> >     ifup wlan0
>
> >     service wpa_supplicant /system/bin/logwrapper /system/bin/
> > wpa_supplicant -iwlan0 -c/system/etc/wifi/wpa_supplicant.conf -dd
> >         groupwifi
>
> >     service wlan_dhcpcd /system/bin/dhcpcd wlan0   "
>
> > ===================================================================
>
> > after all steps, i can connect to the newwork , and get IP
>
> > but i don't know which AP thewifihas connected, it is
>
> > configured automatically.
>
> > althoughwifihas connected, but the "settingwifi" section in the
> > android UI
>
> > does not know this inform, i.e. i can not enablewifiselection on
> > > >>>>>>> I'm getting the following- 隱藏被引用文字 -
>
> - 顯示被引用文字 -...
>
> 閱讀更多 »

nail

unread,
Apr 14, 2009, 5:47:06 AM4/14/09
to android-porting
dear Roman,

i found the wlan interface which wpa_supplicant create is locate at
root dir, i.e. /wlan0,

so, i try to use "wpa_cli -p /wlan0", it can connect to
wpa_supplicant :-)

next step i need to let android wifi UI has the same behavior as
wpa_cli command,

i modify some code of "Framework/base/services/java/com/android/server/
Wifiservice.java
" and "hardware/libhardware_legacy/wifi/wifi.c",

after execute, i got following error:

"D/WifiHW ( 2127): Unable to open connection to supplicant on "/
wlan0": Connection refused",

i think this is some kind of "permission deny", and the user:group of /
waln0 is root:wifi,

do you have any idea about this issue :-(

On 4月14日, 上午8時42分, Roman <roman.baumgaert...@t-mobile.com> wrote:
> Hi Nail,
>
> Here is an article which might help
>
> http://w1.fi/wpa_supplicant//devel/driver_wrapper.html
>
> Of course you still have to find out how to hook up your code exactly
> to the Androidwifisupport.
>
> Have you tried already to install a common LinuxWifisupplicant on
> your board?
>
> --Roman
>
> On Apr 12, 9:26 pm, nail <s894...@gmail.com> wrote:
>
>
>
> > dear Roman,
>
> > sorry for i have not explain my question enough, and i will be glade
> > to explain it again:
>
> > my goal is to enable the "intel 3945 abg"wificomponent on our x86
> > and I enablewifiusing the following command written in
> > init.rc:
> > =======================================================
> >    "mkdir /data/misc/wifi0770wifiwifi
> >     mkdir /data/misc/wifi/sockets 0770wifiwifi
> >     mkdir /data/system/wpa_supplicant 0770wifiwifi
> >     mkdir /data/misc/dhcp 0770 dhcp dhcp
> >     chown dhcp dhcp /data/misc/dhcp
>
> >     ifup wlan0
>
> >     service wpa_supplicant /system/bin/logwrapper /system/bin/
> > wpa_supplicant -iwlan0 -c/system/etc/wifi/wpa_supplicant.conf -dd
> >         groupwifi
>
> >     service wlan_dhcpcd /system/bin/dhcpcd wlan0   "
>
> > ===================================================================
>
> > after all steps, i can connect to the newwork , and get IP
>
> > but i don't know which AP thewifihas connected, it is
>
> > configured automatically.
>
> > althoughwifihas connected, but the "settingwifi" section in the
> > android UI
>
> > does not know this inform, i.e. i can not enablewifiselection on

>> Kewl Tux.

unread,
Apr 15, 2009, 1:29:10 AM4/15/09
to android-porting
In the supplicant conf file you can put GROUP=system . This will
create sockets with permission for "system".

Thanks,

Jithu.

Roman Baumgaertner

unread,
Apr 22, 2009, 4:19:18 PM4/22/09
to PORTING 6
Hello Nail,

Sorry for the late response. I took some vacation .... I am not sure exactly
in which order you are trying to port the Wifi to your device.

In general I would recommend to make sure that your needed functionality is
running on native before you do any integration on Java level.

You might want to check in the Wifi native code in which cases (if not done
yet) the error " Unable to open connection to supplicant on" is reported.

Please, keep me updated about your progress.

Thx,
Roman

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


Reply all
Reply to author
Forward
0 new messages