UPnP DeviceControl on WinCE 5.0

T

Tomppa

I am wanting to create a UPnP discoverable WinCE 5.0 device. Can this be
done from CF 2.0?

I've googled around but can not find examples of this.

Is this possilbe? Do I need to use the Intel library?

Thanks
 
T

Tomppa

OK I've taken the Intel UPnP stack for .NET and converted it to CF 2.0

Here is the SLN with the 2 projects
http://finnishtv.com/UPnP1.zip

I can run the light bulb example in debug mode on a PocketPC 2003 with the
wireless enabled for UPnP communication. Very cool!

I run Intel Device Spy on my PC and it auto connects to the UPnP light bulb
running on the PPC.

I can invoke events and pass arguments to the Light Bulb. Cool!

However..

When I right click on a service in Device Spy and select Subscribe to
Events, it does not work.

I've set a breakpoint on the Light Bulb project and it indeed receives the
request to subscribe to the event and appears to create the event hook and
even send the response but the Device Spy application does not appear to
receive the response. Perhaps it is malformed????? do a search for //TODO
in the code to see where this happens

To ensure it was not Device Spy I ran the light bulb example on the desktop
and was able to successfully subscribe to the service events.

I took the compiled Light Bulb Example for PPC in the SDK and ran it on the
PPC. Same results, Device Spy cannot subscribe to events.

So is it an Intel PPC UPnP implementation issue?????

It is all C# code and does not call any other C code. My debugging was
unsuccessful in identifying the problem.

Perhaps someone smarter than me would be interested in helping to get the
eventing working. Everything else seems to work great.

Here are the Intel tools including Device Spy including the SDK for Desktop
and PPC .NET framework 1.1.
It's worth watching the videos on the Intel site for a quick intro to UPnP
and the cool tools that Intel has.
http://www.intel.com/cd/ids/developer/asmo-na/eng/downloads/upnp/overview/index.htm

The other alternative is to p/Invoke Microsft UPnP that shipped with CE 5.0
but I really would not know where to start and the Intel solution seems so
close.
 
T

Tomppa

I was able to fix this.

Search the code for function call
ParseEventURL

It is called in 2 places.

Before this is called clean the string that is passed in as follows.

sinfo.CallbackURL = sinfo.CallbackURL.Replace("<", "");

sinfo.CallbackURL = sinfo.CallbackURL.Replace(">", "");

It expects a URI and was failing for this reason.

I am now able to subscribe to events in Device Spy.

My next task in to implement the UPnP A/V render spec so the device shows up
in Windows Media Connect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top