User manual
After the last chapter explained a bit about use of the module as a TCP client, the
module is now to act as a dedicated TCP server. Practically, there is a simple AT
command for this with which you can start this complex server application. The
module will then act as a TCP server from the internet, except that you need to
program sending of the website yourself.
4.1 | TCP web server
The first attempts at a TCP web server are made without any additional hardware
setup. First, simply try out the most important commands via the serial monitor.
The program
Enter the WLAN data as before and load the program onto your board. Then start
the monitor. It may take a few seconds before the message that the board is con-
nected appears. When the success message has appeared and the IP of the
module is displayed, you can start with the first command in the Serial Monitor:
AT+CIPMUX=1
This command permits multiple connections to the module. You can then access
the web server from several computers. Use the next command to start the web
server:
AT+CIPSERVER=1.80
The parameter 1 means that the server is being started. 0terminates a server
again. The number 80 represents the port under which the server can be reached.
HTTP requests sent by the browser are generally sent through port 80.
You can now open a browser of your choice and enter the IP of your module into
the address bar and confirm it with
[Enter]
. The browser initially shows a loading
message, but the Serial Monitor will show a change. You can see a request query
similar to the one you have sent out manually before.