Hi,     For the moment, I managed to get the driver to work using the linux
kernel supplied rt2x00 driver for the kernel. It creates wlan0.

I think the problem might be the name of the ctrl_interface defined in
wpa_supplicant.conf file,

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


and the code that uses of the interface name in wifi.c

property_get("wifi.interface", iface, "wlan0");

this is where it is failing. What have you entered here?

In the board system.prop file, I also have the following entry:

wifi.interface = wlan0

So what do you think the correct entries are in my case? The rtx2000 ralink
kernel drivers create a wlan0 interface connection which I can access if I
normaly boot in using the linux init process.

Best regards,

Elvis

int wifi_connect_to_supplicant()
{
    char ifname[256];
    char supp_status[PROPERTY_VALUE_MAX] = {'\0'};

    LOGI("%s called",__func__);
    /* Make sure supplicant is running */
    if (!property_get(SUPP_PROP_NAME, supp_status, NULL)
            || strcmp(supp_status, "running") != 0) {
        LOGE("Supplicant not running, cannot connect");
        return -1;
    }

    property_get("wifi.interface", iface, "wlan0");

    if (access(IFACE_DIR, F_OK) == 0) {
        snprintf(ifname, sizeof(ifname), "%s/%s", IFACE_DIR, iface);
    } else {
        strlcpy(ifname, iface, sizeof(ifname));
    }
    LOGI("Interface directory = %s", IFACE_DIR);
    LOGI("Interface name = %s", ifname);
    ctrl_conn = wpa_ctrl_open(ifname);
    if (ctrl_conn == NULL) {
        LOGE("Unable to open connection to supplicant on \"%s\": %s",
             ifname, strerror(errno));
        return -1;
    }

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

Reply via email to