我用的是佐臻WG7310 WIFI 模块 。它用wl1271 芯片。源代码包MAC80211下面有config文件,这里有一些conf文件,应该编译时需要的。但android。mk文件中用到了 WLAN_Calibration_Script.sh 文件,这个文件应该是系统启动后批处理的文件。这个文件怎么用亚。
我的理解 wpa_supplicant.conf hostapd.conf dhcpcd.conf 这个文件是编译时参见的,TQS_S_2.6.ini 和 WLAN_Calibration_Script.sh 是系统启动后运行的,他们都在一起是怎么工作的呢,是不是系统启动后我再运行WLAN_Calibration_Script.sh 呢?手动运行一下?
android。mk如下
include $(CLEAR_VARS)
LOCAL_MODULE := wpa_supplicant.conf
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi
LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)
########################
include $(CLEAR_VARS)
LOCAL_MODULE := hostapd.conf
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi
LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := dhcpcd.conf
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/dhcpcd
LOCAL_SRC_FILES := android_dhcpcd.conf
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := TQS_S_2.6.ini
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi
LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)
########################
include $(CLEAR_VARS)
LOCAL_MODULE := wifical.sh
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE_PATH := $(TARGET_OUT)/bin
LOCAL_SRC_FILES := WLAN_Calibration_Script.sh
LOCAL_MODULE_CLASS := SCRIPT
include $(BUILD_PREBUILT)
WLAN_Calibration_Script.sh文件如下,这个文件是应该在系统启动后运行的把,
case "$WIFION" in
"running") echo " ********************************************************"
echo " * Turn Wi-Fi OFF and launch the script for calibration *"
echo " ********************************************************"
exit;;
*) echo " ******************************"
echo " * Starting Wi-Fi calibration *"
echo " ******************************";;
esac
TARGET_FW_DIR=/system/etc/firmware/ti-connectivity
TARGET_FW_FILE=$TARGET_FW_DIR/wl1271-nvs.bin
TARGET_NVS_FILE=/system/etc/wifi/TQS_S_2.6.ini
# Remount system partition as rw
mount -o remount rw /system
cd $TARGET_FW_DIR
#Create reference NVS file
/system/bin/calibrator set ref_nvs $TARGET_NVS_FILE
/system/bin/cat ./new-nvs.bin > $TARGET_FW_FILE
/system/bin/ifconfig wlan0 down/system/bin/rmmod wl12xx_sdio
#Load driver
/system/bin/insmod /system/lib/modules/wl12xx_sdio.ko
/system/bin/ifconfig wlan0 down
#Calibrator
/system/bin/calibrator plt calibrate single/system/bin/cat ./new-nvs.bin > $TARGET_FW_FILE
#Update NVS with MAC address
#/system/bin/calibrator set nvs_mac ./new-nvs.bin
/system/bin/calibrator set nvs_mac wl1271-nvs.bin 00:c9:82:48:ed:32
/system/bin/rmmod wl12xx_sdio
/system/bin/rmmod wl12xx
/system/bin/insmod /system/lib/modules/wl12xx.ko
/system/bin/insmod /system/lib/modules/wl12xx_sdio.ko
echo " ******************************"
echo " * Finished Wi-Fi calibration *"
echo " ******************************"
我现在wifi不稳定,是不是与这个有关系呢 ,我现在系统启动后没有运行这个WLAN_Calibration_Script.sh文件。它怎么校准呢
Steven Liu1:
没有用过TQ+Wlink7的东西,而且这个东西和wireless的关系很大,建议同时发到无线板块,让wireless的同事们给些建议。