Thursday, February 28, 2008

.Net Remoting for the Compact Framework

As you may have read in the summary of the last meeting, Peter Cosemans came up with the idea to use .NET remoting instead of a homebrewed communications protocol.
Maurice Beelen and I investigated this and we found out that, unfortunately, .NET remoting is not supported in the .NET Compact Framework.
Luckily, we ran into the following company: As Good As It Gets LLC. They created a remoting and serialization framework for Windows CE that is compatible with .NET remoting and they claim it's even faster.
It's not free (A license for one developer costs $199) but it's great! Our Siibot can be controlled remotely now, virtually in no time! See it driving around:


This is how I did it:

First of all I downloaded the .NET CF.Remoting.Client, CF.Remoting.Server, CF.Serialization - Installer and the 35 day trial license keys for both CF.Serialization and CF.Remoting from this page
Note that both license keys must be copied to the \Program Files\SiibotApp directory on the eBox later on.

The server side

I created a solution containing a CE 5.0 C# Device Application and a CE 5.0 C# Class Library. The class library contains an interface named IRoomba and a Roomba class implementing it. To make remoting work, the Roomba class has to inherit from System.MarshalByRefObject.

The Roomba class contains some code to initialize serial port COM1 and a little serial IO code to send the actual commands. This was borrowed from the RoombaSCI library for the time being.

Next it was time to initialize remoting in the form class. First of all I referenced the two AsGoodAsItGets assemblies and the class library containing the IRoomba interface. Next I added the appropriate using clauses.

The class has to be registered so it can be instantiated and invoked via remoting over TCP/IP.

Note that we chose WellKnownObjectMode.Singleton mode instead of WellKnownObjectMode.SingleCall since the latter reinstantiates the object with every method call.
For testing purposes remoting was initialized for TCP port 1500. According to IANA List of well known port numbers this port is reserved for the VLSI License Manager, but in our environment this is currently not a major issue. To be able to proceed with the client side, the server side project must be compiled first.

The client side

The client is a simple C# (.NET Full Framework) Windows application containing a couple of buttons to control the Siibot.
Make a reference to the class library assembly from the server project containing the IRoomba interface and the implementation.
The nice thing is that we can use standard .NET remoting now to instantiate the remote object and to invoke methods on it:

Note that we used a fixed IP here. I was able to do that because I configured my wireless router to assign this ip address to the eBox only.
Now that we have a referenced interface we can call methods on it. Behind each button on the form I call the appropriate method.

My conclusion: "As Good As It Gets Remoting" is great! We should definately purchase a license.

Deploying a C# project on the eBox

In order to deploy a solution to the eBox I followed these steps:

I booted the eBox from the standard option in the boot menu: Boot CE/PC (local nk.bin with /L:1024x768x32)
Next I made a wireless connection from the eBox to my home wireless router by clicking its SSID from the list and (in my case) entering its AES/WPA2-PSK key. My router is configured as DHCP server for known MAC addresses so I had to add the eBox's MAC address to the allow list of my router.
In case you have a long Wi-Fi security key you can put it on a USB memory stick. It will appear under "\USB Storage" in the eBox's filesystem.
After the connection has been made, use ipconfig to check if a proper IP address was assigned.

Next, follow the steps mentioned in Part 6 of the eBox-2300 Windows Embedded CE 6.0 Jump Start Guide

Note: To get Visual Studio 2005 (Express) working on Vista, both VS2005 (Express) SP1 and Visual Studio 2005 Service Pack 1 Update for Windows Vista must be installed

I noticed that after installing the eBox SDK the "eBox2300_WinCE600_SDK x86 Device" didn't show up in the list of target devices in Visual Studio. Renaming my C:\Users\\AppData\Local\Microsoft\CoreCon\1.0 directory and restarting Visual Studio 2005 fixed the problem. See also: Google topics

Wednesday, February 27, 2008

Siibot meeting February 21st 2008

In English this time :)

Next meeting: Thursday, April 17th 2008, 17:30: Pizza. 18:00: Start


