Connect 50

Digi Connect 50, Connect EM Integration Kit, Connect ME, Connect SP, Connect Wi-EM Integration Kit, Connect Wi-ME Integration Kit, NET 50 Microprocessor, NET+50 Microprocessor User guide

  • Hello! I am an AI chatbot trained to assist you with the Digi Connect 50 User guide. I’ve already reviewed the document and can help you find the information you need or explain it in simple terms. Just ask your questions, and providing more details will help me assist you more effectively!
   
  
90000538_C
Operating system/version: 6.0
Part number/version: 90000538_C
Release date: September 2003
www.netsilicon.com
NET+Works with GNU Tools
Programmer’s Guide
©2001-2003 NetSilicon, Inc.
Printed in the United States of America. All rights reserved.
NetSilicon, NET+Works, and NET+OS are trademarks of NetSilicon, Inc. ARM Is a registered trademark of
ARM Limited. NET+ARM is a registered trademark of ARM Limited and is exclusively sublicensed to
NetSilicon. Digi and Digi International are trademarks or registered trademarks of Digi International Inc. in
the United States and other countries. All other trademarks are the property of their respective owners.
NetSilicon makes no representations or warranties regarding the contents of this document. Information in
this document is subject to change without notice and does not represent a commitment on the part of
NetSilicon. This document is protected by United States copyright law, and may not be copied, reproduced,
transmitted, or distributed in whole or in part, without the express prior written permission of NetSilicon.
No title to or ownership of the products described in this document or any of its parts, including patents,
copyrights, and trade secrets, is transferred to customers. NetSilicon reserves the right to make changes to
products without notice, and advises its customers to obtain the latest version of relevant information to
verify, before placing orders, that the information being relied on is current.
NETSILICON PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED, OR WARRANTED TO BE
SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES, OR SYSTEMS, OR OTHER
CRITICAL APPLICATIONS.
NetSilicon assumes no liability for applications assistance, customer product design, software performance,
or infringement of patents or services described herein. Nor does NetSilicon warrant or represent that any
license, either express or implied, is granted under any patent right, copyright, mask work right, or other
intellectual property right of NetSilicon covering or relating to any combination, machine, or process in
which such semiconductor products or services might be or are used.
5
Contents
Using This Guide................................................................................................9
Chapter 1: NET+Works Introduction...........................................................13
Board support package..............................................................................14
HTML-to-C compiler................................................................................14
Security......................................................................................................15
Chapter 2: Building and Debugging a Sample Application........................17
About these instructions............................................................................18
Working with the sample application........................................................18
Configuring the development board..........................................................21
Tips............................................................................................................23
Running additional gdb sessions.....................................................23
printf support in gdb........................................................................23
Standard C library ...........................................................................23
Chapter 3: Using the HTML-to-C Compiler................................................25
What is the HTML-to-C compiler.............................................................26
Web content.....................................................................................26
Static and dynamic content and forms processing..........................27
Preparing to use the HTML-to-C compiler.....................................29
How the HTML-to-C compiler works ............................................30
Using the HTML-to-C compiler................................................................32
Creating a new project.....................................................................33
Removing obsolete data..................................................................34
Adding or removing source files.....................................................34
Specifying the location of files........................................................35
6
Generating C source files................................................................35
Setting or changing a project’s home page .....................................35
Editing URL files ......................................................................................37
Opening the url.c file.......................................................................37
Adding and deleting URLs..............................................................37
Editing a URL .................................................................................38
Setting the user and password of a URL.........................................38
Chapter 4: Using the MIBMAN Utility.........................................................41
Overview...................................................................................................42
SNMP..............................................................................................42
Scalar MIB objects..........................................................................43
MIB tables.......................................................................................43
Traps................................................................................................44
Action routines................................................................................44
Implementing a MIB: an example...................................................44
Converting an SNMP MIB into C code ....................................................46
Step 1: Using SMICng ....................................................................46
Step 2: Using MIBMAN.................................................................47
Step 3: Final integration..................................................................59
Writing action routines..............................................................................60
Action routines for scalar objects....................................................60
Action routines for tables................................................................64
SNMP OID and string index values................................................73
Chapter 5: Using the Advanced Web Server PBuilder Utility....................75
Overview...................................................................................................76
The PBuilder utility.........................................................................76
About the Advanced Web Server Toolkit documentation..............77
Running the PBuilder utility......................................................................78
Linking the application with the PBuilder output files .............................80
security.c file...................................................................................80
7
cgi.c and file.c files .........................................................................80
Comment tags............................................................................................81
Creating Web pages...................................................................................82
AWS custom variables....................................................................82
Data types........................................................................................83
Displaying variables........................................................................84
Changing variables..........................................................................84
Security............................................................................................87
Exceptional cases ............................................................................87
Controlling the MAW module ..................................................................89
Setting the semaphore timeout ........................................................89
Array subscripts...............................................................................90
Error handling .................................................................................91
Building the application..................................................................91
Phrase dictionaries and compression...............................................91
Maintaining and modifying Web content..................................................93
Sample applications...................................................................................94
Chapter 6: Troubleshooting...........................................................................95
Diagnosing errors......................................................................................95
Diagnosing a fatal error...................................................................96
Diagnosing an unexpected exception..............................................96
Reserializing a development board ...........................................................97
Development boards and serial numbers ........................................97
Observing the LEDs........................................................................98
Preparing to reserialize....................................................................98
Assigning a MAC address to the NET+Works board.....................98
Restoring the contents of flash ROM......................................................101
Step 1: Configure the development board and the ICE.................101
Step 2: Building the bootloader.....................................................102
Step 3: Building the application image and starting NAFTPAPP 102
Step 4: Sending rom.bin to the development board......................103
Step 5: Verifying the boot ROM image on the development board103
8
n n n n n n n 9
Review this section for basic information about this guide as well as for general support
contact information.
About this guide
This guide describes NET+OS and how to use it as part of your development cycle. Part of
the NET+Works integrated product family, NET+OS is a network software suite optimized
for the NET+ARM.
Software release
This guide supports NET+OS 6.0 By default, this software is installed in the
directory.
Who should read this guide
This guide is for software engineers and others who use NET+Works for NET+OS.
To complete the tasks described in this guide, you must:
Be familiar with installing and configuring software.
Have sufficient user privileges to do these tasks.
Be familiar with network software and development board systems.
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
••
Using This Guide
Conventions used in this guide
10
NET+Works with GNU Tools Programmer’s Guide
Conventions used in this guide
This table describes the typographic conventions used in this guide:
What’s in this guide
This table shows where you can find information this guide:
This convention Is used for
italic type Emphasis, new terms, variables, and document titles.
bold, sans serif type
Menu commands, dialog box components, and other items that
appear on-screen.
Select
menu option Menu commands. The first word is the menu name; the words that
follow are menu selections.
File names, pathnames, and code examples.
Table 1:
To read about See
The components of NET+Works Chapter 1,”NET+Works Introduction”
How to build and debug a sample
application
Chapter 2, “Building and Debugging a Sample
Application”
How to convert HTML and related Web
page files to C code
Chapter 3, “Using the HTML-to-C Compiler”
How to use the MIBMAN utility Chapter 4, “Using the MIBMAN Utility”
How to use the PBuilder utility Chapter 5, “Using the Advanced Web Server
PBuilder Utility”
Diagnosing problems and reserializing a
development board
Chapter 6, “Troubleshooting”
Table 2:
11
Using This Guide
Related documentation
NET+Works Quick Install Guide describes how to install the hardware.
NET+Works with GNU Tools BSP Porting Guide describes how to port
the board support package (BSP) to a new hardware application with
GNU tools.
The NET+Works online help describes the application programmer
interfaces (APIs) that are provided with NET+OS.
For information on third-party products and other components, review
the documentation CD-ROM that came with your development kit.
For information about the processor you are using, see your NET+Works
hardware documentation.
Customer support
To get help with a question or technical problem with this product, or to make
comments and recommendations about our products or documentation, use the
contact information listed in the tables that follow.
NetSilicon support
For Contact information
Technical support Telephone: 1 800 243-2333 / 1 781 647-1234
Fax: 1 781 893-1388
E-mail: tech_suppor[email protected]
Documentation [email protected]
NetSilicon home page www.netsilicon.com
Online problem reporting www.netsilicon.com/problemreporting.jsp
Table 3:
Digi support
For Contact information
Technical support Telephone: 1 877 912-3444 / 1 952 912-3456
Fax: 1 952 912-4960
Documentation techpubs@digi.com
Digi home page www.digi.com/support/eservice/eservicelogin.jsp
Online problem reporting www.digi.com/problemreporting.jsp
Table 4:
n n n n n n n 13
NET+Works Introduction
CHAPTER 1
This chapter provides an overview of NET+Works.
Board support package
14 n n n n n n n
NET+Works with GNU Tools Programmer’s Guide
Overview
The NET+Works products offer an embedded solution for hardware and networking
software that is being implemented into product designs.
NET+Works is designed as an alternative to a PC for products that must be connected to
Ethernet for TCP access and for Internet/Intranet access.
The NET+Works package includes:
Either the NS7520 or the NET+50
A development board and board support package
The networking firmware
The object code with application programming interfaces (APIs)
Development tools
Documentation
For information about the NET+ARM devices, see the hardware documentation for the
processor you are using.
Board support package
The board support package (BSP) is intended to work with the NET+OS real-time
operating system. Some NET+Works drivers provide the necessary APIs.
HTML-to-C compiler
The toolkit provides a compiler that translates your HTML code into C code. You can then
compile the C code as part of the project, which allows you to create the pages your menu
system needs to perform the tasks necessary for your device. Sample code also is provided.
www.netsilicon.com
n n n n n n n 15
NET+Works Introduction
Security
NET+OS 6.0 provides security based on:
Netscape Communications Secure Sockets Layer (SSL) version 3
RFC2246 Transport Layer Security (TLS) version 1, to provide secure
communications over unsecured networks
Basic X.509 certificate generation and server authentication
The services are supported:
HTTPS (HTTP over TLS v1), port 443, RFC 2818, SSLv3
Raw TCP/IP over SSL
Raw sockets over SSL (secure tunneling)
RSA key exchange/supported algorithm
Symmetric cipher algorithms
3DES-EBE-CDC
AES128-CBC
AES256-CBC
–DES
SSL is implemented through an API layer that enables existing sockets-based applications
to be modified to communicate transparently over links that are secured by the SSL/TLS
protocols.
An Advanced Encryption Standard RFC 3268-based cipher suite is available for use with
TSL. In addition, the API layer provides a mechanism by which users can invoke an SSL/
TSL-enabled HTTPS server.
n n n n n n n 17
Building and Debugging a
Sample Application
CHAPTER 2
This chapter provides a brief tutorial on the development environment.
About these instructions
18 n n n n n n n
NET+Works with GNU Tools Programmer’s Guide
About these instructions
This chapter provides a brief tutorial on the development environment using
the Raven.
These instructions assume that you installed NET+Works in
, the
default installation directory. If you installed software in a different directory,
specify the drive and directory information.
Before you begin the tutorial, see your network administrator for this information:
An IP address
A subnet mask
The default gateway
You will need this information when you configure the development board.
Working with the sample application
1 Open a terminal connection to the development board so you can monitor
development board status.
You can use HyperTerminal by selecting
Start Programs
NET+OS 6.0 GNU HyperTerminal Connection on Com1.
A terminal window opens.
2 Run — a utility that converts gdb commands to JTAG
signals — by selecting
Start Programs NET+OS 6.0 GNU 
OcdLibRemote.
A message similar to this appears:
.
3 Open a X-Tools window by selecting Start Programs
NET+OS 6.0 GNU X-Tools v3.0 Shell.
A window opens.
www.netsilicon.com
n n n n n n n 19
Building and Debugging a Sample Application
4 In the X-Tools window, start a Cygwin bash shell by running arm-elf
using this command:
This message appears:
5 Change to the board support package (BSP) directory:
6 Build the BSP by entering the set of commands for your development
board:
7 Change to the directory in which the application resides:
The directory becomes the working directory.
For this development board Use these commands
NS7520
NET+50 revision D boards
NET+50 BGA boards
Digi Connect EM
Digi Connect Wi-EM
Digi Connect ME
Digi Connect Wi-ME
Digi Connect SP
Working with the sample application
20 n n n n n n n
NET+Works with GNU Tools Programmer’s Guide
8 Build the application files by entering the set of commands for your
development board:
The application files are built.
9 Run by entering:
The prompt appears.
10 Copy the script for your development board from the
directory to the
directory, and then execute it:
For this development board Use these commands
NS7520
NET+50 revision D boards
NET+50 BGA boards
Digi Connect EM
Digi Connect Wi-EM
Digi Connect ME
Digi Connect Wi-ME
Digi Connect SP
For this development board Use this command
NS7520
NET+50
Digi Connect EM
Digi Connect Wi-EM
Digi Connect ME
Digi Connect Wi-ME
/