CivetWeb for Windows CE?

239 views
Skip to first unread message

Peter Duerr

unread,
Apr 4, 2016, 3:50:30 AM4/4/16
to civetweb
Hi,
I have a Project where i want to embed a Webserver to an existing C/C++ Application. The Goal is to provide a Web GUI which communicates (in booth directions) with the Application (incl. Webserver) via Websockets.
So i have found CivetWeb and Mongoose.
The application and so the Server should run on the target, which is using the OS´s Windows Embedded Compact 7 / Windows CE 6.

Now the Problem:
I didn´t manage to get one of them build successfully.
In Mongoose it´s clear, there aren´t any Windows CE specific implementations,
but in CivetWeb Source there are some "#ifdef _WIN32_WCE" Windows CE specific Preprocessor Switches.

But still Civetweb didn´t build successfully (Only a few Errors).

Used Tools:
Visual Studio 2008 Pro & Windows Embedded Compact 7 SDK / Windows CE 6 SDK


Has anyone successfully used CivetWeb or Mongoose on any Windows CE Version?

I would prefer Civetweb as Solution if its possible to port it to Windows CE.
If anyone has a alternative Webserver Solution which could fit the requirements and will work on the named OS´s, i would apprecitate any hint.

Thanks in advance,

Peter


 

bel

unread,
Apr 16, 2016, 5:01:08 AM4/16/16
to civetweb
I did not do a build for Windows Embedded Compact (WinCE) recently.
But if there are errors in the build, they should not be too hard to fix.

Visual Studio 2008 is just the IDE, it should not depend on the IDE but only the compiler in the WinCE SDK.
I do not have anything older than Visual Studio 2010 - the project file format has changed between 2008 and 2010, and 2010 allows to choose the SDK in the project settings - I think this has been somewhere in the global settings before. I can not help with VS 2008.
Probably you should use just your own project file, and add only mongoose.c to your existing project and forget about the existing Visual Studio project files in CivetWeb.

My WinCE knowledge is somewhat outdated (WinCE 5.0) - is there still an SDK including compiler somewhere to download?

If you post the errors here, I might be able to tell how to fix them as well.

Brian Eter

unread,
May 18, 2016, 2:31:44 AM5/18/16
to civetweb
I've spent the last 2 weeks attempting to build this for a Windows CE 6.0 device with no success. It's definitely not ported for WinCE and requires some knowledge to get it done, sadly I wasn't good enough to get it going.

bel

unread,
May 19, 2016, 11:53:19 AM5/19/16
to cive...@googlegroups.com


On Wednesday, May 18, 2016 at 8:31:44 AM UTC+2, Brian Eter wrote:
I've spent the last 2 weeks attempting to build this for a Windows CE 6.0 device with no success. It's definitely not ported for WinCE and requires some knowledge to get it done, sadly I wasn't good enough to get it going.


It worked for Win CE 5  some years ago. Probably some recent changes broke the build, or maybe the specific CE 6 is too different from the Microsoft CE 5 SDK.
As far as I understood, up to CE 5 Microsoft made the SDK, while in CE 6 the device vendor is supposed to make the SDK (with "Platform Builder").

Again: If you post the specific build errors here, I might be able to tell how to fix them as well.
Or if you have a download link for a SDK, I might be able to help as well (for Visual Studio 2010/2015, a VS2008 setup won't help).

"Win CE 6.0" is just not enough information to help.

Brian Eter

unread,
May 24, 2016, 11:27:38 PM5/24/16
to civetweb
Hi Bel,

The link to the SDK is here.

http://www.moxa.com/support/DownloadFile.aspx?type=support&id=1793

I'm not sure if it works with Visual Studio 2008+. I only ever had VS2008 installed on my PC at work.

bel

unread,
May 27, 2016, 7:08:19 PM5/27/16
to civetweb


I do not have VS2008 - I asked a someone with more experience with WinCE. He told me I would need Visual Studio 2008 Professional, VS2008 Express is not enough, and in general Express versions never support WinCE. WinCE 5, 6, and 7 use VS2008 and WinCE 7 (WinCE 2013) uses VS2012 Professional - everything else is not officially supported and causes a lot of problems if you try.

But he checked civetweb with his VS2008 Professional for a WinCE 6 ARM device. There seem to be some issues with some recent changes - some additional ANSI C functions missing, that require including some ANSI C supplement/compatibility library (CELIB, wcelibcex, ...). When I have more detailed information, I will let you know.

Message has been deleted

Brian Eter

unread,
May 30, 2016, 12:19:04 AM5/30/16
to civetweb
Thanks for looking into it Bel, much appreciated. I've realised it's far beyond my knowledge to get it working after trying for a few weeks so I've continued developing the Frontend Web in the mean time in the hope I can get the backend server running on Windows CE by the time I'm done.

bel

unread,
May 30, 2016, 4:53:37 PM5/30/16
to civetweb
I already got a version compiling for CE 6.0, but with some restrictions like NO_CGI, NO_SSL, NO_CACHING, NO_POPEN, NO_NOUNCE_CHECK, no WebDav and some dummy functions (thanks to Space Lord - not to be confused with Star Lord ;-) ). I'm going to check how they need to be integrated into V1.8.

Your SDK setup does not work: IHxFilters filter registration error
I was told this is because the Visual Studio version does not match, and you probably need Visual Studio 2005?

Brian Eter

unread,
May 30, 2016, 5:40:31 PM5/30/16
to civetweb
Hi Bel,

That's a start! The SDK will install on VS2008, you just have to untick the Documentation component during setup. 

Peter Duerr

unread,
Jun 3, 2016, 3:04:16 PM6/3/16
to civetweb
Hi bel and Brian,

First of all sorry for the late reply.
As Brian already mentioned, you can install the WinCE6 SDK in newer Visual Studio Versions if you uncheck the Documentation.

Back to problems when porting Civetweb:
I also disabled some Features like NO_CGI, NO_SSL, NO_CACHING, NO_POPEN, NO_PIPES, NO_NOUNCE_CHECK, no WebDav etc. and added the missing functionality, and finally got it compile and link successfully. There are still a few dummy functions, i couldn´t replace yet.

The Server starts on the device, but if i send the HTTP Request, i don´t get a Response (.html - File) in my Browser.
I debugged the Server a bit and it successfully creates all Threads for Sockets etc. and it notices the HTTP Request.

Maybe the File couldn´t be resolved depending on Path Variables or maybe there is still a bug in my Code.

I also tried compiling and linking without Support for Lua. So i guess porting the Lua Engine would require much more effort?
   
Best regards,

Peter Dürr


 

bel

unread,
Jun 5, 2016, 5:54:57 PM6/5/16
to civetweb
I'm trying to merge the version I got into the current source. The first commits are already merged now.
However, I can not build and test it by myself.




If you think you can not find a file in your test, you could turn on directory listing, and request "/".
Furthermore, I would check with a tool like fiddler2 in addition to the browser.




Lua just uses the standard ANSI C library as a base. Since WinCE does not support many C functions, building Lua for WinCE requires to add a supplement library which implements the missing C functions based on the Windows API. There are such libraries, but I don't know about their licenses and quality.
I don't know why Microsoft did not provide a standard compliant C library - I was told every company porting C code to using WinCE has it's own C supplement library.



 
Reply all
Reply to author
Forward
0 new messages