[G1 Android Development] shafty023:
Ok I'm setting up this thread as a place to collect my thoughts as I'm trying to get wifi working in Blur. I'm also hoping others will chime in and offer their help.

Currently I have wifi working from the commandline now :)

Here is what I have so far.

Wifi module (wlan.ko) loads into the kernel

insmod /system/lib/modules/wlan.ko

Produces the following output from lsmod

I am able to now load the wifi driver

start wlan_loader

Produces the following output from dmesg

I can now get wpa_supplicant loading after some mods to wpa_supplicant.conf

wpa_supplicant -Dwext -itiwlan0 -c /etc/wifi/wpa_supplicant.conf -dd

Produces the following shortened output. It's long so I cropped it

Next is a verification we have the device

ls -l /dev/socket/wpa*
srw-rw---- 1 1010 1010 0 Nov 14 16:48 wpa_tiwlan0

Next let's verify we can scan open wireless networks

[B]wpa_cli[/B]
> [B]scan[/B]
OK
<2>CTRL-EVENT-STATE-CHANGE id=-1 state=2
>
<2>CTRL-EVENT-SCAN-RESULTS Ready
> [B]scan results[/B]
bssid / frequency / signal level / flags / ssid
00:14:6c:18:2f:0e 2462 -53 [WPA-PSK-TKIP] Quantum
00:24:01:7a:72:9d 2422 -75 [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP] frankiejparker
00:24:56:19:68:61 2412 -78 [WEP] 2WIRE466
00:1f:b3:d5:da:59 2427 -82 [WPA-PSK-TKIP] 2WIRE699
00:1e:c7:21:48:b9 2442 -83 [WPA-PSK-TKIP] 2WIRE604
00:21:29:9e:26:da 2412 -85 [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP] Leightons Network
02:18:41:e0:7f:f3 2437 -86 [WEP] 2WIRE817
00:1b:5b:1d:37:49 2417 -91 [WPA-PSK-TKIP] 2WIRE523
00:25:3c:d0:c3:d1 2427 -92 [WPA-PSK-TKIP] 2WIRE297
00:1f:33:b5:c9:e2 2452 -94 [WEP] Martinez
>
<2>CTRL-EVENT-STATE-CHANGE id=-1 state=1

Here I'll add a network, enable it, configure variables, save config, connect to a network, then start dhcp

> [B]add_network[/B]
0
> [B]list_network[/B]
network id / ssid / bssid / flags
0 any [DISABLED]
> [B]enable_network 0[/B]
OK
> [B]set_network 0 ssid "yourSSID"[/B]
OK
> [B]list_network[/B]
network id / ssid / bssid / flags
0 yourSSID any
> [B]set_network 0 psk "your wpa passkey"[/B]
OK
> [B]save_config[/B]
OK
<2>CTRL-EVENT-SCAN-RESULTS Ready
<2>Trying to associate with 00:14:6c:18:2f:0e (SSID='yourSSID' freq=2462 MHz)
<2>CTRL-EVENT-STATE-CHANGE id=-1 state=3
<2>CTRL-EVENT-STATE-CHANGE id=0 state=4
<2>Associated with 00:14:6c:18:2f:0e
<2>CTRL-EVENT-STATE-CHANGE id=0 state=5
<2>CTRL-EVENT-STATE-CHANGE id=0 state=5
<2>CTRL-EVENT-STATE-CHANGE id=0 state=6
<2>CTRL-EVENT-STATE-CHANGE id=0 state=6
<2>WPA: Key negotiation completed with 00:14:6c:18:2f:0e [PTK=TKIP GTK=TKIP]
<2>CTRL-EVENT-STATE-CHANGE id=0 state=7
<2>CTRL-EVENT-CONNECTED - Connection to 00:14:6c:18:2f:0e completed (auth) [id=0 id_str=]
> quit

Now let's start up dhcp so we can get an IP

[B]start dhcpcd[/B]
[B]/system/xbin/bb/ifconfig tiwlan0[/B]
tiwlan0 Link encap:Ethernet HWaddr 00:18:41:A9:48:5F
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1901 (1.8 KiB) TX bytes:894 (894.0 B)

And there ya go, wireless is now functional from the commandline but since we're not actually activating it from the Android UI then you are not able to simply go into Settings->Wireless and connect to a network. So far it will have to be done from the commandline using the binary wpa_cli.

If an android developer would like to make a frontend be my guest :)

I've now provided you with what you need to make it work. I'll be releasing a Blur rom today that will have all the proper files and environment so these commands will work.