Our Ethernet products (units) can be controlled by a PC using the TCP-IP protocol. The PC and the units can be setup using one of three topologies:

Our Ethernet products (units) can be controlled by a PC using the TCP-IP protocol. The PC and the units can be setup using one of three topologies:

#Direct Connection;

#Direct Connection;

Line 83:

Line 84:

:[[Image:Nict_networksetting_internet.png]]

:[[Image:Nict_networksetting_internet.png]]

Network configuration on the unit is identical to that described in intranet connection (section 1.2). Note that the IP address displayed on the unit is the local IP address. To remote access a unit under Internet connection, the PC needs to know the global IP address of the unit. Please consult your network administrator of the corresponding gl

Network configuration on the unit is identical to that described in intranet connection (section 1.2). Note that the IP address displayed on the unit is the local IP address. To remote access a unit under Internet connection, the PC needs to know the global IP address of the unit. Please consult your network administrator of the corresponding gl

+

+

==Software TCP/IP Stack Solution==

==Software TCP/IP Stack Solution==

===Circuit and PCB===

===Circuit and PCB===

Revision as of 23:41, 24 February 2009

This project aims to develop an Ethernet Module, to be used in conjunction with a 8/16 bits embedded system such as the dsPic33F development board.

Objectives

The Internet provides an indispensable means to exchange information over long distances. Connection to the Internet is enabled by following the implementation of the Open Systems Interconnection Reference Model (OSI model). In simple words, internet applications require a TCP/IP stack to pack and unpack information into data packets for proper transmission and reception over the Internet. The TCP/IP stack is usually implemented by software and included in the Operating System. Applications can use the stack transparently through socket programming.

Since a full-scale TCP/IP stack consumes a large amount of memory and processing power, a number of small footprint TCP/IP stacks have been devised for embedded systems, such as uIP and lwIP. Nevertheless, these TCP/IP stacks are usually not compatible to socket programming, and being implemented by software, still consumes a considerable amount of system resources. Therefore, hardware chips that implemented the TCP/IP stack (e.g. WIZNET W5300) emerged in recent years so as to offload the computation power from the host microcontroller unit (MCU).

This project aims to devise a driver and Linux socket wrapper inside freertos_posix for a hardware implemented TCP/IP stack. It is to be used in conjunction with a 8/16 bits embedded system such as (but not restricted to) the dsPic33F development board. Based on the Linux socket API, common application protocols (DHCP/HTTP/DNS/SMTP/SNMP/TELNET) are devised to enable remote control and monitoring.

Benefits

Provide a means to perform remote control and monitoring via Internet

Offload TCP/IP stack to chip, freeing memory and processing power of MCU to perform other tasks (e.g. HTTPS)

Socket API implementation allows more extensible framework for future development and upgrades

Phase 4

Network Configuration

Our Ethernet products (units) can be controlled by a PC using the TCP-IP protocol. The PC and the units can be setup using one of three topologies:

Direct Connection;

Intranet Connection;

Internet Connection.

Direct Connection

An example showing how to connect a PC and a unit directly is shown in Fig. 1. In this topology, the unit can be connected with the PC simply using a direct Ethernet cable. Please ensure that the PC and the unit share the same subnet mask and gateway, but different IP addresses. An incorrect example is shown in Fig. 2. Under direct connection, the user has to set these network configurations manually.

To set the network configuration on the unit, the user has to select the Static mode. The default IP addresses, subnet mask, and gateway are 192.168.1.128, 255.255.255.0 and 192.168.1.1 respectively. These settings can only be changed when the Ethernet status is Down. Once they have been changed, the values will be automatically saved.

To configure the network settings on the PC,

Goto <Start> and <Control Panel>, open <Network Connections>

Select the Local Area Connection corresponding to the network card on your PC. Right click and select <Properties>

Select <Use the following IP address:> and enter the appropriate network settings. Please ensure that the IP address is different from the one used by the unit.

Intranet Connection

An example showing how to connect a PC and 3 units in an intranet is shown in Fig. 3. In this topology, the PC and the units can be plugged into the network sockets directly or through a hub. The units can obtain IP addresses either dynamically by DHCP or statically by assignment.

In a network supporting DHCP, the IP address, subnet mask and gateway can be configured automatically if DHCP mode is selected. If the unit cannot acquired a valid connection via DHCP, the IP address, subnet mask and gateway will be displayed as 0.0.0.0. Please consult your network administrator whether your network supports DHCP.

In Static mode, the user has to configure the IP address, subnet mask and gateway manually. These settings can only be changed when the Ethernet status is Down. The default settings are 192.168.1.128, 255.255.255.0 and 192.168.1.1 respectively. Please note that a logical network cannot accommodate two units with the same IP address, so you should consult your network administrator before using the Static mode. The network administrator will give you the appropriate settings.

Internet Connection

An example showing how to connect a PC and a unit (Unit 4) in the Internet is shown in Fig. 4. Similar to the intranet topology, the PC and the units can also be plugged into the network sockets directly or through a hub. The units can also obtain IP addresses either dynamically by DHCP or statically by assignment.

Network configuration on the unit is identical to that described in intranet connection (section 1.2). Note that the IP address displayed on the unit is the local IP address. To remote access a unit under Internet connection, the PC needs to know the global IP address of the unit. Please consult your network administrator of the corresponding gl