About Remote Calculator Demo
This demo shows how to use a bidirectional communication channel between
STR91x MCU and a PC over a TCP/IP connection.
Figure 1 - Block diagram
Figure 1 shows the involved tasks running in the STR910-EVAL board
and the relation with the PC key components.
- tcp/ip task: lwIP stack runs as an independent task. It provides a
system service. A network application could communicate with the stack
through a message exchange paradigm, implemented by the lwIP serial API.
- httpd task: it implements a simple web server. It uses the lwIP
serial API in order to interface with the stack.
- calc task: this task waits for an incoming TCP connection over the
application defined port. When the connection is up, it starts to receive and
execute commands, and then it sends back the result. The remote client could
close the connection by sending the application defined command.
The demo uses the web server to provide to the browser, running on the PC,
an html page containing a java applet. Once the applet is loaded, it opens a
TCP connection with the calc task.
For more information look at the demo source files, especially the following files:
- launch_srv.c
- httpd.c
- NetCalcApp.c
back to home