That doesn’t seem
like much, but using
DHCP eliminates us
from having to know
the IP address
particulars. The DHCP
process will supply the
i WEM-1001 with its IP
address, the gateway IP
address, and the
netmask. The default
TCP server local port is
1000. Since we aren’t
depending on another
application to call the
port numbers for us,
the defaults for local
and remote ports will
work just fine here.
So, we have a pair of
network commands to enter:
SCREENSHOT 2. We’re going to configure
Hyper Terminal to use an Ethernet interface instead
of a serial interface.
SCREENSHOT 3. The combination of an IP
address and port number results in a TCP socket.
Our i WEM-1001 TCP socket happens to be a
server socket that listens for incoming requests
from clients.
set_dhcp 1
set_protocol 2
It would be nice if we initially configure the i WEM-1001
UART’s baud rate to match the console speed of the
SPECTRUM ACE 2a:
set_baud_rate 19200
That’s all we need to do. There are a total of three
UART configuration commands. We’ll take the defaults on
the packet size and flush timeout values as the default
packet size is the maximum value of 1400, and the flush
timeout value of 10 mS is plenty of cushion at 19200 bps.
Save is an action command and if we want to keep our
configuration entries, we had better issue it.
In that I was able to snap Screenshot 1, we definitely
nailed the UART configuration. Let’s peruse Screenshot 1
and see how we did everywhere else. I tapped in “+++”
into a 19200 bps Tera Term Pro session and as you can
see, CMD and a command prompt were sent to the
terminal emulator by the i WEM-1001 indicating that it has
entered command mode. I issued the status command
get_state to display the current thoughts of the i WEM-
1001.
Recall that we configured the 19200 bps baud rate
and left the MTU and flush timeout values to the
discretion of the i WEM-1001 hardware. If you’ve read any
of my Ethernet discussions or attended any of my
Microchip MASTERS classes, you know that every Ethernet
device that plans on participating in Internet activity must
have a unique MAC address. Note that we did not have a
configuration entry for a MAC address. That’s because the
MAC address was issued to Atech by the IEEE. We did
have a say concerning the WLAN mode, as we chose to be
safe rather than sitting on our donkey feeling sorry.
The SSID and channel were configured to make sure
that the i WEM-1001 associated with the router in the lab
and one in a neighboring building. Everything went as
planned as the i WEM-1001 was authenticated by our router
and permitted to associate with the EDTP network. The TX
PHOTO 4. The Li-Ion battery pack I’ve chosen to use is powerful
enough to support the i WEM-1001 for a long time at full power.
However, the i WEM-1001 is designed to sleep and conserve battery
life. So, a less juicy battery configuration can be substituted.
SERVO 06.2011 57