I'm connecting to a bluetooth module which conects to a PC via VCOM, on PC side I'm currently just collecting the data with Teraterm. On the PC/module side hardware handshaking is in place (module has fairly small buffer), I am not sure what the handshaking setup is on the tablet side - can't see any config for it in my code.
Will be back on it that afternoon then can look into any more specific things to be looked into.
Strangely this morning I managed to transfer the whole dataset twice with no errors, perhaps there was something fishy happening behind the scenes the other day that was causing the error. Will continue to look at it.
I found the error, there was a timer that should have been disabled and it was interrupting the transmission and closing the stream.
All working reliably now.