This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Facing problem on enabling WL1271 on Android 2.3.4

Other Parts Discussed in Thread: DM3730, WL1271

Hi All,

I have ported android on DM3730 and I want to enable Bluetooth and WIFI on Android 2.3.4 (Gingerbread).

kernel : rowboat-kernel-2.6.37-variscite

File system : AM37X

I performed necessary changes as per TI's document :

http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides

1) In WIFI, All other configuration are already there, I am bit confused about "corresponding patch Added emulation of Android private ioctls for generic WiFi drivers"

How to apply above patch ??

2) In Bluetooth, I already performed changes in Boardconfig.mk , init.rc files  in android filesystem and kernel configuration as per above document. but when i starts bluetooth from settings , at that time i get the state change event (in my logcat) but could not get the enable bluetooth.

Error Logcat :

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

D/BluetoothService( 1148): Bluetooth state 10 -> 11
V/BluetoothEventRedirector( 2067): Received android.bluetooth.adapter.action.STATE_CHANGED
D/dalvikvm( 1500): GC_EXPLICIT freed 478K, 52% free 2765K/5703K, external 716K/1038K, paused 60ms
I/bluedroid( 1148): Starting hciattach daemon
E/bluedroid( 1148): bt_enable: Timeout waiting for HCI device to come up
D/BluetoothService( 1148): Bluetooth state 11 -> 10
V/BluetoothEventRedirector( 2067): Received android.bluetooth.adapter.action.STATE_CHANGED

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

D/wpa_supplicant( 3190): Initializing interface 'wlan0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 3190): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 3190): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 3190): update_config=1
D/wpa_supplicant( 3190): ctrl_interface='wlan0'
D/wpa_supplicant( 3190): eapol_version=1
D/wpa_supplicant( 3190): ap_scan=1
D/wpa_supplicant( 3190): fast_reauth=1
D/wpa_supplicant( 3190): Initializing interface (2) 'wlan0'
E/wpa_supplicant( 3190): ioctl[SIOCGIFFLAGS]
E/wpa_supplicant( 3190): ioctl[SIOCSIWPMKSA]
E/wpa_supplicant( 3190): ioctl[SIOCSIWMODE]
E/wpa_supplicant( 3190): ioctl[SIOCGIRANGE]
E/wpa_supplicant( 3190): ioctl[SIOCGIWMODE]
E/wpa_supplicant( 3190): ioctl[SIOCSIWAP]
D/wpa_supplicant( 3190): WEXT: Operstate: linkmode=1, operstate=5
D/wpa_supplicant( 3190): Failed to add interface wlan0
D/wpa_supplicant( 3190): wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODEEXT]
D/wpa_supplicant( 3190): Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODE]
D/wpa_supplicant( 3190): wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODEEXT]
D/wpa_supplicant( 3190): Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODE]
D/wpa_supplicant( 3190): wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODEEXT]
D/wpa_supplicant( 3190): Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODE]
D/wpa_supplicant( 3190): wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODEEXT]
D/wpa_supplicant( 3190): Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODE]
D/wpa_supplicant( 3190): State: DISCONNECTED -> DISCONNECTED
I/wpa_supplicant( 3190): CTRL-EVENT-STATE-CHANGE id=-1 state=0 BSSID=00:00:00:00:00:00
D/wpa_supplicant( 3190): wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant( 3190): WEXT: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant( 3190): wpa_driver_wext_set_wpa
D/wpa_supplicant( 3190): WEXT: SIOCSIWAUTH(param 7 value 0x0) failed: No such device)
E/wpa_supplicant( 3190): Failed to disable WPA in the driver.
D/wpa_supplicant( 3190): wpa_driver_wext_set_drop_unencrypted
D/wpa_supplicant( 3190): WEXT: SIOCSIWAUTH(param 5 value 0x0) failed: No such device)
D/wpa_supplicant( 3190): wpa_driver_wext_set_countermeasures
D/wpa_supplicant( 3190): WEXT: SIOCSIWAUTH(param 4 value 0x0) failed: No such device)
D/wpa_supplicant( 3190): No keys have been configured - skip key clearing
D/wpa_supplicant( 3190): Cancelling scan request
D/wpa_supplicant( 3190): Cancelling authentication timeout
E/wpa_supplicant( 3190): ioctl[SIOCGIWMODE]
E/wpa_supplicant( 3190): ioctl[SIOCSIWAP]
D/wpa_supplicant( 3190): WEXT: Operstate: linkmode=0, operstate=6
E/wpa_supplicant( 3190): ioctl[SIOCGIFFLAGS]

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

Thanks.

