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.

[参考译文] CC1310:wmbus、OMS、C1模式的传输时间设置问题

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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1208199/cc1310-problem-in-setting-the-transmission-time-of-wmbus-oms-c1-modes

器件型号:CC1310
主题中讨论的其他器件:WMBUS

您好、团队;

使用 SDK:wmbus_cc13x0_ rtos_ 2_ 0_ 0,t1_c1例程、更改为10s 以发送数据一次、 然后调用 wmbus_apl_setclock(); 在初始化期间;  

将系统时钟设置为本地时间、并在晚上8:00开始挂起。 晚上11时30分后、将不会发送数据。 到第二天下午、传输尚未开启。 "怎么了? 在哪里需要配置定期发送数据的时间间隔?

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

    请提供更多详细信息、说明您在代码中具体执行的操作。

    您是否使用了该堆栈提供的任何代码示例? 如果是、是哪个、以及您在这些示例中具体要更改什么。

    Siri.

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

    好的,我会稍后给你,谢谢

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

    以下是例程代码的一部分、仅用于更改发送时间。 此外、已经确定了一个具有相同优先级的任务、

     每8S 调用"wmbus_apl_getClock(),并通过串行端口打印。

    后来的测试发现、 在"wmbus_hal_mcu_sleep ((E_HAL_MCU_SLEEP_MODE_t) GE_Sleepmode)"中的"loc_meterTask()"处、如果在数据传输停止之前和之后添加打印、则在此处打印也会停止、就像任务永久处于休眠状态一样。 其它打印任务仍在工作但输出时间戳已停止发送的时间。

    /*! Init start strucutre for meter device */
    s_apl_mtrInitAttr_t gs_meterInitAttr =
    {
    {
    /* Frequency offset for the carrier. */
    CUSTOMER_FREQ_OFFSET,
    /* Device address */
    &gs_addr,
    /* Telegram storage */
    gac_telegramStorage,
    /* Size of the telegram storage */
    MAX_PAYLOAD_LEN
    },
    /* Encryption key */
    gt_key,
    /* Collector address. */
    &gs_collector,
    /* Set the device to connected. Only if the device is a meter device.
    Otherwise this field is ignored. */
    true,
    /* Periodical interval for sending data. Only if the device is a meter
    device. [s] */
    10U
    };
    
    /*----------------------------------------------------------------------------*/
    static void loc_meterTask(UArg arg0, UArg arg1)
    {
    /* Initialises the hal. */
    if(wmbus_hal_init() == E_HAL_STATUS_SUCCESS)
    {
    /* Initialize the sandman module. */
    sf_sandman_init(&loc_stackSleep, &loc_stackWakeUp);
    /* Initialize APL */
    if(E_WMBUS_STATUS_SUCCESS == wmbus_apl_mtr_init(&gs_meterInitAttr))
    {
    /* Set the WMBUS mode. */
    wmbus_setMode(WMBUS_MODE_C1);
    
    /* Set mode 7 as default mode */
    wmbus_apl_mtr_setEncryptionMode(E_WMBUS_ENCRYPTION_MODE_5);
    while(true)
    {
    
    if(gb_stackActive)
    {
    
    sf_mcu_rtc_run();
    /*
    Run the application layer.
    In general, the function wmbus_apl_mtr_run must be called as often as
    possible, since it is responsible to handle all operations of the
    WMBUS Stack.
    */
    wmbus_apl_mtr_run();
    
    /* Handle event */
    wmbus_hal_bsp_handleEvent();
    
    }
    else
    {
    /* It is possible to let the device go to sleep. */
    wmbus_hal_mcu_sleep((E_HAL_MCU_SLEEP_MODE_t) ge_sleepMode);
    } /* if() .. else */
    } /* while */
    }/* if */
    else
    {
    /* Stack initialization failed. Add your error handling here. */
    while(1);
    }
    }/* if */
    else
    {
    /* HAL initialization failed. Add your error handling here. */
    while(1);
    }/* if() .. else */
    }/* loc_meterTask() */

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

    您向我展示的代码位于 app_aplMeterRtos.c 文件中。

    你正在使用什么构建配置(将模式强制为 WMBUS_MODE_C1、但是对于你项目中所使用的预定义符号、你什么也不说)。

    此外、您对收集器进行了哪些更改、编译配置是什么?

    除了这些更改之外、您还创建了另一个任务、但由于不知道您在此任务中正在做什么、我无法知道事情为什么不起作用。

    我强烈建议您一次一步更改默认应用程序、并在两者之间进行测试。

    首先只更改发送间隔、然后查看内容是否仍在工作。

    如果可以,可以尝试更改 wmbus 模式,并且在确认它工作后,可以更改加密模式。

    确认所有这一切都正常后、您可以添加另一个任务。  

    请记住,打印需要时间,因此这可能会改变应用程序的时间。 出于调试目的、您可以尝试切换一些引脚、以确保新任务在运行时正在运行。

    Siri.

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

    大家好、

    wmbus 是否有配置发送时间间隔的 API、例如何时可以发送该时间、或者我是否需要手动将其自行打开和关闭。

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

    要设置 仪表器件的周期间隔、可以使用 wmbus_APL_MTR_setInterval (uint32_t l_IntervalSections )。

    同步传输间隔的详细信息可在 EN13757-4中找到。

    L_IntervalSections 是 以秒为单位的周期性间隔。 时间间隔必须是2秒的倍数。 奇数值将减小一秒。 最大值为86400 (24小时)。 使用0停止同步传输。

    Siri.