mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2026-01-01 01:41:18 +01:00
Merge pull request #150 from OlegHahm/6lowpan_plugtest_fixes
6lowpan plugtest fixes
This commit is contained in:
commit
fed90e2328
@ -24,8 +24,8 @@
|
||||
|
||||
/* maximum 802.15.4 header length */
|
||||
#define IEEE_802154_MAX_HDR_LEN 23
|
||||
/* mininmum */
|
||||
#define IEEE_802154_PAYLOAD_LEN 21
|
||||
/* ...and FCS*/
|
||||
#define IEEE_802154_FCS_LEN 2
|
||||
|
||||
#define IEEE_802154_BEACON_FRAME 0
|
||||
#define IEEE_802154_DATA_FRAME 1
|
||||
|
||||
@ -70,18 +70,18 @@
|
||||
#define OPT_MTU_LEN (1)
|
||||
#define OPT_MTU_HDR_LEN (8)
|
||||
/* aro - address registration option rfc6775 4.1 */
|
||||
#define OPT_ARO_TYPE (31) /* TBD1 */
|
||||
#define OPT_ARO_TYPE (33)
|
||||
#define OPT_ARO_LEN (2)
|
||||
#define OPT_ARO_HDR_LEN (16)
|
||||
#define OPT_ARO_LTIME (300) /* TODO: geeigneten wert finden */
|
||||
/* 6lowpan context option */
|
||||
#define OPT_6CO_TYPE (32)
|
||||
#define OPT_6CO_TYPE (34)
|
||||
#define OPT_6CO_MIN_LEN (2)
|
||||
#define OPT_6CO_MAX_LEN (3)
|
||||
#define OPT_6CO_HDR_LEN (8)
|
||||
#define OPT_6CO_LTIME (5) /* TODO geeigneten Wert finden */
|
||||
/* authoritative border router option */
|
||||
#define OPT_ABRO_TYPE (33)
|
||||
#define OPT_ABRO_TYPE (35)
|
||||
#define OPT_ABRO_LEN (3)
|
||||
#define OPT_ABRO_HDR_LEN (24)
|
||||
/* authoritive border router cache size */
|
||||
|
||||
@ -215,9 +215,14 @@ void sixlowpan_mac_send_ieee802154_frame(const ieee_802154_long_t *addr,
|
||||
memset(&buf, 0, PAYLOAD_SIZE);
|
||||
init_802154_frame(&frame, (uint8_t *)&buf);
|
||||
memcpy(&buf[hdrlen], frame.payload, frame.payload_len);
|
||||
/* set FCS */
|
||||
/* RSSI = 0 */
|
||||
buf[frame.payload_len+hdrlen] = 0;
|
||||
/* FCS Valid = 1 / LQI Correlation Value = 0 */
|
||||
buf[frame.payload_len+hdrlen+1] = 0x80;
|
||||
DEBUG("IEEE802.15.4 frame - FCF: %02X %02X DPID: %02X SPID: %02X DSN: %02X\n", buf[0], buf[1], frame->dest_pan_id, frame->src_pan_id, frame->seq_nr);
|
||||
|
||||
p.length = hdrlen + frame.payload_len;
|
||||
p.length = hdrlen + frame.payload_len + IEEE_802154_FCS_LEN;
|
||||
|
||||
if (mcast == 0) {
|
||||
p.dst = daddr;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user