Nimit

  • Nimit Solanki said:

    D/BluetoothService( 1148): Bluetooth state 10 -> 11
    V/BluetoothEventRedirector( 2067): Received android.bluetooth.adapter.action.STATE_CHANGED
    D/dalvikvm( 1500): GC_EXPLICIT freed 478K, 52% free 2765K/5703K, external 716K/1038K, paused 60ms
    I/bluedroid( 1148): Starting hciattach daemon
    E/bluedroid( 1148): bt_enable: Timeout waiting for HCI device to come up

    This type of error is usually seen when there are issues with the power-up sequence of the BT module.

    We would recommend that you first verify that the Bluetooth works from command line before trying it from android settings.

  • Hi Vishvershwar,

    I agree with your recommendation, Can you please provide me steps for verification of Bluetooth and WIFI from command line ?

    Thanks,

    Nimit

  • If you study the init.rc file carefully, you can see which commands to run on the console.

    e.g from http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides#Android_BT_HAL_Configuration

    - to power on BT module on omap3evm:
    /wl1271bt_enable /dev/ttyO1

    - to start bluetooth
    /system/bin/hciattach -n /dev/ttyO1 texas 3000000

    For Wi-Fi, I would suggest to first check using a linux kernel and filesystem. You can find some details at the following link:
    http://processors.wiki.ti.com/index.php/OMAP35xx_Wireless_Connectivity

  • Hi Vishvershwar,

    thanks for providing useful links, I tried below commands

    /wl1271bt_enable /dev/ttyO1

    but it gave me same kind of errors, Please find the logcat...

    D/BluetoothService( 1160): Bluetooth state 10 -> 11
    V/BluetoothEventRedirector( 1928): Received android.bluetooth.adapter.action.STATE_CHANGED
    D/dalvikvm( 1502): GC_EXPLICIT freed 102K, 51% free 2764K/5575K, external 716K/1038K, paused 46ms
    I/bluedroid( 1160): Starting hciattach daemon
    E/bluedroid( 1160): bt_enable: Timeout waiting for HCI device to come up
    D/BluetoothService( 1160): Bluetooth state 11 -> 10
    V/BluetoothEventRedirector( 1928): Received android.bluetooth.adapter.action.STATE_CHANGED

    Console output :

    # [  172.121795] Set BT_EN of WL1271
    [  172.126007] WL1271: Powering on

    Android getting hang after this output.

    WIFI:

    WIFI working fine with wlan_cu utility on Linux kernel and filesystem, but I am getting rebooting issue when i starts WIFI on android 2.3.4

    Thanks.

     Nimit


  • Nimit Solanki said:

    WIFI working fine with wlan_cu utility on Linux kernel and filesystem, but I am getting rebooting issue when i starts WIFI on android 2.3.4

    I'm not sure, but it seems like you are using the legacy WiLink driver which is not supported on TI Android 2.3.4 DevKit. It uses the newer open source OpenLink mac80211 drivers

    You may wish to refer http://processors.wiki.ti.com/index.php/ARM_Processor_Open_Source_Wireless_Connectivity for more details on this.

  • Hi Vishvershwar,

    I am going to refer that document for WIFI.

    Can you please suggest me any work out for Bluetooth ?

    Thanks

     Nimit

  • Hi Vishveshwar,

    I am using following AM37x  filesystem:
    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/TI_Android_GingerBread_2_3_4_DevKit_2_1/exports/AM37X.tar.gz

    Could you please let me know that , this filesystem supports WL1271 or not?

    Thanks,

    Nimit

  • The package you referred to supports both Wi-Fi and Bluetooth with WL1271 on the AM37x/omap3evm platform. This is also mentioned in the release notes:

    http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_ReleaseNotes

  • Hi Nimit,

    Are you able to fix the wifi problem?

    Same problem is reproduced in my setup using DM3730 (Filesystem over NFS).

    From the observation i realize  that  wlan0 is not getting created which should be created during the inserting the wl12xx_compat modules, hence  IOCTL errors.

    Below are the logs:

    D/wpa_supplicant( 4571): Initializing interface 'wlan0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
    D/wpa_supplicant( 4571): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
    D/wpa_supplicant( 4571): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
    D/wpa_supplicant( 4571): update_config=1
    D/wpa_supplicant( 4571): ctrl_interface='wlan0'
    D/wpa_supplicant( 4571): eapol_version=1
    D/wpa_supplicant( 4571): ap_scan=1
    D/wpa_supplicant( 4571): fast_reauth=1
    D/wpa_supplicant( 4571): Initializing interface (2) 'wlan0'
    E/wpa_supplicant( 4571): Error of ioctl[SIOCGIFFLAGS] is 19
    E/wpa_supplicant( 4571): Error of ioctl[SIOCGIFFLAGS] is No such device
    E/wpa_supplicant( 4571): Error of ioctl[SIOCGIFFLAGS] ifname wlan0  ifr.ifr_name wlan0
    E/wpa_supplicant( 4571): ioctl[SIOCGIFFLAGS]
    E/wpa_supplicant( 4571):  status of ioctl[SIOCSIWPMKSA] -1
    E/wpa_supplicant( 4571): ioctl[SIOCSIWPMKSA]
    E/wpa_supplicant( 4571): ioctl[SIOCSIWMODE]
    E/wpa_supplicant( 4571): ioctl[SIOCGIRANGE]
    E/wpa_supplicant( 4571): ioctl[SIOCGIWMODE]
    E/wpa_supplicant( 4571): ioctl[SIOCSIWAP]
    D/wpa_supplicant( 4571): WEXT: Operstate: linkmode=1, operstate=5
    D/wpa_supplicant( 4571): l2_packet_init 127
    E/wpa_supplicant( 4571): file=external/wpa_supplicant_6/wpa_supplicant/wpa_supplicant.c Func=wpa_supplicant_driver_init line=1665
    E/wpa_supplicant( 4571): fn=wpa_supplicant_init_iface2 ln=1903
    D/wpa_supplicant( 4571): Failed to add interface wlan0
    D/wpa_supplicant( 4571): wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
    E/wpa_supplicant( 4571): ioctl[SIOCSIWENCODEEXT]

    Please guide me on this.

    Thanks,

    Rithesh

  • Hi Rithesh,

    There are some known issues when enabling wifi from an NFS mounted file system. Some issues in co-existence of Ethernet/Wifi. Could you please check Wifi from an MMC file system?

  • Hi Arun,

    Thanks for your reply.

    I have not yet started the work on integration of the MMC on DM3730.

    But your lead on the MMC helped to setup properly/initialize MMC2 required by the Wl12XX driver. No wl1271 firmware is loaded and there are no error regarding the IOCTL's.

    Though the wifi issue is not yet solved since i am stuck at the scanning phase , where scan doesnot provide me any network details, hence unable to connect to any network.

    Please see the log below:

    [  368.735137]  Function ieee80211_register_hw  LINE 907
    [  368.743591]  Adding ieee80211_if_add Function ieee80211_register_hw  LINE 911
    [  368.751190] ieee80211 phy2: Failed to add default virtual iface
    [  368.757812] wl1271: loaded
    [  368.760620] wl1271: initialized
    D/Tethering( 1082): wlan0 is not a tetherable iface, ignoring
    D/wpa_supplicant( 2328): Initializing interface 'wlan0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
    D/wpa_supplicant( 2328): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
    D/wpa_supplicant( 2328): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
    D/wpa_supplicant( 2328): update_config=1
    D/wpa_supplicant( 2328): ctrl_interface='wlan0'
    D/wpa_supplicant( 2328): eapol_version=1
    D/wpa_supplicant( 2328): ap_scan=1
    D/wpa_supplicant( 2328): fast_reauth=1
    D/wpa_supplicant( 2328): Initializing interface (2) 'wlan0'
    [  370.904205] wl1271: firmware booted (Rev 6.1.5.50.69)
    D/wpa_supplicant( 2328): Interface wlan0 set UP - waiting a second for the driver to complete initialization
    D/wpa_supplicant( 2328): SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
    D/wpa_supplicant( 2328):   capabilities: key_mgmt 0xf enc 0xf flags 0x0
    D/wpa_supplicant( 2328): WEXT: Operstate: linkmode=1, operstate=5
    D/wpa_supplicant( 2328): l2_packet_init 157
    D/wpa_supplicant( 2328): Own MAC address: de:ad:be:ef:00:00
    D/wpa_supplicant( 2328): wpa_driver_wext_set_wpa
    D/wpa_supplicant( 2328): wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
    D/wpa_supplicant( 2328): wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
    D/wpa_supplicant( 2328): wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
    D/wpa_supplicant( 2328): wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
    D/wpa_supplicant( 2328): wpa_driver_wext_set_countermeasures
    D/wpa_supplicant( 2328): wpa_driver_wext_set_drop_unencrypted
    D/wpa_supplicant( 2328): RSN: flushing PMKID list in the driver
    D/wpa_supplicant( 2328): Setting scan request: 0 sec 100000 usec
    D/wpa_supplicant( 2328): WPS: Build Beacon and Probe Response IEs
    D/wpa_supplicant( 2328): WPS:  * Version
    D/wpa_supplicant( 2328): WPS:  * Wi-Fi Protected Setup State (0)
    D/wpa_supplicant( 2328): WPS:  * Version
    D/wpa_supplicant( 2328): WPS:  * Wi-Fi Protected Setup State (0)
    D/wpa_supplicant( 2328): WPS:  * Response Type (2)
    D/wpa_supplicant( 2328): WPS:  * UUID-E
    D/wpa_supplicant( 2328): WPS:  * Manufacturer
    D/wpa_supplicant( 2328): WPS:  * Model Name
    D/wpa_supplicant( 2328): WPS:  * Model Number
    D/wpa_supplicant( 2328): WPS:  * Serial Number
    D/wpa_supplicant( 2328): WPS:  * Primary Device Type
    D/wpa_supplicant( 2328): WPS:  * Device Name
    D/wpa_supplicant( 2328): WPS:  * Config Methods (0)
    D/wpa_supplicant( 2328): WPS:  * RF Bands (3)
    D/wpa_supplicant( 2328): EAPOL: SUPP_PAE entering state DISCONNECTED
    D/wpa_supplicant( 2328): EAPOL: KEY_RX entering state NO_KEY_RECEIVE
    D/wpa_supplicant( 2328): EAPOL: SUPP_BE entering state INITIALIZE
    D/wpa_supplicant( 2328): EAP: EAP entering state DISABLED
    D/wpa_supplicant( 2328): Added interface wlan0
    D/wpa_supplicant( 2328): RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
    D/wpa_supplicant( 2328): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
    D/wpa_supplicant( 2328): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
    D/wpa_supplicant( 2328): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
    D/wpa_supplicant( 2328): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
    D/wpa_supplicant( 2328): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
    D/wpa_supplicant( 2328): Wireless event: cmd=0x8b06 len=8
    D/wpa_supplicant( 2328): CMD: LIST_NETWORKS
    D/wpa_supplicant( 2328): CMD: BLACKLIST clear
    D/wpa_supplicant( 2328): wpa_supplicant_scan: scan_req = 1, ap_scan = 1
    D/wpa_supplicant( 2328): State: DISCONNECTED -> SCANNING
    I/wpa_supplicant( 2328): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00
    D/wpa_supplicant( 2328): Trying to get current scan results first without requesting a new scan to speed up initial association
    D/wpa_supplicant( 2328): Received 0 bytes of scan results (0 BSSes)
    D/wpa_supplicant( 2328): Cached scan results are empty - not posting
    D/wpa_supplicant( 2328): No suitable AP found.
    D/wpa_supplicant( 2328): Setting scan request: 0 sec 0 usec
    D/wpa_supplicant( 2328): wpa_supplicant_scan: scan_req = 1, ap_scan = 1
    D/wpa_supplicant( 2328): Starting AP scan (broadcast SSID)
    D/wpa_supplicant( 2328): wpa_driver_wext_scan: specific scan = 0
    V/WifiMonitor( 1082): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00]
    D/wpa_supplicant( 2328): Scan requested - scan timeout 10 seconds
    D/wpa_supplicant( 2328): CMD: DRIVER MACADDR
    D/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd MACADDR
    D/wpa_supplicant( 2328): CMD: SCAN_RESULTS
    D/wpa_supplicant( 2328): CMD: STATUS
    D/wpa_supplicant( 2328): CMD: DRIVER RSSI-APPROX
    D/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd RSSI-APPROX
    D/wpa_supplicant( 2328): CMD: DRIVER LINKSPEED
    D/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd LINKSPEED
    V/WifiStateTracker( 1082): Connection to supplicant established, state=SCANNING
    D/wpa_supplicant( 2328): CMD: DRIVER RXFILTER-ADD 0
    D/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd RXFILTER-ADD 0
    D/wpa_supplicant( 2328): CMD: DRIVER BTCOEXSCAN-STOP
    D/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd BTCOEXSCAN-STOP
    V/WifiStateTracker( 1082): Changing supplicant state: SCANNING ==> SCANNING
    D/wpa_supplicant( 2328): CMD: DRIVER SCAN-ACTIVE
    D/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd SCAN-ACTIVE
    D/wpa_supplicant( 2328): Scan Active command
    D/wpa_supplicant( 2328): CMD: SCAN
    E/wpa_supplicant( 2328): Ongoing Scan action...
    D/wpa_supplicant( 2328): CMD: DRIVER SCAN-PASSIVE
    D/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd SCAN-PASSIVE
    D/wpa_supplicant( 2328): Scan Passive command
    D/wpa_supplicant( 2328): EAPOL: disable timer tick
    D/wpa_supplicant( 2328): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
    D/wpa_supplicant( 2328): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
    D/wpa_supplicant( 2328): Wireless event: cmd=0x8b19 len=8
    D/wpa_supplicant( 2328): Received 0 bytes of scan results (0 BSSes)

    Please guide me.

    Thanks and Regards,

    Rithesh