135u5 / tinyos-main

Automatically exported from code.google.com/p/tinyos-main
1 stars 0 forks source link

lpl setting using interface problems #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
A user reports that setting LPL parameters with Makefile works fine but setting 
those parameters (sleep interval) using the interface results in high link ETX. 
Possible bug in the LPL stack.

Original issue reported on code.google.com by gnaw...@gmail.com on 19 Nov 2010 at 4:56

GoogleCodeExporter commented 8 years ago

Original comment by philip.l...@gmail.com on 16 Dec 2010 at 11:55

GoogleCodeExporter commented 8 years ago
I believe this is not so much a bug, but the way LPL interface commands are 
called in the user app.

- Problem description -

The interface command in question is 
LowPowerListening.setRemoteWakeupInterval(...).

Before the user app passes a message to AMSenderC, it calls 
LowPowerListening.setRemoteWakeupInterval(...) on that outgoing message. 
However, after LplAMSenderP gets that message, it also calls 
LowPowerListening.setRemoteWakeupInterval(...) and "resets" the message's 
remote wakeup interval to a default value. Therefore, when the radio stack 
finally holds the message, the remote wakeup interval is always the default 
value (which is 0 as set by Lpl.h).

Defining LPL_DEF_REMOTE_WAKEUP in the Makefile hides the problem. This is 
because it basically changes the default remote wakeup interval value.

- Proposed solution -

The user application should use the SendNotifier interface. Then, when the 
SendNotifier.aboutToSend(...) event is signaled, the user app can then call 
LowPowerListening.setRemoteWakeupInterval(...).

- Status -

I contacted the user, and the proposed solution works for him.

Original comment by liang.m...@gmail.com on 29 Dec 2010 at 1:29