EC21E QuecOpen: HTTP web server

Hi everybody,

In a EC21E (QuecOpen version SDK: EC21EFAR06A05M4G_OCPU_20.001.20.001_SDK) it is present a folder “www” containing “pages” subfolder and index.html

I wonder if EC21E embeeds a web server and how to activate it: is there any document related to this feature?
Or is it necessary to include into the application apache or any other web server?
For example currently I included a modbusTCP server listeing on port 502.
Should I do the same for port 80? If so, it is very tedious…

In this way it will possible to reach it from remote (obviously using a sim card with public IP address or sim card in a VPN provided by carrier operator).

Thanks

Hi @davdav

If I understand correctly,are you asking about DMZ-like mapping transformations and webUI?
For this part function needs to be developed by customer, and about the folder “www”,this part is the webUI part provided by Qualcomm a long time ago, and it has no reference significance or some documents and also requires a license from Qualcomm.
As for as i know,most of these customers use open source software such as Goahead, apache, Lighttpd to build.

Hope those can help you.

Br,
Puck

Hello @Puck-Q,
Thanks for reply. Your understand is correct.

I would like to test lighttpd. Is there any document which explain how to install it in QuecOpen? This question is valid in general for any service which one person would install into QuecOpen linux.

In practice, what is the command to install a package? apt-get, pacman, yum, etc… seem not available on busybox.

Regards

just compile & install lighttpd as QuecOpen application and put to startup config

Hello @WizIO,

This is what I tried to do.

  1. I downloaded “lighttpd” source code
  2. I extracted into folder “example” of QuecOpen SDK (EC21EFAR06A05M4G_OCPU_20.001.20.001_SDK)
    3.I init “source ql-ol-crosstool/ql-ol-crosstool-env-init”
  3. I followed build instructions https://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource but it fails.
    In particular it seems complain about cross-compilation
quectel@PC02V:~/workspace/EC21EFAR06A05M4G_OCPU_20.001.20.001_SDK/ql-ol-extsdk/example/lighttpd/lighttpd-1.4.64$ ./configure -C --prefix=/usr/local
configure: creating cache config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking for gcc... arm-oe-linux-gnueabi-gcc  -march=armv7-a -mfloat-abi=softfp -mfpu=neon
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/home/quectel/workspace/EC21EFAR06A05M4G_OCPU_20.001.20.001_SDK/ql-ol-extsdk/example/lighttpd/lighttpd-1.4.64':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

I wonder if @Puck-Q could provide a “pre-compiled” version of lighttpd ready to be copied into module and luanched with customized lighttpd.conf file.

Thanks!

Hi @davdav

I have successfully ported lighttpd for arm linux, and through configuration, I have done the following, but I have no experience in web development, the rest of the work should be your area of expertise.
image
In addition, I use arm-none-linux-gnueabi-gcc to compile, which is similar to arm-oe-linux-gnueabi-gcc in the SDK. you can get the tool and lighttpd compiled file at the following link .
arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 & lighttpd.tar

1 Like

BTW: the kernel has lighttpd lib in the sbin folder and lighttpd.conf in etc folder
Untitled-1

the default lib
lighttpd.zip (83.6 КБ)

Hello @WizIO,

You are rigth: lighttpd is already included into SDK and I found lighttpd is automatically started by “user” www-data

/ # ps |grep lighttpd
  902 www-data   0:00 /usr/sbin/lighttpd -f /etc/lighttpd.conf
 1658 root       0:00 grep lighttpd
/ # 

lighttpd.conf file point to directory /WEBSERVER/www

After various attempts and modification to lighttpd.conf file I was able to retrieve webpages contained in “/WEBSERVER/www” folder. So far so good!

Now it remains to undestand how to “exchange” data between lighttpd and QuecOpen application. I think it will be necessary to use files which are produced by QuecOpen and consumed by lighttpd when request by remote. If you have better idea they are welcome!

Thanks

as normal linux application and lighttpd - read documentation and ask Quectel if have more info
I personally have no experience with lighttpd