D
davewilliamson55555
Using Compact Framework 2 SP1 on Windows Mobile 5 VB.NET 2005
SerialPort control on both the PC and WM sides using hardware
handshaking ...
If I send a byte array across the serial port a byte at a time then the
other side seems to receive all the bytes ... but if I send a chunk of
the byte array at a time (1024 bytes ... even tried as low as 100
bytes) the other side doesn't always receive all the bytes.
'this works but takes a year and a day to transmit the data
dim b() as byte = {1024 * 100, 32}
for n as system.int32 = 0 to b.length -1
SerialPort1.Write(b,n,1)
next
'this does not work
SerialPort1.Write(b,n,1024)
And reading the documentation is even more confusing because it reads
like b is the serial buffer .... probably a copy and paste from the
Read method documentation that just didn't get edited.
To really exagerate the condition do this and hardly any of the bytes
makes it to the receiver:
dim b() as byte = {1024 * 100, 32}
SerialPort1.Write(b,0,b.length)
Can anyone help me understand what bad assumptions I must be making?
SerialPort control on both the PC and WM sides using hardware
handshaking ...
If I send a byte array across the serial port a byte at a time then the
other side seems to receive all the bytes ... but if I send a chunk of
the byte array at a time (1024 bytes ... even tried as low as 100
bytes) the other side doesn't always receive all the bytes.
'this works but takes a year and a day to transmit the data
dim b() as byte = {1024 * 100, 32}
for n as system.int32 = 0 to b.length -1
SerialPort1.Write(b,n,1)
next
'this does not work
SerialPort1.Write(b,n,1024)
And reading the documentation is even more confusing because it reads
like b is the serial buffer .... probably a copy and paste from the
Read method documentation that just didn't get edited.
To really exagerate the condition do this and hardly any of the bytes
makes it to the receiver:
dim b() as byte = {1024 * 100, 32}
SerialPort1.Write(b,0,b.length)
Can anyone help me understand what bad assumptions I must be making?