2014年11月25日 星期二

Android wireless module porting guide (for TI chip discussion)

參考 http://processors.wiki.ti.com/index.php/Android_wireless_build_and_porting_guide


Important
The following instructions are for TI-Android-FroYo-DevKit-V2.2 and TI-Android-GingerBread-2.3-DevKit-1.0 only. For instructions regarding newer versions of TI Android DevKit refer to the respective Porting Guide.

BoardConfig.mk

  • WL1271 WLAN is enabled in android with the following settings in BoardConfig.mk
# Wifi
USES_TI_WL1271 := true
BOARD_WPA_SUPPLICANT_DRIVER := CUSTOM
ifdef USES_TI_WL1271
BOARD_WLAN_DEVICE           := wl1271
endif
WPA_SUPPLICANT_VERSION      := VER_0_6_X
WIFI_DRIVER_MODULE_PATH     := "/system/etc/wifi/tiwlan_drv.ko"
WIFI_DRIVER_MODULE_NAME     := "tiwlan_drv"
WIFI_FIRMWARE_LOADER        := "wlan_loader"

The setting BOARD_WLAN_DEVICE := wl1271 enables building of android components required to support the WL1271 WLAN including the firmware loader. Test apps etc.
  • Bluetooth is enabled with the following setting in BoardConfig.mk
# Bluetooth
BOARD_HAVE_BLUETOOTH := true




init.rc


  • Set owner/group and permissions for various files required to run WLAN and Bluetooth
  • Setup services for WLAN and Bluetooth

WLAN
The following services are registered in init.rc for WLAN operation:
  • wlan interface tiwlan0
setprop wifi.interface tiwlan0
  • wlan_loader - This service loads the WLAN firmware in WL1271
service wlan_loader /system/bin/wlan_loader -n \
    -f /system/etc/wifi/firmware.bin \
    -i /system/etc/wifi/tiwlan.ini
    disabled
    oneshot
  • wpa_supplicant
service wpa_supplicant /system/bin/wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
    socket wpa_tiwlan0 dgram 660 wifi wifi
    disabled
    oneshot
  • dhcpcd
service dhcpcd /system/bin/dhcpcd  -ABKL tiwlan0
    disabled
    oneshot
Bluetooth
The following services are registered in init.rc for Bluetooth operation:

  • dbus
  • bluetoothd
  • hciattach - This service attaches the BT UART HCI interface to the bluetooth stack. It is also responsible for loading the BT firmware on WL1271. Specify the UART device node the bluetooth module is interfaced to and the baudrate. On omap3evm the settings are /dev/ttyS1 and 3000000 baud.

service hciattach /system/bin/hciattach -n /dev/ttyS1 texas 3000000
    user root
# changing user to root from bluetooth is a potential security issue
    group bluetooth net_bt_admin misc
    disabled
    oneshot
  • btpwr - This service runs the wl1271bt_enable app to power-on/power-off the BT module in WL1271. See Bluedroid section below for more information. This is not required if your kernel supports rfkill interface to power on/off the BT module.
# rfkill is not supported, use this instead
service btpwr /wl1271bt_enable /dev/ttyS1
    disabled
    oneshot
  • opush - BT Object Push Profile
  • hfag and hsag - Audio Gateway service for Hands-free profile, Headset profile. This feature is available only on Gingerbread release of TI Android DevKit

沒有留言:

張貼留言