Server Net Application Design Details
The drivers for the digital cameras were written for Windows 95, and since we weren’t interested in writing our own device drivers (not worth the effort given our actual goal), we decided to use Windows 95. We also used an Embedded Development Board donated by Intel to assess its usefulness in actual embedded applications. It allowed us to hook up an ethernet card for communications as well as the parallel port required for communication with the digital camera itself.
Since we had to use Windows 95 on the Intel Embedded Development Board, it was necessary to implement the server application in the windows environment.
We decided to implement the server using windows sockets in C since we were familiar with programming in this paradigm. It would have been possible to implement the server in a variety of other languages: Java, Perl, even C++ in windows using MFC.
The server constantly “listened” for communication from the client application. Once the command has been received from the client, it is communicated to the 8051 microprocessor using serial transmission.
Serial transmission under windows is performed by opening a file for the specific COM Port, and associating that file handle with a COM Port state. Serial transmission can then be facilitated by simply writing to the handle representing the COM Port, like any normal file.