diff --git a/app/Classes/Protocol/EMSI.php b/app/Classes/Protocol/EMSI.php index 3393f8a..412d181 100644 --- a/app/Classes/Protocol/EMSI.php +++ b/app/Classes/Protocol/EMSI.php @@ -963,6 +963,24 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface $iaccmd = NULL; break; + // Suppress Go Ahead + case 0x03: + if ($iaccmd === 0xfb) { + Log::debug(sprintf('%s: - IAC WILL SUPPRESS-GO-AHEAD [%02x]',self::LOGKEY,ord($iac))); + + // Config with DO + $this->client->send(chr(0xff).chr(0xfd).$iac); + } elseif ($iaccmd === 0xfd) { + Log::debug(sprintf('%s: - IAC DO SUPPRESS-GO-AHEAD [%02x]',self::LOGKEY,ord($iac))); + + // Config with WILL + $this->client->send(chr(0xff).chr(0xfb).$iac); + $this->client->iac_bin = true; + } + + $iaccmd = NULL; + break; + case 0xfb: Log::debug(sprintf('%s: - IAC WILL [%02x]',self::LOGKEY,ord($iac))); $iaccmd = ord($iac); @@ -981,7 +999,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface } if ($iaccmd) { - $iac = $this->client->read(10,1); + $iac = ord($this->client->read(10,1)); $ch = NULL; }