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.

[参考译文] CC2564C:HCITester + STM32 MCU 执行射频测试。

Guru**** 2387830 points
Other Parts Discussed in Thread: CC2564C
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1063200/cc2564c-hcitester-stm32-mcu-to-do-rf-test

器件型号:CC2564C

你(们)好

 我使用 CC2564C 蓝牙芯片。 Bluetopia 是 CC2564CSTBTBLESW-v4.2.1、MCU 是 stm32F446RE、我可以通过成功运行 SPP 演示  

STM32+CC2564C、现在、我想进行射频测试。 那么、我下载 HCITester。  当我执行 init 脚本时,总是超时,init 脚本为:  e2e.ti.com/.../initscripts_2D00_TIInit_5F00_6.12.26.txt

HCITester 秀  

STM32 MCU shoud 在 HCITeser 工作前有没有做过什么? 或者我不想做什么,如果你需要我提供更多的细节,请告诉我,谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    为什么没有人回答这么长的时间。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Harry、

    根据 HCITester 工具指南、您能否确保将出现的所有"5000、0x00"替换为"5000、ANE"

    谢谢、
    Jacob

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你(们)好雅各

    是的、我确定

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Harry、

    我认为加载到 MCU 上的内容可能会干扰.bts 脚本。 您能否先尝试从 STM32 Bluetopia SDK 编程示例 、然后再尝试运行.bts?  

    谢谢、
    Jacob

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你(们)好雅各

    我在 STM32 MCU 上对 SPP 演示进行编程、现在 STM32仅运行 SPP 演示、我可以在控制台中成功运行"setBaudRate"命令、如下所示:

    然后断开控制台,打开 HCITester,运行 init 脚本,与 HCITester Timeout 中的命令"SetBaudRate"相同,如下所示:

    接下来、我注释掉"SetBaudRate"命令、使其执行下一个操作、但仍然会超时、如下所示:

    我还尝试修改"5000、any、0xfe37、0x00"->"any、any、0xfe37、0x00"、它仍然失败。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Harry、

    您是否使用 CC2564C 的最新服务包(v1.5)?  

    [引用 userid="507729" URL"~/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum 1063200/cc2564c-hcitester-STM32-MCU-TM-DI-RF-TEST/3938018#3938018]]我还尝试修改"5000、any、0xfe37、0x00"->"any、any、0xfe37、0x00"、仍然失败。  [/报价]

    确保不更改5000。 只应将"5000、0x00"替换为"5000、ANY "

    您能否尝试运行"Send_HCI_VS_GET_System_Status"和"Send_HCI_Read_BD_ADDR"以查看您是否在控制台中接收到任何输出?

    谢谢、
    Jacob

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你(们)好雅各

    我不知道我现在正在使用的 Service Pack、这是我正在使用的 Service Pack 版本吗?

    [引用 userid="456020" URL"~/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum 1063200/cc2564c-hcitester-STM32-MCU-TO-do-rf-test/3938730#3938730"]是否可以尝试运行"Send_HCI_VS_GET_System_Status"Send_HCI_Read_BD_ADDR"以查看是否在控制台中接收到任何输出?]

    我使用 HCITester 运行您所说的命令、它在控制台中没有任何输出。

    HCITeser 可能会将命令发送到 STM32 MCU、但 STM32 MCU 不会将命令传输到 CC2564C、,这正是我的猜测。  我能否直接使用 STM32 MCU 发送相同的 VS 命令。例如,在 BTVS.c 中,有一个函数“VS_Enable_FCC_Test_Mode()”,它看起来与 HCITester 命令 “Send_HCI_VS_DRPb_Tester_Con_TX”相同, 如果我调用该函数 来测试连续 TX,这种方法是否正常?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Harry、

    您似乎正在使用最新的 Service Pack、 也可以在此处找到。  

    [引用 userid="507729" URL"~/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum,1063200/cc2564c-hcitester-STM32-MCU-TO-do-rf-test/3939193#3939193">HCITESER 可能会将命令发送到 STM32 MCU、但 STM32 MCU 不会将命令传输到 CC2564C、这完全是我的。  我能否直接使用 STM32 MCU 发送相同的 VS 命令。例如,在 BTVS.c 中,有一个函数“VS_Enable_FCC_Test_Mode ()”,它看起来与 HCITester 命令 “Send_HCI_VS_DRPb_Con_TX”相同, 如果我调用该函数 来测试连续 TX,这种方法是否正常?]

    您可以使用  HCIAPI.h 中的 HCI_Send_Raw_Command 将任何 HCI 命令发送到 MCU:

    *! HCI Command API's (Generic). */
       /*! @brief The following function issues a Raw HCI Command to the Bluetooth
        * Device that is associated with the Bluetooth Protocol Stack
        * specified by the BluetoothStackID parameter.
        * @param BluetoothStackID The first parameter to this function is the Bluetooth
        * Protocol Stack ID of the Bluetooth Protocol Stack that was
        * successfully opened.
        * @param Command_OGF The Command_OGF parameter specifies the Bluetooth Command OGF
        * of the Command.
        * @param Command_OCF The Command_OCF specifies the Bluetooth Command OCF.
        * @param Command_Length The Command_Length parameter specifies the number
        * of bytes to send from the Buffer specified by the Command_Data
        * parameter.
        * @param Command_Data The Command_Data parameter is ignored if Command_Length is zero.
        * @param StatusResult The StatusResult variable will contain the Status Result returned from
        * the Bluetooth Device.
        * @param LengthResult The LengthResult variable will contain
        * the Number of Bytes that are valid in the BufferResult variable.
        * @param BufferResult The current buffer result.
        * @param WaitForResponse The final parameter specifies whether or not this function
        * is to wait for a response from the Bluetooth Device. This
        * parameter is provided because the Bluetooth Device may not issue
        * any response for this HCI Command.
        * @return This function returns zero if successful, or a non-zero value if there was an
        * error.
        * If you (the caller know that
        * the Bluetooth Device does NOT return data, then set this
        * parameter to FALSE.  If you want to be absolutely sure, you can
        * wait for the Timeout, however the calling therad will block until
        * an invalid response OR the Timeout occurs (valid data).
        * \note The LengthResult and BufferResult
        * parameters are ignored if the WaitForResponse Flag is FALSE.
        * \note This function blocks until either a result is returned
        *          from the Bluetooth Device OR the function Times Out
        *          Waiting for a response from the Bluetooth Device.
        */
    BTPSAPI_DECLARATION int BTPSAPI HCI_Send_Raw_Command(unsigned int BluetoothStackID, Byte_t Command_OGF, Word_t Command_OCF, Byte_t Command_Length, Byte_t Command_Data[], Byte_t *StatusResult, Byte_t *LengthResult, Byte_t *BufferResult, Boolean_t WaitForResponse);
    我将尝试在 STM32上重现您的问题。 是否可以尝试使用 HCI_Send_Raw_Command API 作为权变措施?

    谢谢、
    Jacob
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你(们)好雅各

    非常感谢您的建议,我已经解决了这个问题,因为 STM32不传输 HCITester 发送的数据包,所以我在 STM32中实现了透明的传输功能, 它可以将 HCITester 的命令完全转发到 CC2564C。 现在它起作用了

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Harry、

    很高兴您解决了您的问题。 您是否能够在此处发布您的功能、以便其他用户从您的解决方案中受益?

    谢谢、
    Jacob

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你(们)好雅各

    是的、有 我修改过的文件。

     e2e.ti.com/.../For_5F00_stm32_5F00_HCITester_5F00_transparent.zip

    另外,使用此函数时,HCITester COM 端口应按如下方式设置

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Harry、

    非常感谢您的分享。 我现在要关闭这个线程。

    最棒的
    Jacob