wjc666 发表于 2022-2-11 14:04:41

求大佬讲讲关于帧过滤的问题

这段关于帧过滤的代码 小白有点看不懂 有大佬方便讲讲吗感谢感谢



void BPhero_UWB_Message_Init(void)
{
    //set frame type (0-2), SEC (3), Pending (4), ACK (5), PanIDcomp(6)
    msg_f_send.frameCtrl = 0x1 /*frame type 0x1 == data*/ | 0x40 /*PID comp*/|0x20/* ACK request*/;
    //source/dest addressing modes and frame version
    //msg_f.frameCtrl = 0x41;
    msg_f_send.frameCtrl = 0x8 /*dest extended address (16bits)*/ | 0x80 /*src extended address (16bits)*/;
    msg_f_send.panID = 0xF0;
    msg_f_send.panID = 0xF0;

    msg_f_send.seqNum = 0;
    msg_f_send.messageData = 3; //copy new range number
    msg_f_send.messageData = RTLS_DEMO_MSG_ANCH_POLL; //message function code (specifies if message is a poll, response or other...)
    psduLength = (TAG_POLL_MSG_LEN + FRAME_CRTL_AND_ADDRESS_S + FRAME_CRC);

    msg_f_send.seqNum = 0; //copy sequence number and then increment
    msg_f_send.sourceAddr = SHORT_ADDR & 0xFF; //copy the address
    msg_f_send.sourceAddr =(SHORT_ADDR>>8)& 0xFF; //copy the address

    msg_f_send.destAddr = 0x01;//set the destination address (broadcast == 0xffff)
    msg_f_send.destAddr = 0x01;//set the destination address (broadcast == 0xffff)
}

admin 发表于 2022-2-11 22:35:42

http://51uwb.cn/forum.php?mod=viewthread&tid=82&highlight=%D6%A1%B9%FD%C2%CB

参考这个帖子
多搜多看
页: [1]
查看完整版本: 求大佬讲讲关于帧过滤的问题