Skip to content

Commit

Permalink
xbee: fixed broadcast header
Browse files Browse the repository at this point in the history
Destination address is at tx_buf[5] and tx_buf[6] rather than tx_buf[4] and
tx_buf[5].

Broadcast header is overridden by following code mistakenly.
  • Loading branch information
Yonezawa-T2 committed Dec 9, 2015
1 parent 85130fc commit e99759f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/xbee/xbee.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,11 @@ static int _send(gnrc_netdev_t *netdev, gnrc_pktsnip_t *pkt)
dev->tx_buf[1] = (uint8_t)((size + 5) >> 8);
dev->tx_buf[2] = (uint8_t)(size + 5);
dev->tx_buf[3] = API_ID_TX_SHORT_ADDR;
dev->tx_buf[4] = 0xff;
dev->tx_buf[5] = 0xff;
dev->tx_buf[6] = 0xff;
pos = 7;
}
if (hdr->dst_l2addr_len == 2) {
else if (hdr->dst_l2addr_len == 2) {
dev->tx_buf[1] = (uint8_t)((size + 5) >> 8);
dev->tx_buf[2] = (uint8_t)(size + 5);
dev->tx_buf[3] = API_ID_TX_SHORT_ADDR;
Expand Down

0 comments on commit e99759f

Please sign in to comment.