-
WebNet User’s Guide I/O Consulting A/S Preliminary Version 6 April 2001
-
WebNet User’s Guide
-
Contents 1 Introduction 7 1.1 What is the WebNet? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2 The WebNet Start kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2 Unpacking 9 2.1 Package Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 The WebNet DIMM Module . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.
-
5 Monitoring and Statistics 24 5.1 Console output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.2 File System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.3 Network Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.4 Socket Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.5 Test and Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.5.
-
B.2 Your ARP table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 B.3 AutoIP Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
List of Figures 6 1 The WebRJS module with the WebNet module inserted . . . . . . . . . . . 7 2 The WebNet DIMM module . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 The component side of the WebRJS-DCE board . . . . . . . . . . . . . . . 10 4 The WebNet module is being inserted into the WebRJS module . . . . . . . 11 5 The WebNet module inserted into the WebRJS module . . . . . . . . . . . 11 6 The WebNet home page . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
1 1.1 Introduction What is the WebNet? The WebNet is a small electronic device, capable of serving as a gateway between another electronic device and an ethernet network – for instance an intranet or the Internet. The WebNet can connect to other electronic devices via e.g. its RS-232 interface. The user interface of the WebNet consists of a number of web pages contained in the device and presented by its built-in web server. A standard web browser is used to view and browse these pages.
-
1.3 About this Manual The purpose of this manual is to make the new WebNet owner acquainted with the WebNet start kit and get started using it1 . First, in section 2 we unpack and identify the parts of the start kit. Then, in section 3 we install the unit and connect to it with a web browser. Sections 4, 5 and 6 are a tour round the various configuration and monitoring/statistics pages of the WebNet. In section 7 we look at the basics in writing and running scripts for making dynamic web pages.
-
2 Unpacking 2.1 Package Contents The WebNet Start kit consists of the following items: • How To Get Started sheet (See also apendix A). • The WebNet DIMM module. • The WebRJS adapter board. • An AC adapter (240V/50Hz). • An ethernet UTP Cat. 5 interface cable (2 m). • An RS-232 DB9BU interface cable (1,8 m) • WebNet User’s Guide. 2.2 The WebNet DIMM Module The front side of the WebNet module is the one with the IC with the white label on it.
-
3. Label with ethernet MAC-address (hardware address) 4. Connector The status LED’s on the board indicate: Green Server activity level (“heartbeat”) Red Internet activity — input/output via the network. Yellow Network activity — general activity on the attached ethernet. 2.3 The WebRJS Adapter Board The WebRJS adapter board has a component side and a side with the connector for the WebNet DIMM module. The component side is shown on Figure 3, and the numbers indicate the following: 1.
-
2.4 Connecting the boards The WebNet DIMM module is inserted into the connector on the WebRJS board, at an angle of approx. 20 degrees. It is pushed gently into the socket, and when the connector on the WebNet module cannot be seen anymore, the module is pushed towards the WebRJS board until it “clicks”. The modules are now connected. Figure 4 show the connector side of the WebRJS board, with the WebNet module being inserted. Figure 5 show the WebRJS board with the WebNet module properly inserted.
-
3 Installation 3.1 Connecting to the Network Besides the WebNet Start Kit, you need a computer with TCP/IP and a web browser installed on it. The computer must be equipped with a network adapter. You can either connect the WebNet Start Kit directly to the network adapter on the computer, or you can connect it to a network hub or switch on the local area network. 3.1.
-
3.2 Applying power The AC adapter is connected to the power socket on the WebRJS board and power is switched on. The LED’s should start flashing after a few seconds, and after an additional few seconds the unit has finished booting. 3.3 Assigning an IP Address A WebNet module is, from the factory, configured to run in a so-called “Auto-IP mode”. The technical details of assigning an IP-address with Auto-IP mode are explained in section 3.3.
-
• Are the WebNet and the PC on the same network segment? • Is the connected hub/switch or network adapter capable of running 10Mbit? • Did you type the correct MAC/IP addresses in the arp-command? Check it with arp -a (lists all arp entries) • Is the unit properly connected (check the link indicator LED on the hub/switch or network adapter that the board is connected to)? • Did you wait approx 10 seconds after power-on before issuing the ping? The auto-IP is typically the way to assign an IP address the fir
-
Figure 6: The WebNet home page WebNet User’s Guide 15
-
4 Configuration Configuration of the WebNet module is done via the configuration pages accessible from the WebNet home page described above, under the headline “System Configuration”. The sections below each describe one such configuration page. To access these pages, a username and password should be entered. By default, these are “admin” and “admin”, but they should be changed – see how in section 4.1 below. 4.1 Access Control Access control can be implemented at a more or less fine-grained level.
-
Figure 7: Setup of access rights for web users dir or ls !dir cd dirname lcd dirname put name get name bin ascii exit list files in current working directory on the server list files in current working directory locally (on the client) change directory ( cd .. to go backwards) on the server change directory ( lcd ..
-
A list of the most useful ftp commands is provided in Figure 8. Doing an “ls” after connecting with FTP will show a number of files and directories. The most important are shown in Figure 9. WebNet autoexec cgi-bin etc webpages The “operating system” itself. Configuration file describing which scripts to run at startup.
-
Each user is also assigned a number of privileges: “Get” is the ability to read files from the WebNet (download), “Put” is the ability to write files (upload), “Delete” is the ability to delete files from the WebNet, “Mkdir” is the ability to create new directories on the WebNet and “Rmdir” is the ability to remove directories on the WebNet. In Figure 10, the default settings are shown. 4.
-
Figure 11: The configuration page for network settings 20 WebNet User’s Guide
-
The Serial device is chosen from one of “none”, “PIC”, “SP0” or “SP1”. The “PIC” entry is only useful on WebRJS boards equipped with a PIC controller. The “SP0” and “SP1” entries are the two serial ports. On the WebNet Start Kit the accessible RS-232 port is SP0, so that is the only valid selection (besides “none”). Local IP address is the address of the WebNet module and Remote IP address is the address of the TCP/IP node in the other end of the serial connection.
-
http://webnet.iocon.dk Choose the “download” section, and then the “Firmware and standard applications” link. Here, a number of zip files exist, each containing a number of applications to try out. Unzip the files with e.g. WinZip and read any read.me or readme.txt files within the archives for installation instructions. WinZip can be obtained from http://www.winzip.com.
-
Figure 14: Configuration box for the serial lines of bits, the N is “no parity” (alternatively “O” for “Odd” or “E” for “Even” parity), and the 1 is the number of stop bits. The last box determines the type of flow control – none, hardware, RS-485 or Xon/Xoff.
-
5 Monitoring and Statistics The WebNet contains a number of useful monitoring and statistics tools. These are accessed from the WebNet home page, under the headline “Monitoring and Statistics”. The sections below each correspond to a link in that section of the home page. 5.1 Console output The console is where the WebNet outputs status and debugging information.
-
logging settings. Log files can grow fast if the system is busy. 5.3 Network Quality “Pinghost” is a simple way of indicating the quality of a network connection in terms of reliability and latency. It measures the success/failure rate, the maximum round-trip time and the average round-trip time of ping packets. The results of these measurements are plotted in a graph, which is updated every 2 min. When the graph is completed, it shows statistics for a 24 h. period.
-
(unnumbered) to the telnet server port 911 from a host with IP no. 192.168.2.58, and one (#4) to the web server from a host with IP no. 192.168.2.58. There are unfinished TCP connections (#8) web connection to a host with IP no. 192.168.2.52, (#5 and #6) web connections to a host with IP no. 192.168.2.58. Finally, there is an unnumbered system connection to the DHCP server at IP address 192.168.2.53. 5.
-
• Problems with files being corrupted, files disappearing and the like can be diagnosed with the “Flash test”. • Overall responsiveness of the system can be verified with the “LED’s test”. • Seemingly inexplicable behavior can be caused by defective RAM. The two RAM tests “RAM test 1” and “RAM test 2” cover different aspects of RAM test. 5.5.2 Firmware Upload A complete firmware replacement can be done by uploading a flash disk image file to the WebNet.
-
6 Tools The “Tools” section contains a number of useful tools and utilities for making more advanced configuration changes to the WebNet. 6.1 Adjust Real Time Clock The real time clock can be adjusted to be in synch with the PC connecting to it, or to a manually entered time/date – see Figure 18. Notice that only WebNet boards with a battery inserted in the battery clip can keep the correct time/date settings between reboots (from WebNet rev. 4).
-
of the resize key and the X and Y fields, and the original contents of the file can be restored by means of the “Revert” key. NOTE: Be carefull when updating critical files on the WebNet. Access to the editor is password protected setup by the page that is described in section 4.1. 6.3 Interface Controller Update This function only applies to WebNet on PIC enabled boards. The software for the PIC processor can be transferred to the PIC by means of the form shown in Figure 19.
-
Figure 20: The WebScript Debugger Tool Page put” window now contains the output from the script, and the “stack” window contains what may be left on the stack. The “verbose” switch enables listing of the CGI parameters and details about the CGI query. The procedure for uploading and running scripts is described in section 7, and the WebScript scripting language is described in [5].
-
7 Uploading and Running Scripts This section deals with WebScript scripts, the built-in scripting language in the WebNet. More details, both on CGI scripts in general and WebScript in particular, can be found in [5]. 7.1 What are Scripts For? Scripts are used in the WebNet to create dynamic web pages. Static web pages are written purely in HTML [8], and their contents are thus constant between accesses.
-
1: 2: 3: 4: 5: 6: 7: 8: (
WebScript test) print (Current TCP configuration) print () print etc /tcp get { exch () print xprint ( | : | ) print print (\n) print } forall ( |