This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WiFi uid problem keeping WiFi from Working?

Genius 3185 points

Replies: 5

Views: 5656

I'm running ICS DevKit 3.0.0 on a custom OMAP3530 board with a WL1271 attached to MMC2, similar to the omap3evm.  WiFi doesn't want to become enabled, and it seems to be a file permissions issue having to do with processes running as "system" (uid 1000) instead of "wifi" (uid 1010).

I have found that WiFI doesn't start apparently because "Cannot set RW to "/data/misc/wifi/wpa_supplicant.conf": Permission denied".  My init.rc file is copied from the omap3evm version, but with a few tweaks for our display, and bluetooth commented out, but wifi is identical.  It sets permissions and uid/gid just as in the omap3evm's version.  The problem seems to be that the thread is running with uid=system (1000) instead of uid=wifi (1010).  I added a debug message to display this:

E/WifiHW  ( 1261): Cannot set RW to "/data/misc/wifi/wpa_supplicant.conf": Permission denied
E/WifiHW  ( 1261): ----- Program uid = 1000, euid = 1000, gid = 1000, egid = 1000
E/WifiHW  ( 1261): Wi-Fi will not be enabled

I think this should be running as uid/gid = 1010 (wifi).

Is this correct?

Why might this be running as system (1000) instead of wifi (1010)?

A full log is here: 8446.log.txt

Thanks in advance,

Chris

5 Replies

  • Could you attach the init.rc for your board for us to analyse this further.

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

  • In reply to Vishveshwar Bhat:

    Here's the init.rc file.  (I should have thought of that!  Sorry.)  0361.init.rc.gz

    Thanks!

  • In reply to Chris R:

    I have found that the TI-Android-ICS-PortingGuide ( http://processors.wiki.ti.com/index.php/TI-Android-ICS-PortingGuide ) indicates that init.rc should have this:

    # give system access to wpa_supplicant.conf for backup and restore
    mkdir /system/etc/wifi 0770 system wifi
    chmod 0770 /system/etc/wifi
    chmod 0660/system/etc/wifi/wpa_supplicant.conf
    chown system wifi /system/etc/wifi/wpa_supplicant.conf
    mkdir /data/misc/wifi 0770 system wifi
    mkdir /data/misc/wifi/sockets 0770 system 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

    But the init.rc file for omap3evm in the 3.0.0 devkit has only this:

    # give system access to wpa_supplicant.conf for backup and restore
    mkdir /data/misc/wifi 0770 wifi wifi
    chmod 0660 /data/misc/wifi/wpa_supplicant.conf

    Are the additional entries required?

    Attempting to debug the UID issue, I found that if I used the porting guide's settings but also changed /data/misc/wifi/ and /data/misc/wifi/wpa_supplicant.conf to be owned by system that the UID access problem went away, although the WiFi still didn't work. I also found (regarding the debug messages in the prior post) that thread 1261 that couldn't "set RW" was zygote, and was running with UID system.  However, I'm not sure why zygote would be testing the suitability of wpa_supplicant.conf to being writable.  Suggestions?

    Thanks in advance!

  • In reply to Chris R:

    Hi,

     Any update on this? I am also facing the similar issue. The wpa_supplicant service is not running from init.rc file even after following the http://processors.wiki.ti.com/index.php/TI-Android-ICS-PortingGuide and i try to run the wpa_cli cmd. getting error saying "could not connect to wpa_supplicant ..." .I have build the wpa_supplicant(ver 0.08), compat wireless drivers and applied necessary patches for beagleboard xM to make MMC2 work for wl1271 driver. I get "loaded" , "initialized" logs when i insmod the wl12xx.ko , wl12xx_sdio.ko modules. Any help on this will be appreciated !!!

    Thanks,

    Mahesh

  • In reply to Mahesh Patil:

    Hi Chris,

    Did you had any luck on resolving the Wifi permission denied error?

    If yes, Can you please post you init.rc.

    Regards,

    Krunal


This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.