From 43186cdc9054d0520708e59da54d206046804010 Mon Sep 17 00:00:00 2001 From: mgernoth Date: Mon, 14 Aug 2017 16:49:04 +0000 Subject: [PATCH] 00_HMUARTLGW.pm: check if LastSendLen is defined before using it git-svn-id: https://svn.fhem.de/fhem/trunk@14899 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/00_HMUARTLGW.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/00_HMUARTLGW.pm b/fhem/FHEM/00_HMUARTLGW.pm index bd4d097a5..54aeb50eb 100644 --- a/fhem/FHEM/00_HMUARTLGW.pm +++ b/fhem/FHEM/00_HMUARTLGW.pm @@ -1459,7 +1459,8 @@ sub HMUARTLGW_Read($) my $crc = HMUARTLGW_crc16(chr(0xfd).$unescaped); if ($crc != 0x0000 && - $hash->{DevState} != HMUARTLGW_STATE_RUNNING) { + $hash->{DevState} != HMUARTLGW_STATE_RUNNING && + defined($hash->{Helper}{LastSendLen})) { #When writing to the device while it prepares to write a frame to #the host, the device seems to initialize the crc with 0x827f or #0x8281 plus the length of the frame being received (firmware bug).