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.

ZigBee-RSSI訊號

Other Parts Discussed in Thread: CC2430

使用Mesh的拓樸結構。

請問一下如何於IAR內使用RSSI指令,抓取每個end device間的rssi值。由於使用ti內建的定位程式,僅能抓取到一開始綁定時的rssi值,但希望可以做到可以每格一段時間抓取一次rssi值,請問一下該使用哪個api?謝謝

  • 建议您参考zcl_samplelight.c - zclSampleLight_event_loop():

    uint16 zclSampleLight_event_loop( uint8 task_id, uint16 events )
    {
    afIncomingMSGPacket_t *MSGpkt;

    (void)task_id; // Intentionally unreferenced parameter

    if ( events & SYS_EVENT_MSG )
    {
    while ( (MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive
    ( zclSampleLight_TaskID )) )
    {
    int8 msgRssi = MSGpkt->rssi;
    uint8 msgCorrelation = MSGpkt->correlation;

    #ifdef LCD_SUPPORTED
    HalLcdWriteStringValue( "RSSI: ", msgRssi, 10, HAL_LCD_LINE_1 );
    HalLcdWriteStringValue( "Correlation: ", msgCorrelation, 10,
    HAL_LCD_LINE_2 );
    #endif

    switch ( MSGpkt->hdr.event )

    ...

    该code在C:\Texas Instruments\ZStack-CC2530\Projects\zstack\HomeAutomation


  • 想請問使用CC2430是否也是參考SAMPLELIGHT範例