diff --git a/bacnet-stack/ports/atmega168/hardware.ods b/bacnet-stack/ports/atmega168/hardware.ods index a71bdf8f..ce38e622 100644 Binary files a/bacnet-stack/ports/atmega168/hardware.ods and b/bacnet-stack/ports/atmega168/hardware.ods differ diff --git a/bacnet-stack/ports/pic18f6720/dlmstp.c b/bacnet-stack/ports/pic18f6720/dlmstp.c index 433f15ed..82fbb7bc 100644 --- a/bacnet-stack/ports/pic18f6720/dlmstp.c +++ b/bacnet-stack/ports/pic18f6720/dlmstp.c @@ -112,7 +112,7 @@ int dlmstp_send_pdu( return -2; } dlmstp_get_my_address(&src); - if ((8 /* header len */ + pdu_len) > MAX_MPDU) { + if ((MAX_HEADER + pdu_len) > MAX_MPDU) { return -4; } bytes_sent = diff --git a/bacnet-stack/ports/rtos32/dlmstp.c b/bacnet-stack/ports/rtos32/dlmstp.c index 2c15977a..01b2cf5e 100644 --- a/bacnet-stack/ports/rtos32/dlmstp.c +++ b/bacnet-stack/ports/rtos32/dlmstp.c @@ -89,8 +89,8 @@ int dlmstp_send_pdu( return -2; } /* header len */ - mtu_len = 8; - if ((mtu_len + pdu_len) > MAX_MPDU) { + mtu_len = MAX_HEADER - 2 /* data crc */; + if ((MAX_HEADER + pdu_len) > MAX_MPDU) { #if PRINT_ENABLED fprintf(stderr, "mstp: PDU is too big to send!\n"); #endif