hi
I 'm a student of University of Pisa and I'm working with TinyOs 2.x (
Cygwin-windows Xp)

My application is based on 2 motes ( mote A and mote B ) that communicates
each other to exchange messages....
mote A send message to mote B and mote B send messages ( acknowledgment) to
mote A...

the simulation on Tossim works fine but there is a problem when I try to
visualize messages exchanged between 2 motes on Cygwin shell...

I connect this 2 motes on COM 4(mote A ) and COM5(motte B ) and I  use
component SerialActiveMessageC- SerialAMSenderC- SerialAMReceiverC  to send
messages
to my COM ports and I visualize messages exchanded between 2 motes on my
cygwin shells with:

 java net.tinyos.tools.MsgReader

or

java net.tinyos.tools.Listen

I open 2 cygwin shell  and set export [EMAIL PROTECTED]:telosb (on the
first shell)  to visualize messages sent by mote B
and  export [EMAIL PROTECTED]:telosb ( on the second shell) to visualize
messages sent by mote A

in each application running in each motes i insert the commands:

interface AMSend as SerialSend;
StaticM.Receive -> AMReceiverC;
  StaticM.AMSend -> AMSenderC;
  StaticM.AMControl -> ActiveMessageC;
  StaticM.Packet -> AMSenderC;

  StaticM.SerialSend -> SerialAMSenderC;
  StaticM.SerialReceive -> SerialAMReceiverC;
  StaticM.SerialPacket -> SerialAMSenderC;
  StaticM.SerialControl -> Serial;
interface Receive as SerialReceive;
interface Packet as SerialPacket;

interface Receive;
interface AMSend;
interface SplitControl as AMControl;
interface Packet;
......
.....
......

LINE 100: success = call AMSend.send(AM_BROADCAST_ADDR, &message,
sizeof(message_mote)); ------> to send message over radio to mote A / B
LINE 101: success = call SerialSend.send(AM_BROADCAST_ADDR,
&message,sizeof(message_mote));------> to send the same message to serial
port COM 4 / 5

MoteA send a static window of 12 messages and wait for acknowledgment sent
by mote B


when i run  java net.tinyos.tools.MsgReader or java net.tinyos.tools.Listen
in each cygwin shell i visualize the messages exchanged , but sometimes
 mote A (or Mote B ) stop to send message over serial port ( i don't see new
messages or i see [EMAIL PROTECTED]:115200 : bad packed )  WHILE other mote (
mote B) is receiving and sending messages over radio and i can see the
messages sent by this mote ....
mote B is receiving messages from mote A ( if i remove the mote A from
serial port and remove battery ---> mote B stop to send message over radio
and over serial port, while if i remove mote A from serial port but i don't
remove battery---> mote B continue to receive messages from mote A and send
ack to mote A  and i can see new messages visualized on my cygwin shell).


It can be possible that the problem is connected to a  trasmission/receiving
Buffer overflow? it seems that sometimes SerialSend.send(...) block itself
and stop to send messages to serial port while AMSend.send(....) work fine
and continue to send the same messages over radio
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to