It has been awhile since I have posted anything to the blog, and I have a couple of items I would like to bring up.
I have been working on a new robot, "Socrates 1", and I will be posting pictures sometime this month. It is still a work-in-progress, but I expect that it will be operational in about two weeks. Then the fun will begin, as I endeavor to create *reusable* navigation algorithms using principles of both Probabilistic and Soft (hybrid genetic algorithms and simulated neural net) Computing. I will be using the Microsoft Robotic Studio to host the algorithms running on a remote PC sending commands to the robot over a WiFi connection.
I have a lot to learn in many technology domains, but I have done the research and I am ready to begin. My hope is to create a working Telepresence robot and a few research papers along the way documenting my results.
Another matter…
Something I noticed during early testing of Socrates 1 with the very cool Serializer.NET board (provides low level control functions), is that I was having a problem communicating with the RS-232 port on my eBox 2300 when using .NET CF 2.0 SP1 and CE 6.0. Eventually I was able to get things working, but I had to make a few minor changes to the reference RS-232 driver provided with CE 6.0. The changes are as follows:
The .NET CF framework attempts to set the driver queue size, which is not supported in the current version of the driver. This causes SetLastError to be called which results in an exception in the .NET CF code. The source code excerpted below displays the required modification in $(_WINCEROOT)\public\common\oak\drivers\serial\com_mdd2\mdd.c at about line 2878. The comments prefixed with “NOTE:” belong to the original developer, and are not mine
.
case IOCTL_SERIAL_SET_QUEUE_SIZE :
// BEGIN .NET CF WORKAROUND: JYW, Trying to accomodate .NETCF.
// SetLastError(ERROR_NOT_SUPPORTED);
// RetVal = FALSE;
RetVal = TRUE;
// END .NET CF WORKAROUND: JYW
// NOTE: Normally we would do something with the passed in parameter.
// But we don't think the user has a better idea of queue sizes
// compared to our infinite knowledge.
The other change occurs at about line 611 in the same file, and is required because the .NET CF framework does not properly initialize the XON/XOFF limits. My guess is that since XON/XOFF is not supported in the .NET CF serial classes, these fields were just left uninitialized in the DCB structure. The modified source code is depicted below.
ApplyDCB (PHW_INDEP_INFO pSerialHead, DCB *pDCB, BOOL fOpen)
{
PHWOBJ pHWObj = pSerialHead->pHWObj;
// BEGIN .NET CF WORKAROUND: JYW
// if (!(pDCB->XoffLim< pSerialHead->RxBufferInfo.Length &&
// pDCB->XonLim< pSerialHead->RxBufferInfo.Length - pDCB->XoffLim )) {
// return FALSE;
// }
// END .NET CF WORKAROUND: JYW
After these two changes were made, I am happy to report that the .NET CF 2.0 SP1 serial classes worked quite well with my Serializer.NET board.
I have a lot more to say about the journey I have taken in assembling Socrates 1, particularly on my selection of sensors and controller from RoboticsConnection. Unfortunately, I need to get ready for a business trip.
Until next time,
James (Jim) Y. Wilson