Freerunner android wifi

michael trimarchi at gandalf.sssup.it
Fri Jan 2 12:51:41 CET 2009


Hi,

Andy Green wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Somebody in the thread at some point said:
>
> | I solve my problem. Now my android interface can scan wireless and show
> | me all the avalaible connection.
>
> | I use now the latest kernel from openmoko too. I have a problem with 
> the
> | graphics interface and the keyboard,
> | but I hope I can solve too.
>
> Excellent, did you have to take any particular action to solve that
> issue in Android world?
>
No. Look at the hardware/libhardware/wifi/wifi.c file
There is a static path for the sockets file, that is used by android.

static const char IFACE_DIR[]           = "/data/system/wpa_supplicant";

If the directory exists it uses it

int wifi_connect_to_supplicant()
{
    char ifname[256];
    static int cleaned_up = 0;

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

    if (access(IFACE_DIR, F_OK) == 0) {
        snprintf(ifname, sizeof(ifname), "%s/%s", IFACE_DIR, iface); 
<----- this one
    } else {
        strlcpy(ifname, iface, sizeof(ifname));
    }

ifname is eth0.

The wpa_supplicant conf is modified according to the 
/data/system/wpa_supplicant directory

like this:

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

I'm not sure but I force the UNIX socket in target config file.
vendor/neo/freerunner/BoardConfig.mk

CONFIG_CTRL_IFACE       := y

Now I can se the wireless in the interface but when I choose one of 
them, android open a dialog box
and leave the keyboard in background.

Michael




More information about the openmoko-kernel mailing list