|
|
| |
Basic Programming with eMotes (the MIB600 ethernet programming
board)
Supplies
- eMote
- Mote (mica, mica2, mica2dot, etc.)
- Option I: A crossover ethernet programming cable
- Option II: 2 straight through ethernet cables, and a switch/hub
If you are programming a mica2dot, you will also need:
- 6-pin header cable
- a 6-pin pinOut board that fits the mica2dot
Hardware Usage Notes:
- You must have the battery board plugged in for the assembly to
work. All power sources go through the battery board to boost the
voltage to 3.3 and 5 Volts.
- If you are using the mica2dot, make sure you plug in the 6-pin
header
properly. Pin 1 on the circuit boards is the pin with a square
(not circular) pin hole. See
Figure 1 for how to connect the pinOut board to the eMote using the
6-pion header cable. Use the red stripe to help you match header
orientation.
Figure 1: Connecting eMote to the
pinOutBoard

Procedure
- The eMotes first need to be assigned an IP address. One
option is
to set up a router which can serve as a DHCP server, and connect it to
both your laptop and your eMote. The other option is to run a
DHCP server on your laptop.
- After the eMotes receive an IP address, you may need to log into
the eMote to change the baud rate of the UART Serial connection between
the eMote and the mote.
- You are now ready to program the eMote using Terence's RSC
scripts.
Changing the Serial Baud Rate between the eMote and mote
- To log into the eMote, type in the IP address into your java
enabled browser (ex. Internet Explorer).
- Click on the "Channel 2" button ("Channel 1" is for the uisp
programmer, and is running at 115200). Local port should be 10002
(as opposed to 10001 for channel 1).
- Set the Speed in the drop down menu appropriately: mica2dot is
19200, mica2 is 57600.
- Click on the "Update Settings" button and wait for the eMote to
reboot.
- The Settings for Channel 1 are:
- Serial Protocol: RS232
- Speed: 115200
- Character Size: 8
- Parity: None
- Stopbit: 1
- Flow Control: None
- The Settings for Channel 2 are:
- Serial Protocol: RS232
- Speed: 19200 for mica2dot (or 57600 for mica2)
- Character Size: 8
- Parity: None
- Stopbit: 1
- Flow Control: None

Setting up a DHCP server on your laptop in Windows
- Obtain the DHCP software from: http://ruttkamp.gmxhome.de/
and
follow the instructions.
- The main changes you need to make to the dhcpsrv.ini file are:
- Set IPBIND to the IP address of your laptop.
- Set IPPOOL_1 to the range of IP addresses for your clients
(your eMotes).
- A sample dhcpsrv.ini
file.
- After starting up the DHCP server program, power cycle the
plugged in eMote. The eMote will then request an IP address from
the DHCP server.
- To check if the program is working, Look at the log file
dhcptrc.txt. If you see the MAC address of the eMote and the
assigned IP address (and no error messages), it was successful.
You can also ping the device via it's assigned IP address.
- If you use IPPOOL, IP addresses are assigned in the order that
the requests arrive and stored in the dhcpsrv.ini file automatically by
the DHCP server. If you wish to save the association of ip
addresses to the MAC addresses, save the dhcpsrv.ini file.
Assigning a Static IP address to the eMote
- If you plan on using the eMote solely as a
programming board for your computer (and not part of a network of
eMotes for mass reprogramming/data collection), you might want to
assign the eMote a static IP address. This would save the hassle
of starting up a DHCP server on your computer every time you want to
program a mote.
- The eMotes are initially configured for DHCP.
You must first have access to a DHCP server to assign the eMote an IP
address so you can communicate with it.
- To log into the eMote, type in the IP address into your java
enabled browser (ex. Internet Explorer).
- Click on the "Server Properties" button in the left sidebar.
- On the "Server Properties" page, fill in the "IP Address" field
with the desired Static IP address.
- Click on the "Update Settings" button and wait for the eMote to
reboot.
- Label your eMote with its new static IP address (so you don't
forget).

Programming via the eMote
This is explained in Terence's RSC page
under
program.sh usage. Note the changes from his original set of
instructions:
- Instead of using the
mote DNS name, use the ip address for the --networkhost option to
program.sh and intel-program.sh.
- It is unnecessary to get the UISP specified in his
instructions. The UISP tools distributed with TinyOS are up to
date.
| |
|
|