Wifi port issue (all works except the backend)

by brucelee » Sat, 19 Mar 2011 08:36:41 GMT


Sponsored Links
 hey, am having a small problem with porting wifi to a my device.

This is my config:

wifi.c (in libhardware_legacy)
    static const char IFACE_DIR[]           = "/data/misc/wifi/
wpa_supplicant";
    static const char SUPP_CONFIG_TEMPLATE[]= "/system/etc/wifi/
wpa_supplicant.conf";
    static const char SUPP_CONFIG_FILE[]    = "/data/misc/wifi/
wpa_supplicant.conf";


wpa_supplicant.conf
    update_config=1
    ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant


init.rc
    mkdir /data/misc/wifi 0770 wifi wifi
    chmod 0770 /data/misc/wifi
    chmod 0660 /data/misc/wifi/wpa_supplicant.conf
    chown wifi wifi /data/misc/wifi/wpa_supplicant.conf

    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 socket (unix socket mode)
    mkdir /data/misc/wifi/wpa_supplicant 0771 wifi wifi
    chmod 0771 /data/misc/wifi/wpa_supplicant
    chown wifi wifi /data/misc/wifi/wpa_supplicant

    service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -
ieth0 -c /system/etc/wifi/wpa_supplicant.conf
    group system wifi inet
    disabled
    oneshot

Notes:

- Wifi driver/module loads properly (wifi.c, dmesg, iwconfig say so)
- Logcat reports:
    WifiHW: Unable to open connection to supplicant on "eth0": No such
file or directory (~ 4 times then unloads wifi)
- Manually loading the driver/module and
    > running wpa_supplicant (as the service above) gives not errors &
proper logcat
        although it does make this dmesg entry:
            <4>[735, wpa_supplicant] [ 1479.081526] Enter
wl_control_wl_start
            <4>[735, wpa_supplicant] [ 1479.081567] Exited
wl_control_wl_start

    > running 'wpa_cli -p /data/misc/wifi/wpa_supplicant' gives
        Selected interface 'eth0'
        Could not connect to wpa_supplicant - re-trying
    and forever remains this way

    > running 'iwlist scan' works and shows wi-fi networks

My guess would be that my permissions are wrong, but i have been
double checking with 'ls -l' and they seem ok.
The wpa_supplimentary socket 'eth0' does get created so it exists.
My guess would be that the android wifi backend runs as a specific
user other than wifi!?

-- 



Other Threads

1. Android market hiding apps with bluetooth permissions from Android 1.5 and 1.6

Hi

I released updates of my apps yesterday and they are being hidden from
android 1.5 and 1.6 phones.

This is due to a Market bug which hides apps with bluetooth
permissions from android 1.5 and 1.6.

Come on Google fix the market. We spend countless hours making are
apps work on ALL android versions and now you do this...

This issue has been raised since June, but has only affected me since
i made an update to the market yesterday.

I am now have annoyed customers and i am missing out on what 50% of
users because of the flakey market...

-- 

2. Native encryption for Android

Hi Guys

Just got my first Android phone and wow absolutely fantastic! What a
great operating system you have created and its open unlike certain
other fruit based offerings
Just one problem I work for the NHS in the UK and have synced my
mail account to my device. However in December this year NHS mail are
implementing new policies for mobile devices and will BLOCK any device
that does not support native encryption so i-Phone ok Android no.

This means that by December I (along with several thousand other NHS
mail users with Android devices) will no-longer be able to access our
mail, contacts and calendars whilst out of the office. This is a shame
because I think a lot of our front-line staff who do the real work of
treating patients would benefit from these devices which I believe are
cheaper to own and have more and better functionality.

So please please can you build in native support for encryption so we
can continue to connect to our NHS mail.

Cheers Tony

-- 

3. SE X10 Mini Pro?

4. Review KOR 1.0b1 - was WTI: Kang-o-rama 1.0 beta 1

5. WAT: Apakah Factory Data Reset akan mereset OS yang telah terUpdate?

6. Downgrade Radio WTA : Upgrade Radio HTC Dream G1

7. Pengakuan Seorang Suam