How To Set Ip Addresses In The Sample Programs - Rabbit RabbitCore RCM2200 User Manual

C-programmable module with ethernet
Hide thumbs Also See for RabbitCore RCM2200:
Table of Contents

Advertisement

6.7 How to Set IP Addresses in the Sample Programs

We have provided a number of sample programs demonstrating various uses of TCP/IP for
networking embedded systems. These programs require that you connect your PC and the
Coyote together on the same network. This network can be a local private network (pre-
ferred for initial experimentation and debugging), or a connection via the Internet.
With the introduction of Dynamic C 7.30 we have taken steps to make it easier to run
many of our sample programs. You will see a
Dynamic C to select your configuration from a list of default configurations. You will
have three choices when you encounter a sample program with the
1. You can replace the
,
MY_NETMASK
MY_GATEWAY
2. You can leave
TCPCONFIG
to
, the netmask to
10.10.6.100
to
. If you would like to change the default values, for example, to use an IP
10.10.6.1
address of
10.1.1.2
the values in the section that directly follows the "General Configuration" comment in
the
TCP_CONFIG.LIB
3. You can create a
CUSTOM_CONFIG.LIB
than 100. Instructions for doing this are at the beginning of the
library in the
LIB\TCPIP
There are some other "standard" configurations for
ent features such as DHCP. Their values are documented at the top of the
library in the
TCP_CONFIG.LIB
the Dynamic C TCP/IP User's Manual.
IP Addresses Before Dynamic C 7.30
Most of the sample programs use macros to define the IP address assigned to the board and
the IP address of the gateway, if there is a gateway. Instead of the
will see a
MY_IP_ADDRESS
#define MY_IP_ADDRESS "10.10.6.170"
#define MY_NETMASK "255.255.255.0"
#define MY_GATEWAY "10.10.6.1"
#define MY_NAMESERVER "10.10.6.1"
In order to do a direct connection, the following IP addresses can be used for the Coyote:
#define MY_IP_ADDRESS "10.1.1.2"
#define MY_NETMASK "255.255.255.0"
// #define MY_GATEWAY "10.10.6.1"
// #define MY_NAMESERVER "10.10.6.1"
In this case, the gateway and nameserver are not used, and are commented out. The IP
address of the board is defined to be
as
.
10.1.1.1
User's Manual
macro with individual
TCPCONFIG
, and
MY_NAMESERVER
at the usual default of 1, which will set the IP configurations
255.255.255.0
for the Coyote board, and
library. You will find this library in the
directory.
LIB\TCPIP
macro and other macros.
10.1.1.2
macro. This macro tells
TCPCONFIG
MY_IP_ADDRESS
macros in each program.
, and the nameserver and gateway
for your PC, you can edit
10.1.1.1
library and use a
TCPCONFIG
TCPCONFIG
directory. More information is available in
TCPCONFIG
. The IP address of your PC can be defined
macro.
TCPCONFIG
,
directory.
LIB\TCPIP
value greater
TCP_CONFIG.LIB
that let you select differ-
macro, you
45

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RabbitCore RCM2200 and is the answer not in the manual?

Questions and answers

Table of Contents