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 -> 11V/BluetoothEventRedirector( 2067): Received android.bluetooth.adapter.action.STATE_CHANGEDD/dalvikvm( 1500): GC_EXPLICIT freed 478K, 52% free 2765K/5703K, external 716K/1038K, paused 60msI/bluedroid( 1148): Starting hciattach daemonE/bluedroid( 1148): bt_enable: Timeout waiting for HCI device to come upD/BluetoothService( 1148): Bluetooth state 11 -> 10V/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=1D/wpa_supplicant( 3190): ctrl_interface='wlan0'D/wpa_supplicant( 3190): eapol_version=1D/wpa_supplicant( 3190): ap_scan=1D/wpa_supplicant( 3190): fast_reauth=1D/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=5D/wpa_supplicant( 3190): Failed to add interface wlan0D/wpa_supplicant( 3190): wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODEEXT]D/wpa_supplicant( 3190): Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODEE/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=0E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODEEXT]D/wpa_supplicant( 3190): Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODEE/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=0E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODEEXT]D/wpa_supplicant( 3190): Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODEE/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=0E/wpa_supplicant( 3190): ioctl[SIOCSIWENCODEEXT]D/wpa_supplicant( 3190): Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODEE/wpa_supplicant( 3190): ioctl[SIOCSIWENCODE]D/wpa_supplicant( 3190): State: DISCONNECTED -> DISCONNECTEDI/wpa_supplicant( 3190): CTRL-EVENT-STATE-CHANGE id=-1 state=0 BSSID=00:00:00:00:00:00D/wpa_supplicant( 3190): wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)D/wpa_supplicant( 3190): WEXT: Operstate: linkmode=-1, operstate=5D/wpa_supplicant( 3190): wpa_driver_wext_set_wpaD/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_unencryptedD/wpa_supplicant( 3190): WEXT: SIOCSIWAUTH(param 5 value 0x0) failed: No such device)D/wpa_supplicant( 3190): wpa_driver_wext_set_countermeasuresD/wpa_supplicant( 3190): WEXT: SIOCSIWAUTH(param 4 value 0x0) failed: No such device)D/wpa_supplicant( 3190): No keys have been configured - skip key clearingD/wpa_supplicant( 3190): Cancelling scan requestD/wpa_supplicant( 3190): Cancelling authentication timeoutE/wpa_supplicant( 3190): ioctl[SIOCGIWMODE]E/wpa_supplicant( 3190): ioctl[SIOCSIWAP]D/wpa_supplicant( 3190): WEXT: Operstate: linkmode=0, operstate=6E/wpa_supplicant( 3190): ioctl[SIOCGIFFLAGS]
--------------------------------------------------------------------------------------------------------------------------------------------------
Thanks.
Nimit
Nimit Solanki D/BluetoothService( 1148): Bluetooth state 10 -> 11V/BluetoothEventRedirector( 2067): Received android.bluetooth.adapter.action.STATE_CHANGEDD/dalvikvm( 1500): GC_EXPLICIT freed 478K, 52% free 2765K/5703K, external 716K/1038K, paused 60msI/bluedroid( 1148): Starting hciattach daemonE/bluedroid( 1148): bt_enable: Timeout waiting for HCI device to come up
D/BluetoothService( 1148): Bluetooth state 10 -> 11V/BluetoothEventRedirector( 2067): Received android.bluetooth.adapter.action.STATE_CHANGEDD/dalvikvm( 1500): GC_EXPLICIT freed 478K, 52% free 2765K/5703K, external 716K/1038K, paused 60msI/bluedroid( 1148): Starting hciattach daemonE/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.
--------------------------------------------------------------------------------------------------------- Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
Hi Vishvershwar,
I agree with your recommendation, Can you please provide me steps for verification of Bluetooth and WIFI from command line ?
Thanks,
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
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
Nimit Solanki 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.
I am going to refer that document for WIFI.
Can you please suggest me any work out for Bluetooth ?
Thanks
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?
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=1D/wpa_supplicant( 4571): ctrl_interface='wlan0'D/wpa_supplicant( 4571): eapol_version=1D/wpa_supplicant( 4571): ap_scan=1D/wpa_supplicant( 4571): fast_reauth=1D/wpa_supplicant( 4571): Initializing interface (2) 'wlan0'E/wpa_supplicant( 4571): Error of ioctl[SIOCGIFFLAGS] is 19E/wpa_supplicant( 4571): Error of ioctl[SIOCGIFFLAGS] is No such deviceE/wpa_supplicant( 4571): Error of ioctl[SIOCGIFFLAGS] ifname wlan0 ifr.ifr_name wlan0E/wpa_supplicant( 4571): ioctl[SIOCGIFFLAGS]E/wpa_supplicant( 4571): status of ioctl[SIOCSIWPMKSA] -1E/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=5D/wpa_supplicant( 4571): l2_packet_init 127E/wpa_supplicant( 4571): file=external/wpa_supplicant_6/wpa_supplicant/wpa_supplicant.c Func=wpa_supplicant_driver_init line=1665E/wpa_supplicant( 4571): fn=wpa_supplicant_init_iface2 ln=1903D/wpa_supplicant( 4571): Failed to add interface wlan0D/wpa_supplicant( 4571): wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0E/wpa_supplicant( 4571): ioctl[SIOCSIWENCODEEXT]
Please guide me on this.
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?
Regards,
Arun
If this post answers your query, consider clicking the Verify Answer button.
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: initializedD/Tethering( 1082): wlan0 is not a tetherable iface, ignoringD/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=1D/wpa_supplicant( 2328): ctrl_interface='wlan0'D/wpa_supplicant( 2328): eapol_version=1D/wpa_supplicant( 2328): ap_scan=1D/wpa_supplicant( 2328): fast_reauth=1D/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 initializationD/wpa_supplicant( 2328): SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xfD/wpa_supplicant( 2328): capabilities: key_mgmt 0xf enc 0xf flags 0x0D/wpa_supplicant( 2328): WEXT: Operstate: linkmode=1, operstate=5D/wpa_supplicant( 2328): l2_packet_init 157D/wpa_supplicant( 2328): Own MAC address: de:ad:be:ef:00:00D/wpa_supplicant( 2328): wpa_driver_wext_set_wpaD/wpa_supplicant( 2328): wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0D/wpa_supplicant( 2328): wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0D/wpa_supplicant( 2328): wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0D/wpa_supplicant( 2328): wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0D/wpa_supplicant( 2328): wpa_driver_wext_set_countermeasuresD/wpa_supplicant( 2328): wpa_driver_wext_set_drop_unencryptedD/wpa_supplicant( 2328): RSN: flushing PMKID list in the driverD/wpa_supplicant( 2328): Setting scan request: 0 sec 100000 usecD/wpa_supplicant( 2328): WPS: Build Beacon and Probe Response IEsD/wpa_supplicant( 2328): WPS: * VersionD/wpa_supplicant( 2328): WPS: * Wi-Fi Protected Setup State (0)D/wpa_supplicant( 2328): WPS: * VersionD/wpa_supplicant( 2328): WPS: * Wi-Fi Protected Setup State (0)D/wpa_supplicant( 2328): WPS: * Response Type (2)D/wpa_supplicant( 2328): WPS: * UUID-ED/wpa_supplicant( 2328): WPS: * ManufacturerD/wpa_supplicant( 2328): WPS: * Model NameD/wpa_supplicant( 2328): WPS: * Model NumberD/wpa_supplicant( 2328): WPS: * Serial NumberD/wpa_supplicant( 2328): WPS: * Primary Device TypeD/wpa_supplicant( 2328): WPS: * Device NameD/wpa_supplicant( 2328): WPS: * Config Methods (0)D/wpa_supplicant( 2328): WPS: * RF Bands (3)D/wpa_supplicant( 2328): EAPOL: SUPP_PAE entering state DISCONNECTEDD/wpa_supplicant( 2328): EAPOL: KEY_RX entering state NO_KEY_RECEIVED/wpa_supplicant( 2328): EAPOL: SUPP_BE entering state INITIALIZED/wpa_supplicant( 2328): EAP: EAP entering state DISABLEDD/wpa_supplicant( 2328): Added interface wlan0D/wpa_supplicant( 2328): RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])D/wpa_supplicant( 2328): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedD/wpa_supplicant( 2328): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])D/wpa_supplicant( 2328): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedD/wpa_supplicant( 2328): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])D/wpa_supplicant( 2328): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedD/wpa_supplicant( 2328): Wireless event: cmd=0x8b06 len=8D/wpa_supplicant( 2328): CMD: LIST_NETWORKSD/wpa_supplicant( 2328): CMD: BLACKLIST clearD/wpa_supplicant( 2328): wpa_supplicant_scan: scan_req = 1, ap_scan = 1D/wpa_supplicant( 2328): State: DISCONNECTED -> SCANNINGI/wpa_supplicant( 2328): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00:00:00D/wpa_supplicant( 2328): Trying to get current scan results first without requesting a new scan to speed up initial associationD/wpa_supplicant( 2328): Received 0 bytes of scan results (0 BSSes)D/wpa_supplicant( 2328): Cached scan results are empty - not postingD/wpa_supplicant( 2328): No suitable AP found.D/wpa_supplicant( 2328): Setting scan request: 0 sec 0 usecD/wpa_supplicant( 2328): wpa_supplicant_scan: scan_req = 1, ap_scan = 1D/wpa_supplicant( 2328): Starting AP scan (broadcast SSID)D/wpa_supplicant( 2328): wpa_driver_wext_scan: specific scan = 0V/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 secondsD/wpa_supplicant( 2328): CMD: DRIVER MACADDRD/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd MACADDRD/wpa_supplicant( 2328): CMD: SCAN_RESULTSD/wpa_supplicant( 2328): CMD: STATUSD/wpa_supplicant( 2328): CMD: DRIVER RSSI-APPROXD/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd RSSI-APPROXD/wpa_supplicant( 2328): CMD: DRIVER LINKSPEEDD/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd LINKSPEEDV/WifiStateTracker( 1082): Connection to supplicant established, state=SCANNINGD/wpa_supplicant( 2328): CMD: DRIVER RXFILTER-ADD 0D/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd RXFILTER-ADD 0D/wpa_supplicant( 2328): CMD: DRIVER BTCOEXSCAN-STOPD/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd BTCOEXSCAN-STOPV/WifiStateTracker( 1082): Changing supplicant state: SCANNING ==> SCANNINGD/wpa_supplicant( 2328): CMD: DRIVER SCAN-ACTIVED/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd SCAN-ACTIVED/wpa_supplicant( 2328): Scan Active commandD/wpa_supplicant( 2328): CMD: SCANE/wpa_supplicant( 2328): Ongoing Scan action...D/wpa_supplicant( 2328): CMD: DRIVER SCAN-PASSIVED/wpa_supplicant( 2328): wpa_driver_priv_driver_cmd SCAN-PASSIVED/wpa_supplicant( 2328): Scan Passive commandD/wpa_supplicant( 2328): EAPOL: disable timer tickD/wpa_supplicant( 2328): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])D/wpa_supplicant( 2328): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' addedD/wpa_supplicant( 2328): Wireless event: cmd=0x8b19 len=8D/wpa_supplicant( 2328): Received 0 bytes of scan results (0 BSSes)
Please guide me.
Thanks and Regards,