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.

Wl12xx is not getting initialized / timeout: uim error in response: opcode is 0x1001, not 0xff36

We are using a TiWi-BLE WiFi+Bluetooth chip on a custom AM335x based board:
using Kernel 3.2.0 and android JB4.1.2:
WiFi Works fine but bletooth refuse to start:

[    3.302856] (stk) :line disc installation timed out(rx:cnt=0,sts=0)
[    4.522888] (stk) :<st_kim_starti(SMA): BT enabled>
[    5.523010] (stk) :line disc installation timed out(rx:cnt=0,sts=0)

Android logcat:

E/uim-sysfs(   69): uim: Inside st_uart_config
E/uim-sysfs(   69): uim:<uim: open: /dev/ttyO1 >
E/uim-sysfs(   69): uim: Inside set_baud_rate
E/uim-sysfs(   69): uim: set_baud_rate() done
E/uim-sysfs(   69): uim: Inside read_firmware_version
E/uim-sysfs(   69): uim: Inside read_hci_event
E/uim-sysfs(   69): uim: read_hci_event
E/uim-sysfs(   69): uim:<uim: read_hci_event -1 >
E/uim-sysfs(   69): uim:Failed to read init response (READ_LOCAL_VERSION_INFORMATION)

E/uim-sysfs(   69): uim: Setting speed to 3000000
E/uim-sysfs(   69): uim: Inside read_command_complete
E/uim-sysfs(   69): uim: Command complete started
E/uim-sysfs(   69): uim: Inside read_hci_event
E/uim-sysfs(   69): uim: read_hci_event
E/uim-sysfs(   69): uim: Error in response: opcode is 0x1001, not 0xff36!

The GPIO pin of BT_enable is correctly working, and I've seen on oscilloscope 
the Tx frame from CPU and a frame from BT module....

I do not know what is the meaning of that 0x1001 opcode ,
someone can explain it to me?

