Size matters

January 5, 2004 No comments yet

I forgot to mention that by getting rid of this crappy std::string, and use my ownn class, I saved 4KB of code! I also played with msdev7 and I saved another 20KB. My binary is now only 108KB ! I expect that with events and control working, it should be around 120KB.

-s

News

January 5, 2004 No comments yet

It’s been a while I have not posted something..well it’s because I have been very busy !!
First of all, my parser can parse the prolog < ?xml ... ?> now which is important for SCPD and for Control Events later.
Then I spent a lot of time working with the Sniffer making sure that I was sending the right stuff, I noticed for example that the byebye were not received. But it all got fixed. Also something is still odd, when I run my test app, the sniffer starts sending search requests by binding on port 1900 as well as a random port. It doesn’t do that with other devices like the MediaRenderer. It’s odd.
Anyway, I spent some time and changed quite a few things although I don’t know yet if that’s useful. A UDP socket per interface for SSDP NOTIFY for example is kept around now and reused .. The Search Responses sockets also don’t bind to port 1900 anymore.
Then I started to think, jesus that would be cool if it was working on CE. I started to play around with evc30 and realized that std:string is not ported to CE !
So I decided to rewrite everything with my own string class. I wanted to make it UNICODE first for CE and then realized it was a pain and didnt really need to so I made it non UNICODE, we’ll see how it goes for CE. I played around with evc4 and evc3, my parsing totally works but the multicast doesn’t on the emulator so I will have to wait to try on a real device.
Finally I started working on Control layer. I can now receive POST, parse the XML and call the action with the arguments. So far it’s not responding but that’s a start.
Ah and also, there’s no need to use non blocking sockets! My scheduler works with blocking sockets too and it seems to behave a lot better when reading data compared to non blocking.
I also found out that there’s a bug under NT for UDP packets. It can return WSACONRESET instead of WSAWOULDBLOCK sometimes. Maybe that’s why a socket per interface helps maybe instead of one for all…
Time to sleep. I probably spent more than 20 hours in the last 3 days on this, I am beat … but it’s coming along nicely…

YEHAAA!

December 31, 2003 2 comments

Well I was kinda cheating before. I was reading the SCPD xml from a file and returning it directly when asked by a control point. Well after 4 more hours of work tonite, I now actually parse it, create the C++ objects and when being asked, I reformat the XML on the fly. Very neat! .. I just noticed some problems with my parser though, it doesn’t know how to pass comments! And also, it doesn’t like it when the xml has the header < ?xml version=1.0?> , it seems to barf .. will have to fix that soon…

Multiple devices attached

December 30, 2003 No comments yet

OH I forgot to mention. I can now run multiple devices (non embedded) on the same scheduler! So if you want a MediaServer and a MediaRenderer running on the same scheduler, it works, simply add them both and launch the scheduler. Oh and of course you can start the scheduler first and attach a device later ;-)

Validation passed !

December 30, 2003 1 comment

I was too tired yesterday to blog it (2am again)but after 6 hours of work, I fixed more problems and am now valid for the discovery and description layers of UPnP !!!! This is huge. I also found out that I don’t need to have one listening http server on each local interface which is really weird if you ask me. One problem I noticed which also happens with the Intel stack is that validation hangs if the vpn cisco client runs at the same time. It is fine with a Network loopback adapter AND a standard windows vpn connection running at the same time so I don’t know what’s up with that …

Sleeeeeppy….

December 29, 2003 No comments yet

Ok I spent the last 5 hours trying to fix some problems. The sockets were not being closed properly. It was tricky to fix as 2 tasks can be simultaneously reading and writing to the socket or not. Anyhow, I found a nice way to solve the problem using references.
I also added support to complete search!
Code is more streamlined too, reorganized.
I can already send POST but I am not responding to them yet.
Next thing is to actually create the services based on xml document ..
Time to sleeeeeeeeeeeeep….


Categories

Archives