Hi,
The bug ticket #5 UTC time synchronization, was not fix properly.
In the function Send_TimeSyncUTC (file s_ts.c, line 117) the value of pdu_len is overwritten. It should be added to the current value.
It results in a malformed packet to be sent.
Also on line 117, 118, the index of Handler_Transmit_Buffer should be pdu_len.
117 pdu_len = 118 timesync_utc_encode_apdu(&Handler_Transmit_Buffer[0], bdate, btime);
my fix: 117 len = 118 timesync_utc_encode_apdu(&Handler_Transmit_Buffer[pdu_len], bdate, btime); 119 pdu_len += len;
see Send_TimeSync_Remote(), it should be the same code apart from timesync_utc_encode_apdu
Anonymous
You seem to have CSS turned off. Please don't fill out this field.
Fixed in revision: 2722 in trunk/bacnet-stack. Plans to merge to other branch versions.
Also on line 117, 118, the index of Handler_Transmit_Buffer should be pdu_len.
117 pdu_len =
118 timesync_utc_encode_apdu(&Handler_Transmit_Buffer[0], bdate, btime);
my fix:
117 len =
118 timesync_utc_encode_apdu(&Handler_Transmit_Buffer[pdu_len], bdate, btime);
119 pdu_len += len;
see Send_TimeSync_Remote(), it should be the same code apart from timesync_utc_encode_apdu
Fixed in revision: 2722 in trunk/bacnet-stack. Plans to merge to other branch versions.