Home > Demonstration > Example Applications

Example Applications

These examples are provided with the NetBurner Network Development Kit. These documents provide a brief description of each example.


In the news...

  "I was impressed with the collection of nearly two-dozen example applications. They encompass everything from the simplest Hello World demo to e-mail, Telnet, PPP, UDP, FTP, and much more. There's just no better way to learn how to do something than to see how it's done, and the examples will prove to be a helpful starting point for your own application." - Tom Cantrell


Satellite Image over Embedded Ethernet

Weather Demo
The product demos and examples illustrate the ease at which you can develop applications with the NetBurner development platforms.

View Live Demo Webpage Running On Actual NetBurner Board



Satellite Image over Embedded Ethernet

Embedded SSL
This SSL (Secure Socket Layer) example program is designed to demonstrate how you can create a web site with protected content. A subdirectory called "httpsdir" contains all the files that require SSL encryption. When a user tries to access any of these files the application will check for a valid SSL connection. If the connection is valid the user will be able to access the web page.




Simple HTML on Embedded Ethernet

Simple HTML
A very simple application that implements the NetBurner Web Server and a single HTML page.

Hello World on an embedded ethernet core module

Sample Application

A very simple "Hello World" application intended to demonstrate the use of the NetBurner Make environment and download tools. The program will simply print "Hello World" out the debug serial port. This application does not support networking.


dynamically generated bar graph on embedded ethernet core module 

BarGraph Application
The BarGraph example demonstrates how to create dynamic GIF images and how to process HTML Forms. The user is presented with a HTML page and can dynamically change the GIF images displayed on the web page.

An HTML form which stores data in Flash memory

FlashForm
The FlashForm example demonstrates how to create dynamic HTML web pages, process HTML Forms, and store data in Flash memory. The user is presented with an HTML page that shows a stored message that is retrieved from Flash memory. The user can then submit new messages and store them in Flash.

email application using a webpage interface on an embedded ethernet core module

MailSample
This example illustrates how to send email using a webpage interface. In order for this example to function properly, use IPsetup to confirm the network mask and gateway are set correctly so a connection to your SMTP server can be established. Note: receiving email via POP3 is also supported by the email API.

 

Serial
This example shows how to open multiple serial ports and process data from multiple ports simultaneously. This specific example does not support networking.

ppp on an embedded ethernet core module

PPP

The PPP example shows how to setup and use a modem for a PPP connection. It supports both incoming and outgoing calls. The default modem AT command set if for a ZOOM 56k modem, but you may use any modem by modifying the AT initialization string in the code.

  • Dial into a NetBurner processor board using a PPP client (like Windows dial-up networking)
  • Dialing out to an ISP
  • Sending E-mail

Serial to Ethernet

Serial to Ethernet
Tcp2Serial and SerialBurner

Telnet into the NetBurner board and communicate with a device attached to a serial port. The difference between these two examples is that the SerialBurner example adds a web page to allow device configuration. To use this sample:

  1. Load it into the processor board.
  2. Connect a terminal program to the main serial port, such as the NetBurner MTTTY or Hyperterminal. The baud rate should be set to 115,200.
  3. Open the windows Telnet program and connect to the board's IP address.

Tcp2Serial Application: Anything you type on the serial terminal appears in the Telnet window, and everything you type in the Telnet window appears on the serial terminal.

SerialBurner Application: You first need to configure the baudrate and TCP port via the configuration web page. To accomplish this, use your web browser and type in the board's IP address in the URL field. Once connected, follow the instructions on the web page to perform any necessary configuration.




DualTcp2Serial
This is an application that allows you to Telnet to a NetBurner board and communicate with a device attached to the serial port. Similar to the Tcp2Serial application, this example allows two simultaneous connections. Each Telnet sessions talks to one serial port.

Telnet From Command Prompt
Telnetcmd

The telnetcmd example shows how to setup and use a command parser that authenticates users and responds to commands from the serial ports and Telnet connections.
It demonstrates:

  • Connecting to the NetBurner using Telnet.
  • Setting up a versatile command processor.

Tic Tac Toe 

TicTacToe

The TicTacToe example is a multipurpose application.
It demonstrates:

  • Multiple Page Dynamic HTML.
  • HTML generation beyond simple fill-in's.
  • Keeping state from page to page in the URL.
  • A Command dispatcher using both the serial and Telnet ports.
  • The NetBurner Diagnostic functions.
  • ICMP Ping under program control.

Keeping state from page to page and communicating via java

NewDemo

Will not run on an SB72
The NewDemo example is a version of TicTacToe with more graphics and a Java Applet.

It demonstrates:

  • Multiple Page Dynamic Frames based HTML.
  • HTML generation beyond simple fill-in's.
  • Keeping state from page to page in the URL.
  • Display a dynamic JAVA plane showing real time data.
  • A Command dispatcher using both the serial and Telnet ports.
  • The NetBurner Diagnostic functions.
  • ICMP Ping under program control.

 

UDP

This sample application consists of two parts: the code to run on the NetBurner board, and a sample Java application that runs on a host computer (e.g. PC). Before you run this application, you need to have installed Java 1.2 or higher. The NetBurner board code is located in the nburn\examples\udp\nndk_code directory, and the host computer code is located in the nburn\examples\udp\pcjava directory.

