Ethernet products resources

This area of the Mirrorbow website provides applications information and resources specific to the Mirrorbow Ethernet product range

Main Index - USB products resources - Ethernet products resources - Converting between 5V & 3V logic - Driving LEDs - Driving relays - Wireless Mains Control

Application Examples

The Ethernet IO products are designed to provide TCP/IP networked interface and display functionality controlled via web page protocols. There are on board web pages for manual configuration, however the real flexibility comes in the ability to write web page applications of your own that reside on a local PC or webserver.

External web page control is achieved by a combination of GET, POST commands and reading a ports.xml file that contains the status of ports, analogue to digital inputs etc. There is a summary below, however for more detailed information please refer to the user guides at the end of this section.

There are three basic ways of using the board

1) Using the on-board web pages on the card: These web pages allow you to change the state of ports and manually read them. However, in addition these pages allow alarms, smtp servers (for sending alarm emails to your nominated address), and setting up the pop3 monitor (LCD version only).

2) Using an external web page using html/javascipt: This is where the real flexibility of the card shines. You can write your own web page and control the card by performing background GET, POST commands (by AJAX type web methods), and using javascript to read the ports.xml file on the card. This allows you to make a completely custom user front end for your application, controlling the card invisibly in the back ground. A simple remote web page is provided here, demonstrating javascript and AJAX techniques.

NOTE:
If you are using the latest version of Microsoft Internet Explorer you may have to enable "Access data sources accross domains".
Pull up the page in IE. Go to Tools menu, then select internet options.  From here select the security tab. Select the custom level button below and scroll down the options till you see under Miscellaneous "Access data sources accross domains" this is by default disabled, select enable, hit ok at the bottom and refresh the page, it should all spring to life!

3) Using PHP on a web server: Running a local html page as described in 2 above has a couple of limitations.

Firstly, for your local html web page to work it needs to be able to access the board across the network which means that the same computer could read the webpages on the card directly, which could be a security issue. Using PHP on a web server avoids this, as you can set up your web server to have access to the board, while other users only have access to the web server.

Secondly, web browsers do not like web pages getting information from another domain, they see this as a security risk. This means that the example page in 2 runs on Microsoft internet Explorer only after it asked the user if it want to run Active X (and some people turn this off anyway on their browser). The local html example does not work on Firefox, as Firefox blocks information read from other domains...so you cant see the state of the ports!

So PHP on a webserver not only allows you to secure the direct connection to the card, but also provides a route to multibrowser compatibility.

Heres is a PHP example that shows how to read humidity and temperature (requires an environment model), send text to the LCD display, and read ports. All by specifying the IP address of the Mirrorbow Ethernet IO card within the PHP.
The example can be downloaded here. A big thanks to web guru Marek Kaszewski for this example!

 

Product Manuals

Manual for Ethernet IO (including environment model)

Manual for Ethernet 20 x 4 Display and IO model (including environment model)