So what happens in the second while loop if all your bytes arrived at once and were available when you entered the routine? What about if only some of the message bytes have been received? What if some of the bytes are delayed?
Have you set a breakpoint and single-stepped this?
Bookmarks