Hans and Erik had a look at a way to run our Siibot code against the Microsoft Robotics simulator. They concluded that it will take too much effort to realize this.
Since we have 2 iRobot Create platforms and Erik has a real Roomba vacuum cleaner, we should manage without simulator.

C# Roomba SCI Library

Peter has been working on a Roomba SCI library that works for both the Compact and Micro Framework. This library is based on the existing RoombaSCI framework from SourceForge.
He's not finished yet and will proceed with the development.


During our meeting we tried to connect to the eBox through a wireless connection. We didn't succeed yet.
For the next time, Hans and Erik will have a look at connectivity and deployment.


The subversion archive is in place and it is actually used. However, the question was raised: what goes where?
As in normal projects we have a Development\Trunk\Sw directory that contains an App, Lib and Import directory.
The Import directory will contain any binary that our application depends on, like assemblies for instance.
We will support both Visual Studio 2005 and 2008: the Sw directory currently contains 2005 solutions for both Compact and Micro Framework. These two solutions will be added for 2008 as well.

A note from Maurice Beelen: Commit monitor is a handy tool that will notify you when there are changes in the archive.

eBox Battery Pack

Tim has fabricated the battery pack for the eBox! See the following blog items:

eBox 2300 battery and eBox running on battery

TCP/IP Client and Server

Maurice van den Heuvel continued working on the TCP/IP client and server. Currently data is sent one way only. Maurice will work on two way communication for the next time.


Peter suggested using .Net remoting. This offers direct functionality without all the TCP/IP and protocol plumbing. Maurice Beelen will start a parallel search for a Remoting Solution. He will use the Visual Studio CE simulator for this.


Jeroen has shown his experiences with a webcam he purchased. An API/SDK is available for it but it depends heavily on DirectShow. He will investigate if this is usable on the Compact Framework. Maybe C++ code is needed. Kristof Smits and Jeroen will look into this. Another option is using the VLC media player for streaming. Jeroen will investigate this further for the next time.

Porting Machine2World to the eBox

Kristof has been working on the M2W port for the eBox. The ACE and CURL library must be ported for this, but since Win CE lacks certain system calls that are available in non-CE Windows platforms there are still issues to be solved. Tim will join Kristof.


Maurice Beelen suggested to have a look at the overall architecture of out system. Maurice Beelen, Erik and Hans will take this up the following weeks.


  • M2W port (With TiBe)
  • Look at VLC streaming/C++? (with JeTo)
  • Remoting op WinCE (emulator)
  • Discuss the overall architecture (With HaOd & ErVe)
PeCo: C# Roomba SCI Lib 4 CF & MF

  • Webcam
  • Look at VLC streaming/C++? (with KrSm)

MaHe: TCP/IP two way communications

TiBe: M2W port (With KrSm)

  • Deployment of an application to the eBox + remote debugging
  • Discuss the overall architecture (With HaOd & MaBe)
  • Deployment (With ErVe)
  • Discuss the overall architecture (With MaBe & ErVe)

Weblog, de of het?

Is het nou of hét weblog? We zijn eruit! Het mag allebei van de Taaladviesdienst! :)

Thursday, February 21, 2008

CommitMonitor - SVN meets RSS ?


I found a nice tool by Stefan Küng (also responsible for TortoiseSVN builds). It's called CommitMonitor and tells you when changes to an Subversion repository occured. In stead of scanning the log your self you just provide the tool with the necessary URLs (yes local network repositories are not yet supported [bummer]) and it does it for you once every while. The period is adjustable.

When changes occur you get a nice message above your task bar and you can see in the monitor what has happened. You get per repository per commit the author, the comment and the modified paths.

The diff is unfortunately a unified diff over the complete set.

CommitMonitor main dialog

Just have a look at it. It gives me a good idea of what is happening in my codeSpace.

Thursday, February 7, 2008

eBox running on battery

Today we saw the eBox running on battery, so we can really start driving around now!