The expected data lenght of the session layer message "close_session_response" should be 3 bytes and not 4. This is defined in CENELEC specification EN 50221 (Section 7.2.6.6 Close Session Response, Table 11: Close Session Response coding) Signed-of-by: Joaquin Anton Guirao <j.guirao@xxxxxxxxxxx> diff -r 3d43b280298c lib/libdvben50221/en50221_session.c --- a/lib/libdvben50221/en50221_session.c Fri Mar 21 20:26:36 2014 +0100 +++ b/lib/libdvben50221/en50221_session.c Wed May 28 09:40:15 2014 +0200 @@ -715,13 +715,13 @@ uint8_t connection_id) { // check - if (data_length < 5) { + if (data_length < 4) { print(LOG_LEVEL, ERROR, 1, "Received data with invalid length from module on slot %02x\n", slot_id); return; } - if (data[0] != 4) { + if (data[0] != 3) { print(LOG_LEVEL, ERROR, 1, "Received data with invalid length from module on slot %02x\n", slot_id); ˙ôčş{.nÇ+?ˇ?Ž??+%?Ë˙ąéÝśĽ?w˙ş{.nÇ+?ˇĽ?{ąţg??Żâ?Ř^n?rĄöŚzË?ëh?¨čÚ&ŁűŕzżäzšŢ?ú+?Ę+zfŁ˘ˇh??§~??Űi˙˙ď?ę˙?ęçz_čŽćj:+v?¨ţ)ߣřm