To use MIB 510 board with serial interface provided by Belkin High Speed USB 2.0 dockstation

Just connect the USB connector of Belkin USB docstation to the Laptop. Connect the serial cable between MIB510 and docstation. You are ready to program the mote.

Since you are using the MIB510 instead of MIB500 (with parallel port), we need to add MIB510=/dev/ttyS4 in front of the make mica2|mica2dot reinstall command.

MIB510=/dev/ttyS4 make mica2 reinstall

The Cygwin shell will set the envrionment variable and modify the make command accordingly.

Related information on find the proper serial port to use.

First I found the cygwin we installed using Tinyos1.1.0 package does not have /dev file! Big puzzle.

Should I tried to create the devicefile using "mknod -m 666 /dev/ttyS4 c 4 64"? I tried it and it complained that funciton not implemented. It turned out that we do not have create them.

The related info is found on Cygwin User Guide on Specail Filenames. in http://cygwin.com/cygwin-ug-net/using-specialnames.html

The /dev/ttySx is simulated and there is not need to create the file!

POSIX devices
There is no need to create a POSIX /dev directory as it is simulated within Cygwin automatically. It supports the following devices: /dev/null, /dev/zero, /dev/tty, /dev/ttyX, /dev/ptmx, /dev/comX (the serial ports), /dev/windows (the windows message queue), /dev/random and /dev/urandom. These devices cannot be seen with the command ls /dev although commands such as ls /dev/tty work fine

 

How do we find that it is ttyS4?

In Serial-HOWTO, Section 10.2 It has detailed discussion. COM5 will be name as /dev/ttyS4.

http://tldp.org/HOWTO/Serial-HOWTO-10.html#ss10.6

Dos/Windows use the COM name while the setserial program uses tty00, tty01, etc. Don't confuse these with dev/tty0, dev/tty1, etc. which are used for the console (your PC monitor) but are not serial ports. The table below is for the "standard" case (but yours could be different). The major/minor numbers don't exist with the devfs. For the PCI bus the IO addresses are different.

                              ISA IO                              devfs usb
 dos            major minor address  devfs       devfs usb      acm modem
COM1  /dev/ttyS0  4,  64;   3F8   /dev/tts/0  /dev/usb/tts/0 /dev/usb/acm/0
COM2  /dev/ttyS1  4,  65;   2F8   /dev/tts/1  /dev/usb/tts/1 /dev/usb/acm/1
COM3  /dev/ttyS2  4,  66;   3E8   /dev/tts/2  /dev/usb/tts/2 /dev/usb/acm/2
COM4  /dev/ttyS3  4,  67;   2E8   /dev/tts/3  /dev/usb/tts/3 /dev/usb/acm/3


 

To find out the USB Serial Port created by the Belkin High Speed USB2.0 Dockstation, we go to control panel | System

Select "Hardware" Tab, and "Device Manager" button. You will see a list of devices.

Select the Ports(COM&LPT) You will see USB Serial Port (COM5).

Since it is COM5 port on DOS, for tty program it is /dev/ttyS4. (one less than 5).

Related info.

In Serial-Howto, http://tldp.org/HOWTO/Serial-HOWTO-10.html#ss10.6

It shows how to create device in /dev directory.

If you don't have a device "file" that you need, you will have to create it with the mknod command or with the MAKEDEV shell script. Example, suppose you needed to create ttyS0:

linux# mknod -m 666 /dev/ttyS0 c 4 64

The MAKEDEV script is easier to use. See the man page for it. For example, if you needed to make the device for ttyS0 you would just type:

linux# MAKEDEV ttyS0

If the above command doesn't work (and your are the root user), look for the MAKEDEV script in the the /dev directory and run it.

This handles the devices creation and should set the correct permissions. For making multiport devices see Making multiport devices in the /dev directory