hi,我用的是nortos的rfPacketTx例程,在smartrf_settings.c文件中找不到发送地址的设置,请问如何设置?
Viki Shi:
修改如下代码部分
#ifdef RFEASYLINKRX_ADDR_FILTER
/*
* The address filter is set to match on a single byte (0xAA) but
* EasyLink_enableRxAddrFilter will copy
* EASYLINK_MAX_ADDR_SIZE * EASYLINK_MAX_ADDR_FILTERS
* bytes to the address filter bank
*/
uint8_t addrFilter[EASYLINK_MAX_ADDR_SIZE * EASYLINK_MAX_ADDR_FILTERS] = {0xbb};
EasyLink_enableRxAddrFilter(addrFilter, 1, 1);
#endif //RFEASYLINKRX_ADDR_FILTER
user6045094:
回复 Viki Shi:
我的不是easyLink的例程,而且我在工程里查找不到你推荐的代码段
user6045094:
回复 Viki Shi:
可以解答下吗?
Viki Shi:
TX端要改的话需要根据数据包格式插入地址,比如:
/* Create packet with incrementing sequence number and random payload */ packet[0] = address; packet[1] = (uint8_t)(seqNumber >> 8); packet[2] = (uint8_t)(seqNumber++); //packet[2] = address; uint8_t i; for (i = 3; i < PAYLOAD_LENGTH + 1; i++) {packet[i] = rand(); }PS:数据包格式请参考用户手册的23.7.1 节:http://www.ti.com/lit/ug/swcu117h/swcu117h.pdf
user6133754:
你在smartrf_settings.c里找不到极有可能是你在smart studio软件里配置的时候没有打开地址校验的开关