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.

CC2564MODN: BLE Sensor Connection Failed to be Established in some boards, error 0x3E

Part Number: CC2564MODN


Greetings !

In our project, we have integrated CC2564MOD with MediaTek Linkit7688. The processor module runs on OpenWRT, and talks with CC2654 over UART at 115200. We are using gatttool to connect   to BLE sensors, including TI Sensor tags. Currently the issue that we are facing is that, in some of the boards, we are not able to connect the sensors. While in some others we don't face any issues.

The steps we followed, and the observations, are as follows:

1. First we try to scan for the BLE sensors using hcitool lescan.

2. Then from the list of MACIDs we tried to start an interactive session for connect using gatttool -i hci0 -b <mac-id> -t public -I, and then issued the command, connect.

3. In the working case the connection successful message turns up. In non-working case, we are getting an error message "Connection Failed to be Established" with an error code "0x3E", soon after the connection successful message.

4. We have tried to isolate the issues, and found the same issue, when we connected Linkit7688 with CC2654 TI evalKit.

5. We tried testing the power levels for continuous transmission in both kinds of board, and they were comparable.

6. With the same software, and firmware in the processor modules, we are unable to properly conclude on the problem, and find a proper solution.

Someone please guide us, on this.

PFA: Screenshots with hcidump details for two cases.

  • Our BT expert will review and get back shortly.

    Thanks
  • @Hari: Thanks.

    The following are the updates after our testing, and debugging efforts.

    1. The init script that we used for initializing, only had initscripts-TIInit_6.7.16_ble_add-on.bts, which we renamed as TIInit_6.7.16.bts and placed in /lib/firmware/ti-connectivity.
    {But we don't understand, why some boards, were working fine, with the same firmware.}

    2. We tried to make the new init script following processors.wiki.ti.com/.../CC256x_Service_Pack_User's_Guide.

    3. But with this change, the proper initialization of the device was not happening, and an error “Can't init device hci0: Device or resource busy (16)Can't initialize device: Device or resource busy” was thrown, while "hciattach /dev/ttyS0 texas 115200", was issued.

    4. The thing that we observed was that, when opening the combined TIInit_6.7.16.bts back in the TI's hcitester tool, the "0x00", that were replaced with "any" previously before saving, remains "0x00" itself.

    5. We assume that, with 'any' other return values while the processor try to initialize CC2654 , other than success (0x00), the initialization is failing, as the wait call expects 0x00.

    We request you to please provide a proper working copy of TIInit_6.7.16.bts, with combined initscripts-TIInit_6.7.16_bt_spec_4.1.bts, and initscripts-TIInit_6.7.16_ble_add-on.bts, and all 0x00 replaced with "any", so that we will try to initializing and testing the same.

    Also wish to understand why in some cases, the boards with initscripts-TIInit_6.7.16_ble_add-on.bts was working fine.
  • Krr,

    Please use the TIInit_6.7.16.bts from the following git.
    git.ti.com/.../initscripts

    Best regards,
    Vihang
  • Hello Vihang,

    Thanks for the response.

    We tried using the TIInit_6.7.16.bts file from the github location specified. Once we issue the command "hciattach /dev/ttyS0 texas 3000000". We get the output like this :

    root@mylinkit:/# hciattach /dev/ttyS0 texas 3000000
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.16.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Initialization timed out.

    We did try with 115200, baud rate also, the results were similar, and comparable to our earlier atempts.

    On further examining the bts file using hcitester tool, we found that, the script was the same, which we earlier tried, having all the "Number HCI commands", and "Status" as 0x00, instead of any.

    Can you please confirm, why is that so, when processors.wiki.ti.com/.../CC256x_Service_Pack_User's_Guide mentions the need to convert all "0x00", as "any", and why the hcitester tool disbehaves, not allowing us to save the bts in proper way.

  • BTSBR#--------------------------------------------------------------------------------8# Description : Orca L PG 2.0 ROM Initialization Script#"# Compatibility: Orca, 7.0.16 ROM#)# Last Updated: 24-Nov-2016  13:13:48.45## Version     : TI_P7_16.35####V# Notes       : Use this script on Orca L PG 2.0, 7.0.16 ROM device only (FW v7.0.16)R#--------------------------------------------------------------------------------B################################################################### START of CC256x Add-OnB################################################################### Change UART baudrate6����6���B################################################################### END of CC256x Add-OnB#################################################################7���7����@a�G#���Gh� &0�](&�8�8*��$�4�)� &�F7J�DG)� ��)� �F1J�DGH�DC`,��� �0�[^(	���� �0�[,� DC�`$A !"�FJ�DG�a@0��	�M&�{(�(|9x�B�H.�0h�����	�"�FJ�DG){�"�FJ�DG(�������:b��(56.���D`H30����F��89z�E{��Ex�$�F�H�DG�M(h�I	���	1�F�J�DG(��Hx(��Hx(�.`�F�H�DG�M(h!I��	1�F�J�DG(L�.`�Hx�H������4c��C�)�"!�H "\*�	\)�A)�	!Aw�H!�F�J�DG �F�I�DG%h�F�I�DG(Ё|
    �|C
    }C
    A}C�ix�"BC�H�\@�JZ�H@]�KV{ ��F�N�D0G5-���HhP(��H!�F�J�DGx�0��L~4�x(� �(��i(	� �F�H�DG �p�H�0(b0����i����I@
    З8QЌ8E�8<�"8+�8������.d�%���! �]8!$�F�J�DG}!�AC�H`-A��-?�8)�F�J�DG�H!�F�J�DG(��H�I	h`	� �I��8!�F�I�DG8�"#�F�K�DG�8!�F�I�DG�8!�F�I�DG�H�00b��$�F�H�DG�F�H�DG��p��i}D!@(&�8�(8+�(x((�; �C!IW�B"�hqp�(x(��N0$�F�I�DG�p�1
    "�F�K�DG������(e�(�F�I�DGp�FHx(� �F�H�DGp�p�fi "�>M$�h84�� }0�]
    (/� ix0$�F�J�DG%�h�B"�w=(x(�y(��M,pM �F�J�DG (pp��=(x(
    �� y0�]0$#%�F�M�D(G�H�I bp�p�,i��#��B2ݶHx`�0AC�B)��&1]�	%��I�B �� ](�(�0](��!	])�)�(
    �p�� ]������"f�!"�F�J�DG 0U�I� �@(bp��FGv\aJa9zE,$p�iԎ��B��!�\@!@��1C�,XI�1	x	�B�+	��!�\)�)��I�JQbp�!kXa�Fa0��I�J2 #$�F�M�D(G�H�@
    �$�Hp0��FP��I�J]2 #$�F�L�D G����ُ �Y�hKx@�0CC$������g�eK�Bۈ�B�!	@��B��B܈����Fx ���b�!?�$����%�F�I�DG !�F�J�DGH<&��!�F
    J�DG(�p`�H!�FJ�DG(�8pCI`�F�I�DG���F�bQ*egPk�lOba�j�%�oEp}^�m5o���Eih|(�(|�I(�
    �*
    �������h�(� � � (t� �h|
    (�(|(ѴO&8$�F�I�DG�F�I�DG(�z
    )�ѮIL1�b7>��h|(
    �(|�I(��(� � ���`�/	YQ�i}da�����..������iQx�ip�!;�H3�;s�#��#�Ix
    C2p6x(�%(� %0p60
    !$�F�J�DG�F�H�DG�������i����Hx@@C!�C		0�F�J�DG0�#��#�Ix
    C2p6x(�%(� %0p60
    !$�F�J�DG�F�H�DG����Hx@@C!�C		0�F�J�DG}� 8��H�I	�b��y'(�Py(�# Pq���Fˣ�0��i!�% �/"�'�(#�`z!�F�I�DG(�0�!x� HC�J\(�������
    j��H�8x(ѺH@\(
    � !�F�I�DG�I�Hx0@(b0��E��q���qU1>��r��0�i�H!$�F�J�DG�I(� �h0`�F�H�DG(ЦF�H�DG(� �I��I�h�B"��Hx���HA)�!Aw�Hx�pXH�8x�(��H!�F�J�DG�M,��F�H�DG,��F�H�DG0��!"�F�J�DG�I���/e*������k��Da\O[�?Fa���H���L"��I�B9��I	x)5�a���J��B�"�C�'-�"�C�&�Jx�F�Jx�F"��J�B�vF66^CgF>A-�+�x��+�x��x+�vB�Jx�Kp�a�&��JhsC!�`��Hx1�IB�B�.�@BPCMA=�o�HxPC
    ��IB�B��(��Hx(��H!�������k�$�FCJ�DG(��g0�F�I�DG���F1O�*�O����i�i8��I@>��I@(/�%8Q��H�(M�0$�F�I�DG� 0�])�!�U�!1�])т]*�*�)
    р](�(�0�F�I�DG$�0�F�I�DG�: �](�8!�FI�DG��Hx(�� &0�]0!#$�F�N�D0G8�F	I�DG�I_ @(b��F�a��������l�4�P�٣�!k��b𵅰�i����H&��I@^��M�Hx(Y�$�F�H�DG(RѦF�H�DG(LѦF/H�DG(F�(x(CѨx(@Ѧ �F�I�DG:��!jF$�F�K�DG�!"�F�K�DG%�h-�Hx�B"� @hC�I �iF�F�J�DG(��hF��F�J�DG(�аx(����I:"�F�K�DG�H�08b���������m��LH� �F�H�DG�I`H�D����3J${�"JV���P��`aQ*PTahNaOaRa��,$�5i�'�i)RЊ�PRzZ�+�Cz�#z���F9 @]�L%(�*2�
    (�*%�*#�: @] (�+�*/�$(-�x](�(!�F�I�DG(!�F�I�DG�� m0@"�F�J�D�������n�G�4�(aF$#%�F�M�D(G�(aF"$#%�F�M�D(G�44b�MaLaQaSaPa�bx�&�$�F�H�DG�M�miF�F�J�DG!�p�m�2�F~K�DG~M ��(i@�(�&�.ЦFyH�DG>(i@�(�ѦFuH�DGx�P���hba𵇰�mHh$�FdH�DGjN00�]mF(q�]hq�!��Y�FeJ�DG�!�������o���Y�FaJ�DGW!	�Y�F^J�DG">�Y�F[J�DG�FVH�DG (p�WI"��FVL�D G���5���BE���HHh%�F?H�DG$EN028�Q0*8�Q0"8�Q� ��Q08�QY �Q08�Q �!�F<J�DG� ��QW �Q� ��Q ��Q>�U�F-H�DG�/I9"�F0K�DG����Q�30��i�������p�$ !$�F'J�DG�!HUQ%�(�F$I�DG(�("I�F"J�DG0��F���*_3O���>%Gv\a�t���	����GT�Y�Y$!��&�P��**�&���%����f���@��KP�I
    P�F��J��B�@i@0,!"�F�J�DG�H+0����Ei$� @](7��&p]�������q�(
    �(�(!�F�I�DG� @]('�l�%�� DUw]tU(!�F�I�DGwU�&p](��*�(#�F�K�DG(�l���B�$�!� AUtU(�aAC��a�I�9	x�	�.�1$�F�J�DG��Hx� C]: �F�L�D G�H�0��
    {�H*��i)�c0�F�IC9�F�y
    )�
    !�H�B�e0�F[0�Fj�{�{C�HR0��H�B�-0�F�������r�)0�F��I�@��H�8@�/'?�M/�$,�&�d !�F�I�DGp6����.�Ѩ�@@� h�/��H(�,�$�d !�F�I�DG`$����,�Ѩ�h��H�040��j�Jh�����J+����DhD`�aH���H�0�p�hh(��N5 � h!�F�I�DG (
    ��Hx(	��P!ACqH�0H�`�8`��������s� �I` �F�H�DGh`�He0p��H�0�F�@i!�F�I�DG�H50�Ai	|)�!�J�!�`�HS0�F�hCh
    x*ѻJx*�"�"JpCa�H	0�F��i�I	x)	�$p0!"�F�J�DG�$p0!"�F�J�DGp0
    !$�F�J�DG�I�F�J�DG�H]0��Hx�H*�]0�F("�`��F�I	x)�!�Jp#!�`�H'0�F�~}C�L
    ��������t� �Ip �F�H�DG y0� q0��iJx�`Ix)�!�`�H90�F�F��{���Eh�h$�� �F�H�DG<�xix	�N)���,�(��4!ACH08`0!0�,��!�H
    #$�F�L�D G0%0��F������L��!�F�I�DG(��H���H�0n0��
    gbO���i!!),�0%�F�I�DG(�'�������u��F�I�DGx�!AC�HG\8�F�I�DG��8�F�I�DG�F�I�DG60�Q�F�J�DG�i``�H�0���H0�F�E�!�I
    :2x	x�A`�H�0�F��������U����%��I�H��B�&�(!�F�J�DG.�O$<v�F�H�DG=r�O�miF�F�J�DG!�p�Fp�m�*�F�K�DG�H;0���F�Î��������v��I�H��B� !�F�J�DG �`�HW0��HHa�E�V�)�&���(Da�"1O]��*����ij�0�(�$s�1h-$dJ, ��>#�[]x�BР\�B�'�'�'Hh�0%�F�I�DG0h(�1�F�J�DG0�(I�J!�\(D�/B��!�9T>�%L�H/�!�)� 0`p`�!�@�������w�1"�F}J�DG  ��/ѡ�)� 0`p`�@1"�FtJ�DG ��0�80��x@@C�p0�(	�J!�\(�/��!�9T4�D`cHQ0���F�]��dam)"/�����i$l`� @`CYI �1"�FVJ�DG(�o`4THx�B��SHG0�����0�Eihz�(
    �$�FLI�DG�!\(�hz�FHI�D�������x�GHH�00���Y߇$��h�aFh� �]@O(�$�F<H�DG(ЦF:H�DG(�8��%h�FI�DG(
    ��!�1x)�}(Ѽ �U5-��8�0𽉍��(I	x�i�p'Hc0�F�@h!�F&I�DG#HW0��F�*ُ��v�v�*9�y���y�)��T�YY�`a�D�������y�� M"��3O��43]'��3��ZV��s����hF��.�����hF��S�����hF��p�����hF��������hF��\�����hF��9�����hF��P�����hF��������hF��f�����hF��A�����hF��������hF��o�����hF��,�����hF��������hF��������hF��������hF��������hF��������z	�����hF�������������x{����A���qt_s�st�s;t�t�t�sia�t�tuu�x	u�r�rQv�v�xAy�uv!vwExOymP�q�r����������,#:�:d��(~��T�R'|�����.�Ȑ�"(�Yr�n�d�"E��������� ���p���f���������bN"2p#spG �p# �p%(^I9$�F[O�D8G�x�x(YI�FWN�D0G(VI1�FVJ�DG(�!��FRJ�DG�FQH�DGQK!h*�"�@C*��"*@IM�R!30 (��? FIp�FFH�DGDI`� DI�<#DHp CIp�"CHpCHpCHpCHpCHp(#Cp#�p @Kp@H%s#�s
    #Cs� =K`@HZ3`':Kp;K��������:N3�p;J�O0p	 !!�"8K�F8N�D0G:N068!�F5J�DG �F4I�DG0)�F0J�DG0)�F0J�DG/N��F/I�DG0�F,I�DG�F+H�DG8�F+I�DG(I`)H`)H`)H�
     )Ip��O{��e�c�{���XaGvJaQaRaSaNaOaPa1�� da`a��bO$���������>1��Î6����X�b�y�b�bba-"p�EM�$�FAH�DG�B�� !��F=J�DG��F:H�DG�B����p�:I:J`$7HpFHp:!#�%p5M
    `%Uq4MM`%p3M�`q3L�`$�%%p1M
    a%�t0MMa%�q�.N�a&�w-L�a	$�p,Lb
    $�w+LLb$\w*L�b$�q)J�b
    "Zu(J
    c"p(J���������Jc"Bp'J�c"�s&J�c8"p%J
    d"q$JJd"�w#H�d %I�%I�!IJ�K!	J�!I"J�Ipp�Ńe�<N�OpbpRczOzmzwzYz�z�z�z�z�zEz	z'z�Rz�y�y1z;zz�#2$TDaFa��P�������N�p�ZL��(� �(�XH!%�FZJ�DG(� �FSI�DG0RJ� �FRJ�DG��(��MH@00bp������!1�B[��!E1�B�UHx(�TI� =0@�EH@\&�B�Q%�($�FAI�DG(l�(?I�F?J�DG����EX-/�� @](+ж A])'�� @](#�$ $�F>J�DG�"Q]�B�PU(�/�9-H�F-J�DG)�y@9�������O��F(J�DG@(�(�@(�6%Hx�� $�F#I�DG�!M(h0(`+'�N H�2h��	�F!J�DG(��0`(h(
    � �FI�DGH8\�FI�DG (`���JM2�Wk��	
    ��f�������E/.�y�b�bHIE$��9z���-H�0x(B�,I� =0@�#H@\&7��EX-��������P�/�� @](+ж A])'�� @](#�$ $�FJ�DG�"Q]�B�PU(�/�9H�FJ�DG)�y@9�FJ�DG@(�(�@(�6Hx�B���Ah�a�!A`HI���F
    ���/.w���$���E������y{�����R#--------------------------------------------------------------------------------.# Description:   BLE FW Initialization Script## Compatibility: BL6450B#*# Last Updated:  19-Oct-2014  13:57:11.15## Version:       2.0#R#--------------------------------------------------------------------------------#LE Enable[���[��# Disable Cortex Sleep�������2# Cortex Reset (hold in reset while loading IMEM)	����	��######################### Patch Start########################�
    �K��G�5G�����Y�U cP0�����a�]�sXpGF:�R$ъx*�*�:В*�	:Љ�@���0C��K�	�@���0C��C���@���0C��;�pG����######################### Patch End#########################release Cortex Reset	����	��# Enable Cortex Sleep��������#RESET BLE[����[���������
    �	������d����	�X`��	��	�`��	��5v�1!TaW
    �
    	
    ��v��
    ��������
    ��<�_����������������������8���8��B################################################################### START of CC2564 Adds-OnB#################################################################"## Enable fast clock XTAL support���������������## Enable eHCILL	+�P���+��
    �	�����d����B################################################################### END of CC2564 Adds-OnB#################################################################
    Hello All,

    We did some recursive testing with edited bts files, changing Status, Number of commands, and the baud rate and found that, for a value of FF for Status, and Number of commands in the "wait" calls, and for a baud rate of  of 115200, we were able to initialize the device properly. We were also able to verify the connect-ability of BLE sensors in previously non-working scenarios.

    Attaching the bts file for further verification from TI's side. (Renamed it as TIInit_6.7.16.bts.txt, as bts attachment not supported here.)

  • Hello Krr,

    The status/number of HCI commands values of "Any" vs "0x00" are specific to the hcitester. The number of HCI commands parameter needs to be "Any" only when trying to run the script from HCITester. When the the script is saved to be used with any other BT stack on a host processor, this parameter must be "0x00". This is the reason the HCITester will change this parameter to "0x00" when saving the script.

    I am able to use the unmodified TIInit_6.7.16.bts from the git with TI dual-mode Bluetooth stack and BlueZ. So unless something is changed in the BlueZ source code this should work without any change. Regarding the 0xFF value in status and Number of commands parameters, there is no 0xff status code defined in the Bluetooth specs so it is not recommended to change this.

    Best regards,
    Vihang