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.

wl18xx error in Linux: failed to read local version

Hi,

I am running Linux on a i.MX6 Solo-based board.  I enabled the Shared Transport driver in kernel.  I am able to see "btwilink" and "kim" devices under /sys/devices/platform/.  Upon running the command "hciconfig hci0 up", I am getting the error "failed to read local version".  The logs show that the host is able to set the UART speed of WL18xx to 3M.  Since this is done using HCI command, this shows that the interface between host and WL18xx is working.

I checked out UIM from https://gitorious.org/uim.  Is this the right UIM to use for WL18xx?  

If this is the right UIM, please share your thoughts on possible reasons for set_custom_baud_rate() to work, but reading of version info from st_kim.c in kernel times out.    

The logs are given below:

# hciconfig hci0 up
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 1 from install

uim:@ st_uart_config
uim: signal received, opening /dev/ttymxc3
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done(stk) :read_local_version
uim:Speed changing to 3000000,
(stc): >>>tty: ttymxc3
1
uim:@ set_custom_baud_rate
uim:Installed N_TI_WL Line displine
uim:begin polling...
(stk) : waiting for ver info- timed out
(stk) :kim: failed to read local ver(stk) :download firmware failed
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 0 from install

uim:@ st_uart_config
uim:Un-Installed N_TI_WL Line displine
uim:begin polling...
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 1 from install

uim:@ st_uart_config
uim: signal received, opening /dev/ttymxc3
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done(stk) :read_local_version
uim:Speed changing to 3000000,
(stc): >>>tty: ttymxc3
1
uim:@ set_custom_baud_rate
uim:Installed N_TI_WL Line displine
uim:begin polling...
(stk) : waiting for ver info- timed out
(stk) :kim: failed to read local ver(stk) :download firmware failed
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 0 from install

uim:@ st_uart_config
uim:Un-Installed N_TI_WL Line displine
uim:begin polling...
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 1 from install

uim:@ st_uart_config
uim: signal received, opening /dev/ttymxc3
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done(stk) :read_local_version
uim:Speed changing to 3000000,
(stc): >>>tty: ttymxc3
1
uim:@ set_custom_baud_rate
uim:Installed N_TI_WL Line displine
uim:begin polling...
(stk) : waiting for ver info- timed out
(stk) :kim: failed to read local ver(stk) :download firmware failed
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 0 from install

uim:@ st_uart_config
uim:Un-Installed N_TI_WL Line displine
uim:begin polling...
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 1 from install

uim:@ st_uart_config
uim: signal received, opening /dev/ttymxc3
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done(stk) :read_local_version
uim:Speed changing to 3000000,
(stc): >>>tty: ttymxc3
1
uim:@ set_custom_baud_rate
uim:Installed N_TI_WL Line displine
uim:begin polling...
(stk) : waiting for ver info- timed out
(stk) :kim: failed to read local ver(stk) :download firmware failed
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 0 from install

uim:@ st_uart_config
uim:Un-Installed N_TI_WL Line displine
uim:begin polling...
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 1 from install

uim:@ st_uart_config
uim: signal received, opening /dev/ttymxc3
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done(stk) :read_local_version
uim:Speed changing to 3000000,
(stc): >>>tty: ttymxc3
1
uim:@ set_custom_baud_rate
uim:Installed N_TI_WL Line displine
uim:begin polling...
(stk) : waiting for ver info- timed out
(stk) :kim: failed to read local ver(stk) :download firmware failed
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 0 from install

uim:@ st_uart_config
uim:Un-Installed N_TI_WL Line displine
uim:begin polling...
uim:poll broke due to event 10(PRI:2/ERR:8)

uim:read 1 from install

uim:@ st_uart_config
uim: signal received, opening /dev/ttymxc3
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done(stk) :read_local_version
uim:Speed changing to 3000000,
(stc): >>>tty: ttymxc3
1
uim:@ set_custom_baud_rate
uim:Installed N_TI_WL Line displine
uim:begin polling...
(stk) : waiting for ver info- timed out
(stk) :kim: failed to read local ver(stk) :download firmware failed
uim:poll broke due to event 10(PRBluetooth: st_register failed -22
I:2/ERR:8)

uim:read 0 from install

uim:@ st_uart_config
uim:Un-Installed N_TI_WL Line displine
uim:begin polling...
Can't init device hci0: Input/output error (5)

  • Hi Sharafuddeen,

    Looks like GPIO is not toggled properly.

    This should be high before there is any communication with the chip.

    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.

    Also probe the UART lines to make sure that the UART configuration is correct.

  • Hi, did you solve your issue yet ?

    I worked around a similar problem, and I solved adjusting clock divisor because original mx6 defaults can't handle 3Mbps in the right way.

  • Hi,

    This issue got resolved by configuring the GPIO properly.

    Thanks,

    Sharaf

  • Hi Sharaf,

    Can you please share the GPIO configuration.

    Regards,

    DIbin

  • Hi Dibin,

    The BT_ENABLE GPIO was configured as output.  Also, I configured all the 4 lines of UART correctly.  This fixed the issue.  Since I don't work anymore on BlueZ, I dont have the code to share with you.

    Regards,

    Sharaf 

  • Hi giuseppe pagano,

    I am also facing similar issue. Can you please tell how you solved the issue?

    **************************log ************************
    Starting uim-sysfs daemon.
    uim:@ main
    uim:install = /sys/./devices/soc0/kim.21/install
    uim:dev_name = /sys/./devices/soc0/kim.21/dev_name
    uim:baud_rate = /sys/./devices/soc0/kim.21/baud_rate
    uim:flow_cntrl = /sys/./devices/soc0/kim.21/flow_cntrl

    hciconfig hci0 up
    (stc): chnl_id list empty :4
    (stk) : st_kim_start(stk) :ldisc_install = 1uim:poll broke due to event
    10(PRI:2/ERR:8)

    uim:read 1 from install

    uim:@ st_uart_config
    uim: signal received, opening /dev/ttymxc0
    uim:@ set_baud_rate
    uim:set_baud_rate() done
    uim:Setting speed to 460800
    uim:@ read_command_complete
    uim: Command complete started
    uim:@ read_hci_event
    uim: read_hci_event
    uim:Invalid response

    (stk) :ldisc installation timeout(stk) :ldisc_install = 0
    (stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install =
    1
    (stk) :ldisc installation timeout(stk) :ldisc_install = 0
    (stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install =
    1
    (stk) :ldisc installation timeout(stk) :ldisc_install = 0
    (stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install =
    1
    (stk) :ldisc installation timeout(stk) :ldisc_install = 0
    (stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install =
    1
    (stk) :ldisc installation timeout(stk) :ldisc_install = 0
    (stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install =
    1
    (stk) :ldisc installation timeout(stk) :ldisc_install = 0
    (stk) : timed out waiting for ldisc to be un-installedBluetooth: st_register
    failed -22
    Can't init device hci0: Input/output error (5)
    *****************************************************

    Regards