[Tilt, TyTN II, MDA Vario III Windows Mobile ROM De] Newbie16:
For Polaris users who might need this info:

First things first, make sure wlan works in Windows Mobile. This seems to be the procedure for getting the wlan into do something in Android. It seems to be very similar to the wifi tethering guides on the G1.

Custom Kernel

We need a kernel, the kernel config produced by make vogue_defconfig ARCH=arm leaves the wireless extensions disabled, so this might the cause of the missing mac address in ifconfig. Current attempts to produce a kernel with these extensions have caused the settings dialogues and ifconfig to hang, Ctrl+C does not force an exit. I'll continue to investigate this.

Tiwlan kernel module

I've found another version of the tiwlan driver, other than the one that is currently in git master which loads the firmware and gives the ok - OK

Download Update: This driver skipped checks, ignore it

so lets see if we can merge this with the newer driver to get a working one.

Initial Variables

setprop wifi.interface tiwlan0

WLan Commands

Modprobe Method:

mkdir -p /lib/modules/`uname -r`
cp /sdcard/wlan.ko /lib/modules/`uname -r`/

Insmod Method:

insmod /sdcard/wlan.ko

Tiwlan0 Mac address: No

Required Output: TIWLAN: Driver loaded

WLAN_Loader

wlan_loader -f /sdcard/Fw1251r1c.bin -e /proc/calibration -i /sdcard/tiwlan.ini

Tiwlan0 Mac address: No

Required Output: Set property wlan.driver.status = ok - Ok

ifconfig -a might need to show a mac address at this point, i'm still not sure when ifconfig -a gets the mac address info

wpa_supplicant -ddK -Dtiwlan0 -itiwlan0 -c/sdcard/wpa_supplicant.conf &

ifconfig -a must show a mac address or the next step will error out, you can assign one using the following command, just change it to mac address you see in windows. However simply assigning one with this command might not be enough, it could be the sign of a bigger problem.

ifconfig tiwlan0 hw ether 00:00:00:00:00:00

ifconfig tiwlan0 192.168.1.100 netmask 255.255.255.0
ifconfig tiwlan0 up

Log Collecting:

Dmesg - Its a ring buffer so as new info is added old info will be removed, you need to run the command right after insmod or modprobe to see if it worked ok.

[B]dmesg|grep -i wlan[/B]

TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
TIWLAN: Driver initialized (rc 0)
TIWLAN: 1251 PG [B]1.1[/B]
TIWLAN: Driver loaded

If i'm right The kaiser has 1.1. the G1 has 1.2, its a reference to the chip used.

Logcat

You can run logcat at the start to keep a log of everything the machine has done since android has started. If you run it like this it will keep logging to the file as you run other commands so when you boot back to WM and sync you can open the file in an editor like Notepad++ and see what happened. This is the first thing i run when i get to the root shell

logcat -f /sdcard/debuglog.txt &

After running the wlan_loader you can run this to check it worked ok:

[B]grep -i 'wlan' /sdcard/debuglog.txt[/B]

D/wlan_loader( 395): adapter tiwlan0, eeprom /proc/calibration, init /sdcard/tiwlan.ini, firmware /sdcard/Fw1251r1c.bin
D/wlan_loader( 395): Configuring adapter
D/wlan_loader( 395): Adapter configuration rc = 0
D/wlan_loader( 395): Starting configMge
D/wlan_loader( 395): ConfigMge start rc = 0
D/wlan_loader( 395): Driver configured
D/wlan_loader( 395): Firmware loaded and running OK
D/wlan_loader( 395): Set property wlan.driver.status = ok - Ok

i did once end up with the ok - Ok but it was hit and miss, and i've ended up with all sorts from ok - Fail to fail - Ok to fail - Fail but ifconfig has never shown a mac address on its own

Email to...

The terminal emulator in android should have an option in the menu to email everything you've seen to an email address, use that to keep logs of the entire session. Better terminal has this feature, but it stopped working, try

Files

Fw1251r1c.bin

The firmware filenames of the G1 and the Kaiser have the same name. So we should get a list of good kaiser firmware to rule firmware issues out as soon as possible. If you can connect in windows mobile to a wpa secured AP then the Fw1251r1c.bin in the windows folder on the rom should be the one you are using in Android.

File, Size in bytes, MD5SUM, Source

Fw1251r1c.bin, 185388, ebf5c2036d37bc56b4d41ddcbda4311e, 6.1 WWE ROM shifu, Download

tiwlan.ini

Lets get a good tiwlan.ini file, so we know if its causing issues.

Values:

Comming Soon...

wpa_supplicant.conf

ctrl_interface=tiwlan0
ap_scan=1
eapol_version=1
fast_reauth=1
eapol_version=1
update_config=1

network={
ssid="WIFISSID"

...

priority=1
}

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

Quick Scripts:

Its hard to type long commands on the keyboard so here are some scripts to help:

[B]/sdcard/cmd1[/B]

#!/bin/sh
echo 'Setting Variables...'
setprop wifi.interface tiwlan0
echo 'Variables Set!'
echo 'Logging to /sdcard/debuglog.txt...'
pkill logcat
logcat -f /sdcard/debuglog.txt &
echo 'Logger Started!'
echo 'Copying WLan Module...'
mkdir -p /lib/modules/`uname -r`
cp /system/lib/modules/wlan.ko /lib/modules/`uname -r`/
echo 'Module Coppied!'
echo 'Loading Module...'
modprobe wlan
lsmod
echo 'Module Loaded!'
#

[B]/sdcard/cmd2[/B]

#!/bin/sh
echo 'Running Loader...'
wlan_loader -f /sdcard/Fw1251r1c.bin -e /sdcard/calibration -i /sdcard/tiwlan.ini
echo 'Loder Completed'
echo 'Ifconfig Output'
ifconfig -a
dmesg|grep -i wlan
cat /sdcard/debuglog.txt... |grep -i wlan
#

Output:

$ su

~ # cd /sdcard/

/sdcard # ./cmd1

Setting Variables...

Variables Set!

Logging to /sdcard/debuglog.txt...

Logger Started!

Copying WLan Module...

Module Coppied!

Loading Module...

wlan 584168 0 - Live 0xbf000000

Module Loaded!

/sdcard # ./cmd2

Running Loader...

Loder Completed

Ifconfig Output

tiwlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:100

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

[ 96.701234] TIWLAN: Driver loading

[ 97.593872] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)

[ 97.599251] TIWLAN: Driver initialized (rc 0)

[ 97.599511] TIWLAN: 1251 PG 1.1

[ 97.599547] TIWLAN: Driver loaded

D/wlan_loader( 518): adapter tiwlan0, eeprom /sdcard/calibration, init /system/etc/wifi/tiwlan.ini, firmware /sdcard/Fw1251r1c.bin

D/wlan_loader( 518): Configuring adapter

D/wlan_loader( 518): Adapter configuration rc = 0

D/wlan_loader( 518): Starting configMge

D/wlan_loader( 518): ConfigMge start rc = 0

D/wlan_loader( 518): Driver configured

D/wlan_loader( 518): Firmware loaded and running OK

D/wlan_loader( 518): Set property wlan.driver.status = ok - Ok