Web Server
Nicholas Yameen <Nicholas.Yameen@...>
Hello,
I see there is an example for a dumb HTTP server for Zephyr in the samples folder. This example serves a single static web page when going to that IP address in a web browser. Is it possible to make a dynamic web page using Zephyr?
My use case is to have my FRDM-K64F board host the server and change values on the web page every couple seconds. The board will receive data and put it on the web page essentially. Is this possible?
I also read online that Zephyr removed its HTTP API. Would this affect me trying to build this application?
|
|||||||||
|
|||||||||
lairdjm
Hi Nick,
HTTP support is set to be dropped soon last I heard yes, this is because it hasn’t been converted to use the new sockets API and has no active maintainer, that may change in the future.
You can do it multiple ways, the easiest would be to have static pages but have the dynamic data on specific URIs like /sensor returning a list of the data in JSON format and then having some AJAX on the webpage which gets this
data and puts it where it is needed, it would require a web browser with JavaScript to function, but doesn’t require reloading the whole page to update the values on it.
Thanks,
Jamie
From: devel@... <devel@...> on behalf of via Lists.Zephyrproject.Org <Nicholas.Yameen=se.com@...>
Sent: Monday, April 15, 2019 7:02:46 PM To: devel@... Cc: devel@... Subject: [Zephyr-devel] Web Server EXTERNAL EMAIL: Be careful with attachments and links. Hello,
I see there is an example for a dumb HTTP server for Zephyr in the samples folder. This example serves a single static web page when going to that IP address in a web browser. Is it possible to make a dynamic web page using Zephyr?
My use case is to have my FRDM-K64F board host the server and change values on the web page every couple seconds. The board will receive data and put it on the web page essentially. Is this possible?
I also read online that Zephyr removed its HTTP API. Would this affect me trying to build this application?
|
|||||||||
|
|||||||||
Paul Sokolovsky
Hello Nicholas,
On Mon, 15 Apr 2019 18:02:46 +0000 " via Lists.Zephyrproject.Org" <Nicholas.Yameen=se.com@lists.zephyrproject.org> wrote: I see there is an example for a dumb HTTP server for Zephyr in theZephyr offers a (sizable subset of) BSD Socket API, which means you can either implement such a server relatively easily or port an existing (small) one to Zephyr. Availability of an HTTP server library in Zephyr tree largely depends on doing a good research among the existing small HTTP server (also, client) implementations, choosing the best one, or discarding them all and embarking on writing our own from scratch. So far, nobody did that work. Hasting with adding such a library to Zephyr can only lead to sub-ideal choice, which later will need to be replaced with something else or changes substantially, leading to breakage of user applications. In this regard, starting so far with out-of-tree libraries seems like good choice (and sharing any experience with them is very welcome and will be helpful to choose the "official" library to import in-tree). [] -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|||||||||
|
|||||||||
Jukka Rissanen
Hi Nicholas,
toggle quoted messageShow quoted text
see https://github.com/zephyrproject-rtos/zephyr/issues/14467 for discussion about HTTP API support. Cheers, Jukka
On Mon, 2019-04-15 at 18:02 +0000, via Lists.Zephyrproject.Org wrote:
Hello,
|
|||||||||
|