- } elsif ($sort eq 'I' || $sort eq 'S' || $sort eq 'U' || $sort eq 'M') {
- dbg('agw', "AGW Monitor \"$data\"");
+ } elsif ($sort eq 'I' || $sort eq 'S' || $sort eq 'U' || $sort eq 'M' || $sort eq 'T') {
+ my $d = unpack "Z*", $data;
+ $d =~ s/\cM$//;
+ my @lines = split /\cM/, $d;
+
+ for (@lines) {
+ s/([\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg;
+ dbg('agw', "AGW Monitor port: $port \"$_\"");
+ }