OK, I'll take a look in the next day or so.
Im going to have to refresh my memory of this library,
AND dig up some external hardware to test with if I cant see any
obvious code-bugs in my or your coding...
(I have had un-resolved intermittant problems in the past with port_read_bytes
losing sync with its buffer at times so it may be something there)
FYI:: 90% of my testing was done through a USB-serial adaptor, so its
unlikely to have anything to do with that...
I'll let you know back here...