In my previous post, I finally started to make some progress with my Windows Embedded CE project. I was able to get a simple test application running which could send and receive messages via a serial port on my iCop eBox 2300 computer. I first sent messages to a host computer using an RS232 crossover cable. Once I confirmed that there were no problems sending and receiving messages or changing the baud rate, I cut the cable and plugged in a pair of XBee modules in place of the crossover cable. I wasn’t ready to install custom device drivers in my Windows Embedded CE operating system image, so I used an XBee serial explorer ordered from SparkFun to connect an XBee to the eBox computer. After confirming that everything was working as expected, I was ready to modify the serial port test application to run my wireless light controller.
The secret sauce is my home-brew Arduino clone running from a capacitive power supply.
More about that next week!
Before I continue, I want to briefly reflect on some of the steps required to get my program to finally work. I initially suspected that I had a serial port buffer overrun problem, since I couldn’t send messages longer than 16 characters. When I noticed that my serial port test program would hang at the end of a serial port transmission of any length, I started to think that the problem may be interrupt related instead of buffer related. If the serial port call was waiting for a “buffer empty” signal before it returned control to my program, hanging at the end of a transmission meant that it never got that signal. Since I had been editing a number of serial port settings in the BIOS and registry while trying to disable or reroute serial debugging messages, I might have inadvertently modified a critical registry key. Rather than retrace my steps and restore the factory settings, I started with a clean copy of the BSP to build the operating system image. I had also notice that many of the build directories for my Visual Studio 2005 installation were pointing to a more recent version of Visual Studio on my computer. After mapping all the directories to the correct location, I rebuilt the operating system using clean copies of all the drivers and BSP.
Finally, everything worked flawlessly when I tested the new operating system with the simple Visual Basic serial port terminal example from Samuel Phung’s Windows Embedded CE 6.0 online resources.
Follow along at the SPARK site!
ADVERTISEMENT