问题
when I send Broadcast notification to other nodes some nodes are not receiving the notification. below is code. Any help is appreciated Thanks
int clusterCode;
int numCodesAvail;
numCodesAvail = 2 * config_.spreading_ - 1;
currentCH_ = sensor_node_->nodeid();
currentCHMAC_ = MAC_BROADCAST;
clusterCode = (mac_->myADVnum() % numCodesAvail) + 1;
setCode(clusterCode);
wakeUp();
send(
MAC_BROADCAST,
LINK_BROADCAST,
LEACH_ADV_CH,
(char *) (&code_),
sizeof(currentCH_),
BYTES_ID,
config_.maxDist_,
0);
listenJOINREQ_ = true;
clusterNodes_.clear();
This works fine in first round but in second some of the nodes are not receiving the notification.
来源:https://stackoverflow.com/questions/23892557/all-nodes-that-are-in-range-are-not-receiving-message-in-leach