numbers up to 8 are sent, nothing after that
That implies that your UART (or UART emulation) has a hard limit buffer of 15 -- strange in this day and age, but not impossible -- in which case, perhaps it will like it better if you only send a max of 15-bytes at a time.
Try adding your own write method wrapper that breaks the string up into 15-byte chunks. Eg.
sub myWrite {
my( $port, $data ) = @_;
for my $chunk ( unpack '(a15)*', $data ) {
$port->write( $chunk );
sleep 0.1; ## may not be necessary; or maybe 0.001 is enough;
+experiment.
}
}
...
# $ob->write( "$string\n");
myWrite( $ob, $string );
Of course, if you have time to waste, you could subclass Device::Serial and override write ...
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|