Hello Marcel, welcome to the list! I used MHD on ARM in a small HTTP server testing for Android: https://lists.gnu.org/archive/html/libmicrohttpd/2017-02/msg00014.html . This link contains an attached picture showing the results. I think I have the sources in my old machine.
I don't know if my environment can be useful for you, but I built MHD for ARM via integrated Android Studio's CMake, and used MHD in Java project with JNI. I can search and send sources if they could be useful for you ... On Sun, Jan 21, 2018 at 7:48 AM, Marcel Rutten <mcmrut...@gmail.com> wrote: > Hi, I'm new to this list, and I have been trying to get libmicrohttpd to > work on a linux-based smart thermostat. > > To no avail, so far. I should say that I'm not an expert on web > connections, but fairly fluent in C. > > The thermostat has a Freescale imx 27 processor, (ARM-926 EJS) and has an > openembedded image, developed around 2011, with linux kernel 2.6.26. The > reason I want to get libmicrohttpd working on it, is because it features a > zwave controller, which may be used to control TRVs (Thermostatic Radiator > Valves), a feature which is not available in the standard firmware of the > thermostat. The zwave interface can be operated through openzwave, and its > web interface ozwcp (open zwave control panel). ozwcp is linked against > libmicrohttpd to provide the web interface. > > I have tested the combination libopenzwave-1.4.164, libmicrohttpd-0.9.58 > and ozwcp (latest version from github) on a CentOS7 machine, x86_64, with a > USB zwave controller and it works flawlessly. External access to the > webinterface is OK. > > I built the same libraries and code for the thermostat, and everything > works, apart from the web interface. When testing with wireshark, I can > send a request, and get a 0-byte ACKnowledgement. For the rest, the server > remains quiet. No 404 not found, forbidden, unable to connect, nothing. > There appears to be no timeout for external connections, in fact, my PC has > been trying to connect for the last 30 minutes or so, without > interruption. The thermostat has no firewall (I switched it off), and nmap > shows the default port (8090) to be open. > > I have built libmicrohttpd with the following options : > "--prefix=/usr/local/ --disable-dependency-tracking --enable-examples > --enable-messages --enable-https --enable-largefile --enable-curl > --with-pic", copied from archlinux for ARM. > > The main program was linked against this library, and the webserver is > started normally, at least does not report any errors. The options were set > as follows: > MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | > MHD_USE_DEBUG | MHD_USE_ERROR_LOG > > I browsed through previous threads of this mailing list, and the only > thing I came across regarding ARM-specific issues was the definition of a > long vs. a long long integer. There are differences between a long on > x86_64 (8 bytes) and ARM (4 bytes length). I'm not sure if this plays a > role, Other than that' there's nothing much to find. > > My questions: Is this something new, or have other people encountered this > problem, and if so, how was it solved. > If it's really a new issue, where do I start looking? The code is well > documented, but it's a lot to plough through. > > TIA, > > marcelr > -- Silvio Clécio