Mario

  • Hi,

    I see from your discription taht you ware probing GPIO Pin.

    From the logs it looks like GPIO is not toggled properly. Make sure you are using the correct GPIO.

    Alos you can probe the UART lines to make sure that the UART configuration is correct.

    0x1001 is the opcode for HCI_Read_Local_Version_Information which is failing.

  • Hi, Sundeep Mandava,
    Thank for the answer, but i do not think is a GPIO problem: see the attached
    file with oscilloscope tracking of some relevent signals.
    Any other idea?

    Nb: I've tested the modbule on a linux 3.2.0 old demo and it works: I've to drive manually the
    GPIO pin , but I'm able to use the BT module...

    bt_trouble.pdf
  • Hi,

    From the PDF you have shared, I can see that GPIO is going high and there is a TX activity and RTS is going low after that.

    Make sure that you have the Service pack in “/system/etc/firmware/” folder with correct permissions. You can get the service packs form https://github.com/TI-ECS/bt-firmware.

    As you are using Android 4.1.2, I think you are using blueZ.

    See the below link on bringing up blueZ on android and make sure you have not missed any of it.

    http://e2e.ti.com/support/wireless_connectivity/f/307/p/329091/1146911.aspx#1146911

  • Hi, thanks again:
    I've detected the problem in the RTS from CPU: it is always HIGH when running Android, whilst in the
    Linux version is Always LOW.

    The board-am33xevm.c is configured in the same way:

    static struct pinmux_config uart1_wl12xx_pin_mux[] = {
        {"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT},
        {"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
        {"uart1_rxd.uart1_rxd",   OMAP_MUX_MODE0| AM33XX_PIN_INPUT_PULLUP},
        {"uart1_txd.uart1_txd",   OMAP_MUX_MODE0| AM33XX_PULL_ENBL},
        {NULL, 0},
    };
    omap_serial.c is the same in both kernel...

    Any idea about the diffetent handling  of RTS?

    I've manalually setted the RTS low, and  firmware seems to be downloaded:

    <6>[    9.491119] (stk) :<SMA: download bt firmare:TIInit_7.6.15.bts>
    <7>[    9.497558] hci0: type 1 len 4
    <7>[    9.498657] hci0: type 1 len 4
    <7>[    9.500091] hci0: type 1 len 4
    <7>[    9.504730] hci0: type 1 len 4
    <7>[    9.509246] hci0: type 1 len 4
    <7>[    9.513275] hci0: type 1 len 4
    <7>[    9.514495] hci0: type 1 len 4
    <7>[    9.516021] hci0: type 1 len 4
    <7>[    9.516601] hci0: type 1 len 5
    <7>[    9.517089] hci0: type 1 len 6
    <7>[    9.517547] hci0: type 1 len 11
    <7>[    9.518066] hci0: type 1 len 12
    <7>[    9.518524] hci0: type 1 len 4
    <7>[    9.519195] hci0: type 1 len 5
    <7>[    9.519744] hci0: type 1 len 5
    <7>[    9.520202] hci0: type 1 len 4
    <7>[    9.520690] hci0: type 1 len 5
    <7>[    9.521301] hci0: type 1 len 6
    <7>[    9.521789] hci0: type 1 len 6
    <7>[   11.514709] hci0: type 1 len 4
    <7>[   11.522766] plat_kim_chip_disable

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    E/uim-sysfs(   69): uim: Inside st_uart_config
    E/uim-sysfs(   69): uim:install set to 1
    E/uim-sysfs(   69): uim: Inside set_baud_rate
    E/uim-sysfs(   69): uim: set_baud_rate() done
    E/uim-sysfs(   69): uim:<uim: open: /dev/ttyO1.flow=1 >
    E/uim-sysfs(   69): uim: Inside read_firmware_version
    E/uim-sysfs(   69): uim: Inside read_hci_event
    E/uim-sysfs(   69): uim: read_hci_event
    E/uim-sysfs(   69): uim: 4
    E/uim-sysfs(   69): uim: e
    E/uim-sysfs(   69): uim: c
    E/uim-sysfs(   69): uim: 1
    E/uim-sysfs(   69): uim: 1
    E/uim-sysfs(   69): uim: 10
    E/uim-sysfs(   69): uim: 0
    E/uim-sysfs(   69): uim: 6
    E/uim-sysfs(   69): uim: 0
    E/uim-sysfs(   69): uim: 0
    E/uim-sysfs(   69): uim: 6
    E/uim-sysfs(   69): uim: d
    E/uim-sysfs(   69): uim: 0
    E/uim-sysfs(   69): uim: f
    E/uim-sysfs(   69): uim: 1f
    E/uim-sysfs(   69): uim: Setting speed to 3000000
    E/uim-sysfs(   69): uim: Inside read_command_complete
    E/uim-sysfs(   69): uim: Command complete started
    E/uim-sysfs(   69): uim: Inside read_hci_event
    E/uim-sysfs(   69): uim: read_hci_event
    E/uim-sysfs(   69): uim: Command complete done
    E/uim-sysfs(   69): uim:>Speed changed to 3000000
    E/uim-sysfs(   69): uim: Inside set_custom_baud_rate
    E/uim-sysfs(   69): uim: Changing baud rate to 3000000, flow control to 1
    E/uim-sysfs(   69): uim: set_custom_baud_rate() done
    E/uim-sysfs(   69): uim: Installed N_TI_WL Line displine

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    After then I' ve  try to start bluetooth from android, with the following error:

    130|root@android:/ # [  399.102569] init: no such service 'hciattach'
    [  399.567810] (stk) :<SMA: download bt firmare:TIInit_7.6.15.bts>

    dmesg dump:

    <3>[  399.102569] init: no such service 'hciattach'
    <7>[  399.107696] hci0 df398000
    <7>[  399.107727] plat_kim_chip_enable
    <6>[  399.567810] (stk) :<SMA: download bt firmare:TIInit_7.6.15.bts>
    <7>[  399.573974] hci0: type 1 len 4
    <7>[  399.575897] hci0: type 1 len 4
    <7>[  399.576751] hci0: type 1 len 4
    <7>[  399.577789] hci0: type 1 len 4
    <7>[  399.578369] hci0: type 1 len 4
    <7>[  399.578887] hci0: type 1 len 4
    <7>[  399.579681] hci0: type 1 len 4
    <7>[  399.581085] hci0: type 1 len 4
    <7>[  399.581573] hci0: type 1 len 5
    <7>[  399.582061] hci0: type 1 len 6
    <7>[  399.582550] hci0: type 1 len 11

          [  411.107574]init: no such service 'hciattach'
    <7>[  399.583038] hci0: type 1 len 12
    <7>[  399.583526] hci0: type 1 len 4
    <7>[  399.584197] hci0: type 1 len 5
    <7>[  399.584747] hci0: type 1 len 5
    <7>[  399.585205] hci0: type 1 len 4
    <7>[  399.585693] hci0: type 1 len 5
    <7>[  399.587066] hci0: type 1 len 6
    <7>[  399.590759] hci0: type 1 len 6
    <7>[  399.792388] hci0: type 1 len 4
    <7>[  399.795227] hci0: type 1 len 6
    <7>[  399.796325] hci0: type 1 len 11
    <7>[  399.811706] hci0: type 1 len 12
    <7>[  399.812225] hci0: type 1 len 5
    <7>[  399.812835] hci0: type 1 len 5
    <7>[  399.813293] hci0: type 1 len 4
    <7>[  399.813781] hci0: type 1 len 6
    <7>[  399.816497] hci0: type 1 len 252
    <7>[  399.820373] hci0: type 1 len 7
    <7>[  399.820922] hci0: type 1 len 5
    <7>[  399.826904] hci0: type 1 len 4
    <7>[  399.827575] hci0: type 1 len 4
    <7>[  399.828063] hci0: type 1 len 4
    <7>[  399.833221] hci0: type 1 len 4
    <7>[  399.834564] hci0: type 1 len 245
    <7>[  400.429718] hci0: type 1 len 5
    <7>[  400.429901] hci0: type 1 len 4
    <7>[  400.433288] plat_kim_chip_disable

    logcat:

    /uim-sysfs(   69): uim: Command complete done
    E/uim-sysfs(   69): uim:>Speed changed to 3000000
    E/uim-sysfs(   69): uim: Inside set_custom_baud_rate
    E/uim-sysfs(   69): uim: Changing baud rate to 3000000, flow control to 1
    E/uim-sysfs(   69): uim: set_custom_baud_rate() done
    E/uim-sysfs(   69): uim: Installed N_TI_WL Line displine
    I/bluedroid(  243): bt_enable: ret: 0, errno: 11
    I/bluedroid(  243): Starting bluetoothd deamon
    E/BluetoothEventLoop.cpp(  243): get_adapter_path: D-Bus error: org.freedesktop.DBus.Error.ServiceUnknown (The name org.bluez was not provided by any .service files)
    E/BluetoothEventLoop.cpp(  243): failure setting up Event Loop!
    I/BluetoothEventLoop.cpp(  243): agent_event_filter: Received method org.bluez.Agent:Release
    E/uim-sysfs(   69): uim: Inside st_uart_config
    E/uim-sysfs(   69): uim: Un-Installed N_TI_WL Line displine
    E/uim-sysfs(   69): uim:cleanup
    D/BluetoothEventLoop(  243): Property Changed: Pairable : false
    D/BluetoothEventLoop(  243): Property Changed: Powered : false
    D/BluetoothEventLoop(  243): Property Changed: UUIDs : 5
    E/BluetoothService.cpp(  243): setBluetoothTetheringNative true
    E/bluetooth_common.cpp(  243): dbus_func_args_timeout_valist: D-Bus error in Register: org.freedesktop.DBus.Error.UnknownMethod (Method "Register" with signature "ss" on interface "org.bluez.NetworkServer" doesn't exist
    E/bluetooth_common.cpp(  243): )
    D/BluetoothEventLoop(  243): Property Changed: UUIDs : 6
    D/BluetoothAdapterStateMachine(  243): WarmUp process message: 101
    D/BluetoothAdapterStateMachine(  243): WarmUp process message: 54
    D/BluetoothEventLoop(  243): Property Changed: UUIDs : 7
    D/BluetoothAdapterStateMachine(  243): WarmUp process message: 104
    E/BluetoothAdapterStateMachine(  243): Bluetooth adapter SDP failed to load
    D/BluetoothEventLoop(  243): Property Changed: UUIDs : 6
    E/BluetoothService.cpp(  243): setBluetoothTetheringNative false
    E/bluetooth_common.cpp(  243): dbus_func_args_timeout_valist: D-Bus error in Unregister: org.freedesktop.DBus.Error.UnknownMethod (Method "Unregister" with signature "s" on interface "org.bluez.NetworkServer" doesn't exist
    E/bluetooth_common.cpp(  243): )
    D/BluetoothEventLoop(  243): Property Changed: UUIDs : 5
    I/bluedroid(  243): Stopping bluetoothd deamon
    I/bluedroid(  243): Stopping hciattach deamon
    D/BluetoothAdapterStateMachine(  243): Bluetooth state 11 -> 10
    D/BluetoothAdapterStateMachine(  243): PowerOff process message: 101
    D/DockEventReceiver(  648): finishStartingService: stopping service

  • Hi, trouble with CTS/RTS was caused by a later I2C2 initialization that
    changes the Function of rts/cts pin mux

    Thank You

    Mario