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.

Wilink 8 and Android 4.2 on AM335x

Hi,

I am working with and AM335x evaluation module trying to get an android 4.2.2 build working with the Wilink 8. The issue I am having is that Bluetooth and Wi-Fi do not function correctly when I flash the build.  When I turn on BT in settings, it turns off right away. When I turn on Wi-Fi, it takes a very long time to find networks and it loses all the networks it finds after a while. It gets stuck in connecting state.

The build I have put together attempts to the following two pages: http://processors.wiki.ti.com/index.php/WL18xx_Build_System_Scripts and http://processors.wiki.ti.com/index.php/TI-Android-JB-4.2.2-DevKit-4.1.1_DeveloperGuide#To_build_with_TI_WL18xx_support . It should be noted that instructions on the two pages on how to build for Wilink 8 differ. The exact steps I followed to produce the build are attached.

Serial and adb output of boot-up, Wifi Enable, and BT enable are attached with important sections highlighted. There is no serial output for BT enable.

If you could provide instructions on how to get a working build of Android 4.2.2 or higher for the AM335x evaluation module where BT and Wifi both function using the Wilink 8, it would be greatly appreciated.

Regards,

Beenish

Logs.docx
  • Thank you for the link to the pre-builts. Are there instructions on how to flash the Android pre-builts onto an SD card? Currently I can only find a "TODO" page where the instructions should be.

    What I am actually trying to do is be able to build Android 4.2 for the AM335x evaluation module using the Wilink 8, and not just run a pre-built. Can you please provide instructions on how to do so?

    Thanks!

    Beenish

  • Hi Beenish,

    Thanks for letting us know the missing info. We'll try to fix the link asap.

    In the meanwhile, can you try the instruction on this page to create the SD card?

  • Hi Lin,

    Thanks for the new link. The file structure doesn't match the one in the link so the steps I used are below in case you need them:

    1. tar -zxvf *.tar.gz

    2. copy mkmmc-android.sh from 4.2.2 source into root directory

    3. copy MLO, u-boot, uEnv.txt, and uImage from media/boot/ into root

    ** Note, the START_HERE folder in boot references TI-Android-JB-4.1.2-DevKit-4.0.1 UserGuide instead of 4.2.2

    4. copy fs_get_stats and mktarball.sh from 4.2.2 source into media

    5. mv rootfs/ to android_rootfs/

    6. sudo sh mktarball.sh fs_get_stats android_rootfs . rootfs rootfs.tar.bz2

    7.  cp rootfs.tar.bz2 ../

    8. sudo ./mkmmc-android.sh /dev/sd<sd card mount-point> MLO u-boot.img uImage uEnv.txt rootfs.tar.bz2

    After flashing the SD card and running it on the AM335x board,  Wifi works, but BT does not. Any suggestions on how to fix this issue?

    Regards,

    Beenish Khurshid

  • Hi Beenish,

    Can you explain what you meant by BT does not work? What do you see? And are you able to connect to a serial cable to see the console printout?

    The image should be fully functional for both WiFI and BT. Can you please check if you have 2 antennae attached to both antenna connectors?

  • Hi,

    In the settings application, when I move Bluetooth's toggle button from OFF to ON, it switches back to OFF right away. There is no serial output while toggling, but serial output on boot-up as well as LogCat output  from both boot-up and toggling are attached. I've tried to highlight the important parts.

    I'm not exactly sure if I have all the antenna's attached that I am supposed to, so pictures of the chip I am using are attached as well.

    Beenish Khurshid

    Attachment.docx
  • Hi Beenish,

    The page for creating an Android SD card is update. Please try again with the latest instruction and mkmmc-android.sh script from here: http://processors.wiki.ti.com/index.php/WL18xx_First_Time_Getting_Started_Guide#Preparing_SD_Cards

    On the other hand, I've tested the Android image myself and it's working fine.

  • A comment on the instructions in the above link, the zipped demo has the media directory inside of it, so the tar instructions should look like tar -zxvf data.tar.gz in the / directory.

    I am still not able to get BT to "turn-on" using your instructions for flashing, using the provided WL8 demo image. Could this be because I need the Bluetopia Platform Manger?

    The error I get:

    01-01 00:28:10.867: D/BluetoothManagerService(922): enable():  mBluetooth =android.bluetooth.IBluetooth$Stub$Proxy@41dcbf18 mBinding = false
    01-01 00:28:10.867: D/BluetoothManagerService(922): Message: 1
    01-01 00:28:10.867: D/BluetoothManagerService(922): MESSAGE_ENABLE: mBluetooth = android.bluetooth.IBluetooth$Stub$Proxy@41dcbf18
    01-01 00:28:10.867: D/BluetoothAdapterService(1270): Broadcasting updateAdapterState() to 1 receivers.
    01-01 00:28:10.877: D/BluetoothBondStateMachine(1270): make
    01-01 00:28:10.877: D/BluetoothManagerService(922): Message: 60
    01-01 00:28:10.877: D/BluetoothManagerService(922): MESSAGE_BLUETOOTH_STATE_CHANGE: prevState = 10, newState=11
    01-01 00:28:10.877: D/BluetoothManagerService(922): Bluetooth State Change Intent: 10 -> 11
    01-01 00:28:10.907: I/bluedroid(1270): enable
    01-01 00:28:10.907: D/BTIF_CORE(1270): not disabled
    01-01 00:28:10.907: E/BluetoothAdapterState(1270): Error while turning Bluetooth On
    01-01 00:28:10.907: D/BluetoothAdapterService(1270): Broadcasting updateAdapterState() to 1 receivers.
    01-01 00:28:10.907: D/BluetoothManagerService(922): Message: 60
    01-01 00:28:10.907: D/BluetoothManagerService(922): MESSAGE_BLUETOOTH_STATE_CHANGE: prevState = 11, newState=10
    01-01 00:28:10.907: D/BluetoothManagerService(922): Broadcasting onBluetoothStateChange(false) to 7 receivers.
    01-01 00:28:10.907: D/BluetoothInputDevice(1121): onBluetoothStateChange: up=false
    01-01 00:28:10.917: E/BluetoothInputDevice(1121): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothInputDevice$2@41b68bd8
    01-01 00:28:10.917: E/BluetoothInputDevice(1121):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:921)
    01-01 00:28:10.917: E/BluetoothInputDevice(1121):     at android.app.ContextImpl.unbindService(ContextImpl.java:1451)
    01-01 00:28:10.917: E/BluetoothInputDevice(1121):     at android.content.ContextWrapper.unbindService(ContextWrapper.java:484)
    01-01 00:28:10.917: E/BluetoothInputDevice(1121):     at android.bluetooth.BluetoothInputDevice$1.onBluetoothStateChange(BluetoothInputDevice.java:199)
    01-01 00:28:10.917: E/BluetoothInputDevice(1121):     at android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
    01-01 00:28:10.917: E/BluetoothInputDevice(1121):     at android.os.Binder.execTransact(Binder.java:351)
    01-01 00:28:10.917: E/BluetoothInputDevice(1121):     at dalvik.system.NativeStart.run(Native Method)
    01-01 00:28:10.917: D/BluetoothA2dp(922): onBluetoothStateChange: up=false
    01-01 00:28:10.917: E/BluetoothA2dp(922): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothA2dp$2@41cb49c8
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:921)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at android.app.ContextImpl.unbindService(ContextImpl.java:1451)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at android.bluetooth.BluetoothA2dp$1.onBluetoothStateChange(BluetoothA2dp.java:121)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at com.android.server.BluetoothManagerService.sendBluetoothStateCallback(BluetoothManagerService.java:471)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at com.android.server.BluetoothManagerService.bluetoothStateChangeHandler(BluetoothManagerService.java:1049)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at com.android.server.BluetoothManagerService.access$2700(BluetoothManagerService.java:46)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at com.android.server.BluetoothManagerService$BluetoothHandler.handleMessage(BluetoothManagerService.java:814)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at android.os.Handler.dispatchMessage(Handler.java:99)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at android.os.Looper.loop(Looper.java:137)
    01-01 00:28:10.917: E/BluetoothA2dp(922):     at android.os.HandlerThread.run(HandlerThread.java:60)
    01-01 00:28:10.917: D/BluetoothHeadset(1110): onBluetoothStateChange: up=false
    01-01 00:28:10.917: E/BluetoothHeadset(1110): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothHeadset$2@41b56da0
    01-01 00:28:10.917: E/BluetoothHeadset(1110):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:921)
    01-01 00:28:10.917: E/BluetoothHeadset(1110):     at android.app.ContextImpl.unbindService(ContextImpl.java:1451)
    01-01 00:28:10.917: E/BluetoothHeadset(1110):     at android.content.ContextWrapper.unbindService(ContextWrapper.java:484)
    01-01 00:28:10.917: E/BluetoothHeadset(1110):     at android.bluetooth.BluetoothHeadset$1.onBluetoothStateChange(BluetoothHeadset.java:234)
    01-01 00:28:10.917: E/BluetoothHeadset(1110):     at android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
    01-01 00:28:10.917: E/BluetoothHeadset(1110):     at android.os.Binder.execTransact(Binder.java:351)
    01-01 00:28:10.917: E/BluetoothHeadset(1110):     at dalvik.system.NativeStart.run(Native Method)
    01-01 00:28:10.917: D/BluetoothHeadset(1110): onBluetoothStateChange: up=false
    01-01 00:28:10.927: E/BluetoothHeadset(1110): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothHeadset$2@41ba88d0
    01-01 00:28:10.927: E/BluetoothHeadset(1110):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:921)
    01-01 00:28:10.927: E/BluetoothHeadset(1110):     at android.app.ContextImpl.unbindService(ContextImpl.java:1451)
    01-01 00:28:10.927: E/BluetoothHeadset(1110):     at android.content.ContextWrapper.unbindService(ContextWrapper.java:484)
    01-01 00:28:10.927: E/BluetoothHeadset(1110):     at android.bluetooth.BluetoothHeadset$1.onBluetoothStateChange(BluetoothHeadset.java:234)
    01-01 00:28:10.927: E/BluetoothHeadset(1110):     at android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
    01-01 00:28:10.927: E/BluetoothHeadset(1110):     at android.os.Binder.execTransact(Binder.java:351)
    01-01 00:28:10.927: E/BluetoothHeadset(1110):     at dalvik.system.NativeStart.run(Native Method)
    01-01 00:28:10.927: E/BluetoothPan(1121): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothPan$2@41b6e0a8
    01-01 00:28:10.927: E/BluetoothPan(1121):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:921)
    01-01 00:28:10.927: E/BluetoothPan(1121):     at android.app.ContextImpl.unbindService(ContextImpl.java:1451)
    01-01 00:28:10.927: E/BluetoothPan(1121):     at android.content.ContextWrapper.unbindService(ContextWrapper.java:484)
    01-01 00:28:10.927: E/BluetoothPan(1121):     at android.bluetooth.BluetoothPan$1.onBluetoothStateChange(BluetoothPan.java:183)
    01-01 00:28:10.927: E/BluetoothPan(1121):     at android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
    01-01 00:28:10.927: E/BluetoothPan(1121):     at android.os.Binder.execTransact(Binder.java:351)
    01-01 00:28:10.927: E/BluetoothPan(1121):     at dalvik.system.NativeStart.run(Native Method)
    01-01 00:28:10.927: D/BluetoothHeadset(922): onBluetoothStateChange: up=false
    01-01 00:28:10.927: I/BluetoothBondStateMachine(1270): StableState(): Entering Off State
    01-01 00:28:10.937: E/BluetoothHeadset(922): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothHeadset$2@41d509a0
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:921)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at android.app.ContextImpl.unbindService(ContextImpl.java:1451)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at android.bluetooth.BluetoothHeadset$1.onBluetoothStateChange(BluetoothHeadset.java:234)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at com.android.server.BluetoothManagerService.sendBluetoothStateCallback(BluetoothManagerService.java:471)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at com.android.server.BluetoothManagerService.bluetoothStateChangeHandler(BluetoothManagerService.java:1049)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at com.android.server.BluetoothManagerService.access$2700(BluetoothManagerService.java:46)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at com.android.server.BluetoothManagerService$BluetoothHandler.handleMessage(BluetoothManagerService.java:814)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at android.os.Handler.dispatchMessage(Handler.java:99)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at android.os.Looper.loop(Looper.java:137)
    01-01 00:28:10.937: E/BluetoothHeadset(922):     at android.os.HandlerThread.run(HandlerThread.java:60)
    01-01 00:28:10.937: D/BluetoothAdapterService(1102562984)(1270): getState(): mAdapterProperties: com.android.bluetooth.btservice.AdapterProperties@41b7ca58
    01-01 00:28:10.937: D/BluetoothPbap(1121): onBluetoothStateChange: up=false
    01-01 00:28:10.947: E/BluetoothPbap(1121): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothPbap$2@41b733d8
    01-01 00:28:10.947: E/BluetoothPbap(1121):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:921)
    01-01 00:28:10.947: E/BluetoothPbap(1121):     at android.app.ContextImpl.unbindService(ContextImpl.java:1451)
    01-01 00:28:10.947: E/BluetoothPbap(1121):     at android.content.ContextWrapper.unbindService(ContextWrapper.java:484)
    01-01 00:28:10.947: E/BluetoothPbap(1121):     at android.bluetooth.BluetoothPbap$1.onBluetoothStateChange(BluetoothPbap.java:122)
    01-01 00:28:10.947: E/BluetoothPbap(1121):     at android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
    01-01 00:28:10.947: E/BluetoothPbap(1121):     at android.os.Binder.execTransact(Binder.java:351)
    01-01 00:28:10.947: E/BluetoothPbap(1121):     at dalvik.system.NativeStart.run(Native Method)
    01-01 00:28:10.947: D/BluetoothManagerService(922): Bluetooth State Change Intent: 11 -> 10
    01-01 00:28:11.007: D/BluetoothAdapterService(1102562984)(1270): getState(): mAdapterProperties: com.android.bluetooth.btservice.AdapterProperties@41b7ca58

  • Hi Beenish,

    Android uses their own BlueDroid stack.

    What is the WL8 model you are using? From which manufacturer?

  • Hi Lin,

    The markings on the board indicate a COM8 189x PCB 043603 REV C from LS Research.

  • Hi Beenish,

    My mistake, the image on the wiki does have such problem. I was using a different image.

    The download link has been updated with the latest file. Please try again.

    Sorry for the inconvenience.

  • Hi Victor,

    Trying to turn BT on produces the same behavior as previously reported. I am using the image at https://gforge.ti.com/gf/download/user/9653/6755/TI_Android_JB_4.2.2_DevKit_4.1.1_am335xevm.tar.gz

    Have you tested this image to be functional?

  • Hi,

    From the logs in “Attachement.docx” file you have provided in your previous post, It looks like GPIO BT enable nSHUTDOWN is not toggled properly.

    This should be high before there is any communication with the chip. That is why we don’t see line discipline installation.

    Could you please check if the connection with the chip is fine when you face this issue. Also if possible please check if the voltage on GPIO is driven high.

    For more information please refer to the below link

    http://e2e.ti.com/support/low_power_rf/f/538/t/294284.aspx

    Thanks & Regards,

    Sundeep. 

  • Hi Sundeep,

    Thanks for looking into this. I think the issue was something at the hardware level, probably a clogged up pin or something of that sort. Though the image is a little faulty (gets stuck in boot loop frequently), BT is now functional.

    As for building the code on my own, would you happen to know which tag I can pull off of gitorious rowboat that is stable?

    Thanks again for all your troubles,

    Beenish

  • Hi Beenish,

    You can take the latest commit from the blow link

    https://gitorious.org/rowboat

    Regards,

    Sundeep.