Thank you for the hint, with the hint with the 16-bit to byte assignment.
Here is the the error throughing code of DTLS 1.0 and the correct output of DTLS 1.2 for comparison:
DTLS 1.0
received record layer msg
wolfSSL Entering DoDtlsHandShakeMsg()
wolfSSL Entering DoHandShakeMsgType
processing client key exchange
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoDtlsHandShakeMsg(), return 0
More records in input
received record layer msg
got CHANGE CIPHER SPEC
More records in input
received record layer msg
wolfSSL Entering DoDtlsHandShakeMsg()
wolfSSL error occured, error = -210
ERROR
wolfSSL Entering SSL_accept()
received record layer msg
wolfSSL Entering DoDtlsHandShakeMsg()
wolfSSL error occured, error = -210
ERROR
****************
DTLS 1.2
received record layer msg
wolfSSL Entering DoDtlsHandShakeMsg()
wolfSSL Entering DoHandShakeMsgType
processing client key exchange
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoDtlsHandShakeMsg(), return 0
More records in input
received record layer msg
got CHANGE CIPHER SPEC
More records in input
received record layer msg
wolfSSL Entering DoDtlsHandShakeMsg()
wolfSSL Entering DoHandShakeMsgType
processing finished
wolfSSL Leaving DoHandShakeMsgType(), return 0
wolfSSL Leaving DoDtlsHandShakeMsg(), return 0
accept state ACCEPT_SECOND_REPLY_DONE
growing output buffer
accept state CHANGE_CIPHER_SENT
growing output buffer
The line with text ERROR is given on application layer.