So the console works wonderful and I can load dll's onto the SD card and send messages to the controller to load the dlls depending on what library I have made for each component I want to work with. Each controller library communicates in sync with a dynamic Windows user control to exchange events and values through the protocol and as a developer I no longer have to worry about the communication part and now can just create controls and snap them in on the fly depending on what I want the Netduino to control. So in theory I can control the Netduino from a windows app any way I want or control the windows app from the Netduino any way I want without knowing anything about the message layer.
Here is the problem. I got a bit cocky in that I got tired of compiling a Micro Framework dll and pulling the sd card loading the dll and resetting the netduino. So I decided to add streaming into the serial protocol that will send the dll file through serial and auto save to sd card and then load.
The main problem is since this is a protocol that has many message types once entering into a stream mode, since any byte in the file can represent 0 to 255 I no longer have a message terminator to let me know when I have sent the last byte of the file.
How to I tell my data received event I am done sending any byte 0 - 255? What kind of message End of Transmission can I use if binary data uses all of them?
I tried looking at the way the FTP protocol works to see if that would help but FTP sends a binary stream on a separate port from the one it actually exchanges messages. I do not want to use two different com ports with FTDI connections. There has got to be a better way.