Steps:

  1. Load the UDP application into the NetBurner board.
  2. Connect a serial terminal such as MTTTY.
  3. Run the Java application on the PC.
  4. Follow the instructions displayed on the serial terminal (MTTTY)

 

Multicast
The Multicast example shows how to send and receive on a multicast connection. It is very similar to the UDP sample application.

Password

PassWord

The Password example shows how to create password protected HTML pages.




FTPClient
This example enables the NetBurner board to function as a FTP client and get files from an FTP server. This can be used as a basis for NetBurner devices to automatically download their operating parameters and instructions.

 

FTPD_Trivial

This example will create an FTP Server running on the NetBurner board. The FTP Server will start up and wait for a FTP client connection. The FTP Server provides two
functions:

  • Allows the FTP Client to download a single file, which has fixed content. After downloading, you can view this file on your host computer.
  • Allows the FTP Client to upload an ASCII text file. The file is not stored in memory, but is sent out the console serial port so you can see it with a serial terminal program like MTTTY.

 

ftpd_expose_html

When you create a project with web services, the HTML files and images are stored in a subdirectory named "html". This example shows how to expose the files that were in the project's html subdirectory as a read-only file system for access via FTP.

This is an advanced application and requires in-depth knowledge of FTP and FTP applications. A significant part of the complexity involved concerns navigating and displaying file names and directories.


 

ftpd_update

The "FTPD code update" example program is an example of how to use a FTP server to allow application firmware updates via FTP.

To run the example:

  1. Compile this example program (\nburn\examples\ftpd_code_update)
  2. Download the image file to the NetBurner board.
  3. Run a FTP client program from a host computer on the network. In this
    example, we use the Windows FTP program called "ftp.exe" which is run
    from a DOS box on the command line:
    • Open a DOS box
    • Type "ftp , where = the IP address of the NetBurner board.
      For example, "ftp 10.1.1.21"
  4. You will be prompted for a user name and password. You can enter anything here.
  5. In the FTP client program, type "ls" and hit the return key to see a list of files. Below is an example of a FTP session showing commands and responses so far:

    >ftp 10.1.1.21
    Connected to 10.1.1.21.
    220 Welcome to the NetBurner FTP server.
    User (10.1.1.21:(none)): asdf
    331 User name okay, need password.
    Password:
    230 User logged in, proceed.
    ftp> ls
    200 Port Command okay.
    125 Data connection already open; transfer starting.
    UserFlash.s19
    UserFlash.bin
    Application_APP.s19
    226 Closing data connection. Listing complete.
    ftp: 51 bytes received in 0.00Seconds 51000.00Kbytes/sec.

  6. The file name we are interested in is "Application_APP.s19". Uploading an image file with this file name will program that application into flash memory.

  7. Choose any valid image file to upload. In this example we will use tictactoe_APP.s19.
    The full path of the image file should be \nburn\bin\tictactoe_APP.s19. Copy tictactoe_APP.s19
    to the directory you started ftp.exe, and change the name to Application_APP.s19.
    For example, if I am in a directory called \myproject, I could use the command "copy \nburn\tictactoe_APP.s19 Application_APP.s19".
    If tictactoe_APP.s19 is not in \nburn\bin, you will need to build it by going to the \nburn\examples\tictactoe directory and running "make".

  8. Now that you have the file Application_APP.s19 in the same directory you are running
    ftp.exe from, at the ftp> prompt type "put Application_APP.s19". After this command
    executes the tictactoe application will be programmed in flash. However, the
    board is still running the ftp application in SDRAM, so you won't see a change
    until the board reboots.

  9. All that's left is to reboot the board so the tictactoe application starts up.
    The example is written so that closing the Windows client ftp session will
    reboot the board. At the Windows ftp> prompt, type "quit" and press the enter
    key. An example session is shown below:

    ftp> put Application_APP.s19
    200 Port Command okay.
    125 Data connection already open; transfer starting.
    226 Closing data connection. File transfer complete.
    ftp: 184620 bytes sent in 1.16Seconds 159.16Kbytes/sec.
    ftp> quit
    221 Service closing control connection.

  10. Use a web browser and go to the board's IP address. You should see the tictactoe application running.

 

NTPClient

The NTPClient example will connect to a NTP server to obtain time information.The following must be set up correctly for this example to function correctly:

  • The NetBurner must have network access to the NTP server for this to work.
  • Please use IPsetup to confirm the network mask and gateway are correct.
  • The default NTP server coded into the webpage is a public server, and should not be overused. Please read the warning about this issue in the code comments.

debugger

GDB Demo
This is a simple example that you can use to learn the GDB/Insight debugger. Please see using GDB for detailed instructions.

File load warning!

The fast network download capability of NetBurner devices is the quickest and easiest way to download applications into the NetBurner board. Some of the example programs were specifically designed to demonstrate applications that do not support network services. If you load one of these example programs into the NetBurner board, the next application will have to be downloaded using the serial monitor.


Home | Getting Started | Demos | Products | Support | Company | Store | Site Map
©2007 NetBurner, Inc. All Rights Reserved. Privacy Policy | Terms of Use