Samraksh / eMote

eMote OS -- Multiple Ports (using .NET MF v4.3)
0 stars 0 forks source link

CSMA delay, duplication and stopping #226

Open WilliamAtSamraksh opened 9 years ago

WilliamAtSamraksh commented 9 years ago

This is wrt eMote .NOW v. 11.2. One program (call it Sender) periodically generates CSMA messages whose payload consists of an ascending counter value. The other (call it Receiver) is a radio signal meter that prints the payload of received packets.

When it is time to send, Sender turns the radio on and prints the counter value to the debug log. It leaves the radio on while it listens for an acknowledgement of receipt. In this case, Receiver does not send an acknowledgement, so after a short delay, Sender turns the radio off. The interval between sending messages is 5 seconds.

The programs are in the share at:

[Sender] Dev eMote\GitHub Issues Attachments\2015.01.16 LDC Battery Mote.zip [Receiver] Dev eMote\GitHub Issues Attachments\2015.01.16 Radio Signal Meter [N].zip

Here are the issues:

  1. There is a significant delay between the time the Sender issues the CSMA.Send and the time it is received by Receiver. I don't know whether the delay is in Sender or Receiver but I suspect Sender.
  2. The lag between sending and receiving increases over time. This can be seen by connecting MF Deploy instances to each mote and observing the log. In terms of the counter value in the payload, the Receiver becomes increasingly behind.
  3. After a while Sender stops sending. If I restart Receiver, nothing happens. If I restart Sender, messages start coming again.
  4. There is duplication in the messages received (or at least in the payload). As shown below, messages with counter value 146 are received twice, with intervening messages with 147 and 148.

Received Broadcast message from src: 28110, size: 7, rssi: 7, lqi: 101 76 68 67 146 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Received Broadcast message from src: 28110, size: 7, rssi: 7, lqi: 101 76 68 67 147 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Received Broadcast message from src: 28110, size: 7, rssi: 7, lqi: 101 76 68 67 148 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Received Broadcast message from src: 28110, size: 7, rssi: 7, lqi: 101 76 68 67 146 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Following is what's shown for Sender:

Send # 146 Turned ack timer off Send # 147 Turned ack timer off Send # 148 Turned ack timer off Send # 149 Turned ack timer off

WilliamAtSamraksh commented 9 years ago

Update. What I said in point 3 is not entirely correct.

WilliamAtSamraksh commented 9 years ago

The Radio Signal Meter, cited above, not only receives but also transmits periodically. I deployed it on to .NOWs running eMote v. 11.2. Whether sooner or later, both sending and receiving stop after a while.

Test:

Remark. Our automated tests won't catch this or the related #225 unless the test runs for an extended period. We probably need long-running tests as an option.

ChrisAtSamraksh commented 9 years ago

Please retest this to see if this is fixed now.

WilliamAtSamraksh commented 9 years ago

Things look good. Looks like the recent fixes to the radio driver have resolved this. Will close the issue.

WilliamAtSamraksh commented 9 years ago

There's still some issue. Out of about 1300 packets sent, the receiver got about 1200, so quite a few are being lost.

There could be some radio interference. I'm running two radio-related tests now: this one and the serial-wireless bridge, #243. They're using different channels: this one uses channel 11 and the bridge uses channel 26 (the default). I've posted both programs anew to the share since I made changes to the channel.

Dev eMote\GitHub Issues Attachments\2015.03.20 LDC Battery Mote.zip & 2015.03.20 Radio Signal Meter.zip