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.

CC2340R5



器件:CC2340

SDK版本:simplelink_cc23xx_sdk_6_40_00_21_eng

问题:cmdId为RCL_CMDID_BLE5_GENERIC_RX,调用RCL_Command_submit和RCL_Command_pend返回错误码138-----RCL_CommandStatus_Error_UnknownOp

麻烦技术解答一下,谢谢!

  • 您好,

    根据文档api,我们有看到:

    您能检查一下您修改的地方是否有误,期待您的回复。

  • 例程rfPacketRx 调用RCL_Command_submit和RCL_Command_pend不会报错,rfPacketRx例程是用了RCL_CMDID_GENERIC_RX命令,
    目前我要接收蓝牙的数据,所以用了RCL_CMDID_BLE5_GENERIC_RX命令,但是出现调用RCL_Command_submit返回0x8A--RCL_CommandStatus_Error_UnknownOp,调用RCL_Command_pend返回0x8A--RCL_CommandStatus_Error_UnknownOp
    希望得到您的解答!
  • 您好,

    我们需要一点时间来查看您的问题,有结论及时联系您。

  • 好的,如果需要命令的参数配置,我这边也可以提供,希望把这个问题解决!谢谢!

  • 您好,

    我们会将您的问题升级与E2E英文论坛与专业产线工程师讨论后和您回复。

  • 好的,如果需要任何协助我这边都可以支持,希望把这个问题解决!谢谢!

  • 您好,

    好的,我们如果有后续跟进消息会和您及时同步。

    感谢您的支持。

  • 好的,如果需要任何协助您尽管提出,希望把这个问题解决!谢谢

  • 您好,

    收到工程师的回复:

    To clarify, the customer wants to receive and decode BLE packets using the rfPacketRx example? Could you provide a bit more information about their use-case? If they want to implement Bluetooth LE communication, then I would recommend that the customer implement a BLE examples on both sides of the connection.

    您是想要使用 rfPacketRx 示例接收和解码 BLE 数据包?您能否提供有关其用例的更多信息?如果您想要实现蓝牙 LE 通信,那么我们会建议您在连接的两端都实现一个 BLE 示例。

  • 您好,

    1、想要使用 rfPacketRx 示例接收和解码 BLE 数据包,但是我用的不是RCL_CMDID_GENERIC_RX命令,而是RCL_CMDID_BLE5_GENERIC_RX命令,

    2、用例的更多信息就是基于 rfPacketRx 示例修改,把命令改为RCL_CMDID_BLE5_GENERIC_RX命令,目前问题是调用RCL_Command_submit和RCL_Command_pend返回0x8A(RCL_CommandStatus_Error_UnknownOp),修改后的源码下面提供,

    3、这样做是为了实现连接监听(connect monitor)功能,

        RCL_CmdBle5GenericRx    rxCmd;              // RX command
        RCL_CtxGenericRx        ctx;
        RCL_StatsGenericRx      stats;              // Statistic command
    
        /* Initialize and open RCL */
        RCL_init();
    
        RCL_Handle rclHandle = RCL_open(&rclClient, &rclRadioConfigGenericBle);
    
        /* Setup generic receive command */
        rxCmd = RCL_CmdBle5GenericRx_DefaultRuntime();
    
        /* Set RF channel */
        rxCmd.channel = 37;
        RCL_BLE5_setDefaultRfFrequency(2402000000U);
    
        rxCmd.common.phyFeatures = RCL_GENERIC_PHY_FEATURE_PHY_1MBPS;
    
        /* Start command as soon as possible */
        rxCmd.common.scheduling = RCL_Schedule_Now;
        rxCmd.common.status = RCL_CommandStatus_Idle;
    
        rxCmd.common.timing.absStartTime = 0;
        rxCmd.common.timing.relHardStopTime = 0;
        /* Set command to run forever until completion */
        rxCmd.common.timing.relGracefulStopTime = 0;
    
        rxCmd.common.runtime.client = &rclClient;
        /* Callback triggers on last command done or packet received */
        rxCmd.common.runtime.callback = defaultCallback;
        rxCmd.common.runtime.rclCallbackMask.value = RCL_EventLastCmdDone.value |
                                                     RCL_EventRxEntryAvail.value;
    
        ctx = RCL_CtxGenericRx_DefaultRuntime();
        ctx.accessAddress = 0x8e89bed6;
        ctx.accessAddress = 0x555555;
        ctx.config.repeated = 1;
    
        /* Maximum packet length */
        ctx.maxPktLen = MAX_LENGTH;
        rxCmd.ctx = &ctx;
    
        /* Setup generic status command */
        stats = RCL_StatsGenericRx_DefaultRuntime();
    
        /* Set RX command statistics structure */
        rxCmd.stats = &stats;
    
        GPIO_setConfig(CONFIG_GPIO_RLED, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
        GPIO_write(CONFIG_GPIO_RLED, CONFIG_GPIO_LED_OFF);
    
        /* Initialize multi-buffer to allow RCL to store RX packet */
        for(int i = 0; i < NUM_OF_PACKETS; i++)
        {
            multiBuffer = (RCL_MultiBuffer *) buffer[i];
            RCL_MultiBuffer_init(multiBuffer, BUFF_STRUCT_LENGTH);
            RCL_MultiBuffer_put(&rxCmd.ctx->rxBuffers, multiBuffer);
        }
    
        /* Submit command */
        RCL_CommandStatus  RCL_Sta = 0;
        RCL_Sta = RCL_Command_submit(rclHandle, &rxCmd);
    
        /* Pend on command completion */
        RCL_Sta = RCL_Command_pend(&rxCmd);

       

          感谢您的支持,希望得到进一步的支持

  • 您好,

    收到您的跟进,已经同步E2E工程师,有答复及时联系您。

    感谢您的支持。

  • 您好,

    收到工程师回复,如同之前说的,查看 RCL_Command.h 文件,我们可以找到错误代码的含义。

    RCL_CommandStatus_Error_UnknownOp,          /*!< Command ended because radio did not recognize command; probably wrong image for given command */

    这意味着无线电配置(radio configuration)不正确。您能验证一下吗?

  • 我这边尝试了很多种方法,源码都提供了,哪里配置不对你们能直接指出吗?

    提出修改配置,我可以验证

  • 您好,

    收到工程师回复:

    Since you are using a BLE5 command (RCL_CmdBle5GenericRx_DefaultRuntime), try to make sure you are using BLE5 setup for RCL_open.

    Specifically, try the files C:\ti\simplelink_cc23xx_sdk_6_40_00_21_eng\source\ti\boards\cc23x0\ble_setup.c (and ble_setup.h).
    Look for "rclRadioConfigBle" --> then do RCL_Handle rclHandle = RCL_open(&rclClient, &rclRadioConfigBle);

    由于您正在使用 BLE5 命令 (RCL_CmdBle5GenericRx_DefaultRuntime),请尝试确保您正在为 RCL_open 使用 BLE5 设置。

    具体来说,尝试文件 C:\ti\simplelink_cc23xx_sdk_6_40_00_21_eng\source\ti\boards\cc23x0\ble_setup.c(和 ble_setup.h)。
    寻找“rclRadioConfigBle”——> 然后执行 RCL_Handle rclHandle = RCL_open(&rclClient, &rclRadioConfigBle);

  • 之前的代码,修改为RCL_Handle rclHandle = RCL_open(&rclClient, &rclRadioConfigBle);

    RCL_Command_submit(rclHandle, &rxCmd);返回码为3,正常

    但是一直监听不到相关数据

    如果设置rxCmd.common.timing.relHardStopTime = 0;

    会一直停留在RCL_Command_pend(&rxCmd);

    麻烦再看一下!可以的话可以用上面的代码进行验证

  • 您好,

    我们建议检查这些参数,并确保它们与 TX 端匹配:

    ctx.accessAddress = 0x8e89bed6;
    ctx.accessAddress = 0x555555;

    目前,代码似乎正在覆盖 accessAddress。

    I recommend checking these parameters, and making sure they match the TX side:

    ctx.accessAddress = 0x8e89bed6;
    ctx.accessAddress = 0x555555;

    Currenlty, it seems the code is overwriting the accessAddress.

  • 您好,我感觉你们又弄错方向了,我是做连接监听(connect monitor)功能,TX端就是手机,

    ctx.accessAddress = 0x8e89bed6;
    ctx.accessAddress = 0x555555;

    这些参数就是配置监听手机广播的参数

  • 您好,

    ctx.accessAddress = 0x8e89bed6;
    ctx.accessAddress = 0x555555;

    What I mean is that they are writing twice the value of ctx.accessAddress (first time it is 0x8e89bed6second time it is 0x555555 -- in the end, final value is 0x555555 ) -- please confirm exactly which value they want for ctx.accessAddress.

    工程师的意思是您写的值是ctx.accessAddress两倍 。(第一次是 0x8e89bed6, 第二次是 0x555555  --最后,最终值为0x555555 ) -- 请确认您想要 ctx.accessAddress 的确切值。

  • Sorry!

    I try to modify,But it had no effect!

    ctx.accessAddress = 0x8e89bed6;
    ctx.crcInit = 0x555555;

    I want to realize ble connect monitor,Not just any rf transmission!

    thanks!

  • 您好,

    已帮您同步工程师。