2012年3月22日 星期四

TI WLAN NLCP calibration

Platform: Nook Color ICS with WiFi Direct

1. mount system partition readable/write-able
mount -o rw,remount /dev/block/mmcblk0p5 /system
2. unload driver
rmmod wl12xx_sdio
3 generate reference nvs for calibration
calibrator set ref_nvs /system/etc/wifi/ini_files/127x_TQS_S_2.6.ini /system/etc/firmware/ti-connectivity/wl1271-nvs.bin
4. reload the driver 
insmod wl12xx_sdio
5. Power on the device in PLT mode
calibrator wlan0 plt power_mode on
6. TX-BIP procedure
calibrator wlan0 plt tune_channel 0 7
calibrator wlan0 plt nvs_ver 0x0403
calibrator wlan0 plt tx_bip 1 0 0 0 0 0 0 0 /system/etc/firmware/ti-connectivity/wl1271-nvs.bin
7. Write MAC
calibrator set nvs_mac /system/etc/firmware/ti-connectivity/wl1271-nvs.bin 08:00:28:31:32:33

ICS WiFi Direct understanding

The Android 4.0 (ICS) WiFi Direct didn't support any service discovery or any default application ( one demo program) .
The implementation only take care the connection.
That mean the ICS take care two p2p device set up the TCP/IP networking well and other is application specific job.

Moto Defy MB525 CM7/CM9 TIWLAN MCP Calibration step by step

Turn on USB ADB debugging
Connect to defy through adb

1. Turn off Wifi First
svc wifi disable
2. load wifi driver
insmod /system/lib/modules/tiwlan_drv.ko
3. load wifi firmware
/system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini
4. turn on tiwlan0
ifconfig tiwlan0 up
5. execute wlan_cu utility
wlan_cu -b
6. execute following command
/ w p 1
/ w l 2
/ w f 2
/ t r h 0 7
/ t b b 375 128 0
/ t b t 1 0 0 0 0 0 0 0
/ q
7. copy new calibration data to default path
cp /data/misc/wifi/nvs_map.bin /pds/wifi/nvs_map.bin
sync
sync

8. unload TI wlan driver
rmmod tiwlan_drv