@Paul - modified prior PC app to read 512 bytes in groups of 1,000 times - and sends each buffer back to the T4, but only prints the last buffer of the 1,000. One sign of trouble with that garbage buffer - though not parsing and better testing the data on either end.
>>> time is short - days end here ...
> Here is the trouble sign - where it mirrors what I saw in both t_sermon and TyComm - the PC code uses the same buffer over and over - so something is causing the PC to send bad data - and these were caught on sparse printing 1/1K or 1/10K:
Code:
BUF of 512 : __>> 40 ... Waiting first count ...
10269741 ... Waiting first count ...
10269742 ... Waiting first count ...
10269743 ... Waiting first count ...
10269744 ... Waiting first count ...
10269745 ... Waiting first count ...
10269746 ... Waiting first count ...
10269747 ... Waiting first count ...
10269748 ... Waiting first count ...
10269749 ... Waiting first count ...
10269750 ... Waiting first count ...
10269751 ... Waiting first count ...
10269752 ... Waiting first count ...
10269753 ... Waiting first count ...
<<__
------ elapsed time 0.067 secs for 512000 Bytes outer loop left 982
BUF of 512 : __>> ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ <<__
------ elapsed time 0.061 secs for 469146 Bytes outer loop left 981
BUF of 512 : __>> "id" : "",
"path" : ""
},
{
"date" : "",
"hash" : "03FBBFC587F2D6D06B6F085F2E745EC8",
"id" : "",
"path" : ""
},
{
"date" : "",
"hash" : "7A907BC8A3183142266FCFF1A65A1DCB",
"id" : "",
"path" : ""
},
{
"date" : "",
"hash" : "AB822181ED39642F3BD3124B3735EFEB",
"id" : "",
"path" : ""
},
{
"date" : "",
"hash" : "11DE7AC5B18CC <<__
------ elapsed time 0.058 secs for 455260 Bytes outer loop left 980
BUF of 512 : __>> s= 7687509, lps=311586
10323897 0.1m RxBps= 7687509, lps=311586
10323898 0.1m RxBps= 7687509, lps=311586
10323899 0.1m RxBps= 7687509, lps=311586
10323900 0.1m RxBps= 7687509, lps=311586
10323901 0.1m RxBps= 7687509, lps=311586
10323902 0.1m RxBps= 7687509, lps=311586
10323903 0.1m RxBps= 7687509, lps=311586
10323904 0.1m RxBps= 7687509, lps=311586
10323905 0.1m RxBps= 7687509, lps=311586
10323906 0.1m RxBps= 7687509, lps=311586
10323907 0.1m RxBps= 7687509, lps=311586
10323908 0.1m <<__
------ elapsed time 0.072 secs for 481619 Bytes outer loop left 979
And again on another run only showing buffer 1 in 10,000 reads:
Code:
10143360 ... Waiting first count ...
10143361 ... Waiti <<__
------ elapsed time 0.669 secs for 5117745 Bytes outer loop left 999
BUF of 512 : __>> ˆ8Œ88”8˜8œ8*8¤8¨8¬8°8´8¸8¼8À8Ä8È8Ì8Ð8Ô8Ø8Ü8à8ä8è8ì8ð8ô8ø8ü8 <<__
------ elapsed time 0.685 secs for 5102635 Bytes outer loop left 998
BUF of 512 : __>> 7899264, lps=233362
10397019 0.1m RxBps= 7899264, lps=233362
Notes: on the good/expected output:
> this looks like 45 chars per line - so shifting lines in 512 buffer
> the RxBps is number of Bytes read per sec in serialEvent - oddly it only accounts for 10 to 24 bytes of the 44 coming back - just did more read in serialEvent
> Turning off the T4 leaves the code running some time with PC feeding backed up USB data
> TaskMan shows running ~6% CPU IIRC for the PC EXE
> the elapsed time is for the group of 1,000 or 10,000 and shows the bytes read in that time
> Modified the ser_test.ino to do newline on each print as shown
> Removed the two delays so the ser_test.ino is running full speed.
> The PC code on reading the buffer writes those bytes back to the T4. The Rx# is the bytes received in the last second, reset when lps is calc'd
> I didn't test without doing the PC USB send to T4.
Here are two of the BEST lps counts early (after 60 iterations of 10K) for groups of 10,000 USB 512 byte reads and it is only getting 7.38 Rx bytes per line:
Code:
BUF of 512 : __>> 6m RxBps= 9035776, lps=1224273
39387169 0.6m RxBps= 9035776, lps=1224273
39387170 0.6m RxBps= 9035776, lps=1224273
39387171 0.6m RxBps= 9035776, lps=1224273
39387172 0.6m RxBps= 9035776, lps=1224273
39387173 0.6m RxBps= 9035776, lps=1224273
39387174 0.6m RxBps= 9035776, lps=1224273
39387175 0.6m RxBps= 9035776, lps=1224273
39387176 0.6m RxBps= 9035776, lps=1224273
39387177 0.6m RxBps= 9035776, lps=1224273
39387178 0.6m RxBps= 9035776, lps=1224273
39387179 0.6m RxBps= 9035776, lps=12242 <<__
------ elapsed time 0.555 secs for 5120000 Bytes outer loop left 940
BUF of 512 : __>> 0.6m RxBps= 9035776, lps=1224273
39503760 0.6m RxBps= 9035776, lps=1224273
39503761 0.6m RxBps= 9035776, lps=1224273
39503762 0.6m RxBps= 9035776, lps=1224273
39503763 0.6m RxBps= 9035776, lps=1224273
39503764 0.6m RxBps= 9035776, lps=1224273
39503765 0.6m RxBps= 9035776, lps=1224273
39503766 0.6m RxBps= 9035776, lps=1224273
39503767 0.6m RxBps= 9035776, lps=1224273
39503768 0.6m RxBps= 9035776, lps=1224273
39503769 0.6m RxBps= 9035776, lps=1224273
39503770 0.6m RxBps= 9035776, lps=1 <<__
------ elapsed time 0.552 secs for 5120000 Bytes outer loop left 939
At 45 bytes/line that would be 55 MB/sec sent and at 0.555 sec per 5.12 MB received that is 9,225,225 bytes per second?
Anyhow - that is what I can say so far - when you see this and see anything of interest let me know. Too late to post code or do more.