MOTE -PC COMMUNICATION in TinyOS


MOTE -PC COMMUNICATION in TinyOS


STEP1:Install the TestSerial Application on your mote. The application sends a packet over the serial interface for every second,and when it receives a packet it displays the binary equivalent over the LED's.

STEP2:Once you have installed application on the mote.we need to run the corresponding java application to communicate with the serial port. This is build when we install the application on the mote.
From the application directory type java TestSerial<-'

If you get an error like
sf@localhost:9002 died - exiting (java.net.ConnectException: Connection refused)

It means you have not specified the serial port as source you have to specify in the syntax


Type export MOTECOM=serial@/dev/ttyUSB0:telosb for telosb mote.

STEP3: Now when you type java TestSerial <-' , you will get output like

Received packet sequence number 317
Sending packet 1
Received packet sequence number 318
Sending packet 2
Received packet sequence number 319
Sending packet 3
Received packet sequence number 320
Sending packet 4

STEP4:There is a java tool called Listen which prints out the binary equivalent of each packet...

java net.tinyos.tools.Listen <-'

we get o/p as
00 FF FF 00 00 02 00 89 01 A7
00 FF FF 00 00 02 00 89 01 A8
00 FF FF 00 00 02 00 89 01 A9
00 FF FF 00 00 02 00 89 01 AA
00 FF FF 00 00 02 00 89 01 AB
00 FF FF 00 00 02 00 89 01 AC
00 FF FF 00 00 02 00 89 01 AD
00 FF FF 00 00 02 00 89 01 AE
00 FF FF 00 00 02 00 89 01 AF
00 FF FF 00 00 02 00 89 01 B0
00 FF FF 00 00 02 00 89 01 B1
00 FF FF 00 00 02 00 89 01 B2
00 FF FF 00 00 02 00 89 01 B3
00 FF FF 00 00 02 00 89 01 B4

Listen is simply printing the packets which are coming out of the mote.....

Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

PR, PN and PV Variable in Yocto