static int control_supplicant(int startIt)
{
    char supp_status[PROPERTY_VALUE_MAX] = {'\0'};
    const char *ctrl_prop = (startIt ? "ctl.start" : "ctl.stop");
    const char *desired_status = (startIt ? "running" : "stopped");
    int count = 20; /* wait at most 20 seconds for completion */

    if (property_get(SUPP_PROP_NAME, supp_status, NULL)
        && strcmp(supp_status, desired_status) == 0) {
        return 0;  /* supplicant already running */
    }
    property_set(ctrl_prop, SUPPLICANT_NAME);

    while (count-- > 0) {
        usleep(1000000);
        if (property_get(SUPP_PROP_NAME, supp_status, NULL)) {
            if (strcmp(supp_status, desired_status) == 0)
                return 0;
        }
    }
    return -1;
}

Do you know which line is to start wpa_supplicant?

Thanks
Richard

2008/12/9 Jithu Jance <[EMAIL PROTECTED]>:
> Thanks a lot Richard. This is really a good pointer..
>
>>> Jithu Jance.
>
>
> On Tue, Dec 9, 2008 at 12:50 PM, Richard Zhao <[EMAIL PROTECTED]> wrote:
>>
>> I think it's :
>> GUI -> libhardware -> wpa_supplicant -> wext -> wifi driver
>> Your driver is using wireless externsion, right?
>>
>> libhardware is now using Ti wlan driver. Maybe we must modify
>> hardware/libhardware/wifi/wifi.c
>>
>> Thanks
>> Richard
>>
>> 2008/12/9 Jithu Jance <[EMAIL PROTECTED]>:
>> > Hi Richard,
>> >
>> > You r welcome.. btw I am also stuck up there.. How did u manage to hook
>> > wpa_supplicant to GUI??? I saw Wifi Manager framework folder. I am
>> > confused
>> > how we could hook our wifi driver to the GUI.
>> >
>> > From your mail, i understand GUI talks to the wpa_supplicant which
>> > inturn
>> > talks to the wlandriver. But I didnt see anything in the wpa_supplican
>> > that
>> > is using the wifi manager framework. or is it some service like
>> > wifimanager
>> > which actually talks to the supplicant???
>> >
>> > GUI - wpa_supplicant - wlandriver
>> >
>> > if you have any idea on the above query pls help me out.
>> >
>> > What I did try was to connect using hyperterminal to the eval board and
>> > invoke supplicant through commandline. It worked but doesn't make sense
>> > as
>> > its not connected to the GUI. I want to use GUI for controlling my wifi
>> > driver
>> >
>> >
>> > Thanks..
>> >
>> >>> Jithu
>> >
>> >
>> > On Tue, Dec 9, 2008 at 7:32 AM, Richard Zhao <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hi Jithu,
>> >>
>> >> Thanks very much!
>> >> Now I compiled out wpa_supplicant, but the GUI always says
>> >> wpa_supplicant load failed.
>> >>
>> >> Thanks
>> >> Richard
>> >>
>> >> 2008/12/7 Jithu Jance <[EMAIL PROTECTED]>:
>> >> > I saw ur question on wpa_supplicant for android
>> >> >
>> >> > I also got stuck at the same  problem.. then i modified Android.mk
>> >> > file
>> >> > in
>> >> > wpa_supplicant dir and changed BUILD_SUPPLICANT :=true. Make sure u
>> >> > edit
>> >> > .config file to include WEXT. and then build android again.. You can
>> >> > find
>> >> > wpa_supplicant in system/bin directory..
>> >> >
>> >> >>> Jithu Jance.
>> >> >
>> >
>> >
>
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to