Dynamic content on web page

I am developing an application that gets the data from the serial device and displays the same on the web page.
I have a thread in my application that continuously reads data from the device (time information). This data should be updated on the web page (every sec the time information on web page should get updated). The entire page should not be refreshed. Only one data element has to be updated continuously. Is this possible to do this with the Advanced Web Server APIs/ RomPager tags ? If yes, How can it be done?

Have you succeed to display changes in your web page?
And how have you done ?

I would like to do the same but inverse:
I would like to create a web server with Connect ME (using .NET microframe work). I want that the leds (outputs of connect ME module) are controled by clicking on a button on a dynamic web page.
How to do. Do you have some example on Visuak Studio 2005.

I will appreciate your help. Thank you.

Did you ever get this working?

I’m trying a very similar application, but I’m unsure of what code to use so the Digi reads from the device. I’m not worried about having the web page constantly update, if the user wants to see new data read from a serial device, they have to refresh the page.


Did you manage to do it?

I am trying to develop a similar application as described by mgapi & MRWA, i.e. to make a dynamic webpage which can be accessed by an Internet Browser. On clicking on its various buttons, data will be sent & received from the serial port.

I have the Digi JumpStarter Kit for .NET Micro Framework.

I am trying to basically extend the code given by Digi & Microsoft, in their SocketServer example, where they call a static HTML page.

So, anyone found a solution??

Three ways.

  1. you can use java applet to establish connection with web server. Then show your data in applet.

  2. Embed a hidden iframe in your web page, the iframe refresh intervally to get or set data from web server, then iframe can pass data to the UI page. Thus, UI page will not be refreshed to show data.

  3. ajax

Digi has an example of a java applet that fields data from a device. It is entitled “Realtime device monitoring using AWS”. Have you looked at that white paper?

URL is http://ftp1.digi.com/support/documentation/realtime_mon_aws.pdf

It contains an explanation and a working example.

You’ll need to use Ajax technology - fairly simple to do.

I found this a good set of beginners articles: http://www-128.ibm.com/developerworks/web/library/wa-ajaxintro1.html - got a proof of concept working within a few hours with their help.

Where in the NetOS/your Application code did you “hook into” to catch/respond to the XMLHttpRequests? (cgi.c ?)

I have asked Digi if NetOS (or some other OS/platform) supports “web services” or Ajax - they say no (Nov 07)

Thank you

I just set up another ‘web page’ - the data format doesn’t really matter, since you’re decoding it in the JS running in the user’s browser.
Having said that, there are some standards evolving which you might want to look at - can’t remember what they are!

Unfortunately the Digi example is likely to be of limited use, since it proposes Java on the client - something that I believe many users disable. Obviously not a problem if you have control of the browser environment.

As I understand it, Ajax uses Javascript, which is not the same as Java - and there are statistics around which suggest 90-95% of users have Javascript enabled. The IBM articles I referenced in an earlier post give a good explanation; possibly two points to emphasise:

  1. You can define the format of the data returned on each ‘poll’, since you’ll be decoding it in your Javascript. (I’ve adopted a simple varname=value syntax, with one value per line - adequate if you’ve not got too much data).
  2. You need to bear in mind, especially if you’re using the Internet (as opposed to an intranet, although these aren’t always problem-free) that there can be quite long delays - so you generally shouldn’t poll too fast.

There may be a way how to use “AJAX” technologies. My friend just told me how it works:

  1. Create web page with simple jscript (java script, whatever) for example: example.com/mypage.html
  2. create small CGI script which will run on AWS. This script have tu return some value. for example: example.com/getvalue.cgi
  3. Load the web page to your browser. The jscript running in web browser have to periodicaly asks for the cgi script on AWS servr for new value. Afther this the jscript simply print the new vale to web page.

This is only simply description how it works, in real it is little bit more difficult.


After some time I can acknowledge that AJAX is working with Digi modules with no problems. I just have done parsing and updating data in webpage with AJAX and its woring well. Im using Basic web server, the AWS is not necessary.

Im not using CGI…