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.

请教 ZLL 遥控器与灯之间距离的问题

你好!

     在做TOUCH-LINK时,遥控器与灯之间的距离默认支持多少米?在哪里修改可以控制这个距离长短?

   谢谢!

  •  你好!

      这个可以帮忙处理一下,谢谢!

  • 如上图在macRadioSetTxPower函数中添加上面一行,可以获得更远的通讯距离

  • 哥们

       图片显示不出来,能给你一下附件给我吗?或者直接上代码,谢谢!

  • 在mac_radio.c 中的  MAC_INTERNAL_API uint8 macRadioSetTxPower(uint8 txPower)  函数作以下修改:

    在第281行   HAL_EXIT_CRITICAL_SECTION(s);  后面添加:

    //*******************增加下面一行,可以增大2530的功率
     reqTxPower = 0xF5;
    //**********从而获得比较远的距离

    修改后如下:

    #ifndef HAL_MAC_USE_REGISTER_POWER_VALUES
    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

    MAC_INTERNAL_API uint8 macRadioSetTxPower(uint8 txPower)
    {
    ...........

    ..........


      HAL_EXIT_CRITICAL_SECTION(s);   //281 行
     
    //*******************增加下面一行,可以增大2530的功率
      reqTxPower = 0xF5;
    //**********从而获得比较远的距离

      /* update the radio power setting */
      macRadioUpdateTxPower();

      return txPower;
    }

    #else
    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

    MAC_INTERNAL_API uint8 macRadioSetTxPower(uint8 txPower)
    {
     .......

    ........
    }

    #endif

  • @yuanfeng,

    Touchlink距离近,并不是因为无线数据包没有收到,而是在收到的无线数据包里面对信号强度RSSI做了判断,

    上面Ray提到的方法是增大发射功率。

    协议栈在处理接收到的Scan Request 以后,会对RSSI进行判断,如果小于门限值的,就不会回复Scan Response

    // Manufacturer specific threshold (greater than -128),
    // do not respond to Touch-link scan request if reached
    #ifndef ZLL_TL_WORST_RSSI
    #define ZLL_TL_WORST_RSSI -40 // dBm
    #endif