Hello;

I feel so bad for not thinking about the chance they were debug messages, I
assumed they were only used for TOSSIM or something like that, not for the
real implementation. Anyway, it did the trick and I got out of the messages.

What intrigues me now is the content of the messages themselves. When I read
what comes through the serial port by using the Java Listen, I get a
sequence of 27 bytes, starting with 00 FF FF, and containing the bytes
defined in the TestNetwork app. However, when I read directly the bytes,
as in Windows, I get a sequence of 8 bytes, totally different,
starting with 47 FF, and not containing the bytes manually inserted
(namely the origin mote).

How this difference and how to fix this so I can read the bytes in the tos
message:
msg->source
msg->seqno
msg->data
etc

Thank you once more!

Pedro

On 5/24/07, Philip Levis <[EMAIL PROTECTED]> wrote:

On May 24, 2007, at 11:39 AM, Pedro Almeida wrote:

> Hello;
>
> I've been working over the TestNetwork demo application that comes
> with TinyOS 2 and it's been working well, despite some periodic
> messages that are being sent through the serial port, which I do
> not want them to.
> I've been looking around http://www.tinyos.net/tinyos-2.x/tos/lib/
> net/ctp/ (since I could not disable it from inside the application
> code, I assume it has something to do with the CTP itself) but had
> no luck searching.
> If possible, I'd appreciate if someone could help me on how to
> disable those periodic messages from being sent to the serial port.
>

Are they debugging messages?

You can configure the top-level configuration to not include
debugging messages by defining NO_DEBUG:

#include "TestNetwork.h"
#include "Ctp.h"

configuration TestNetworkAppC {}
implementation {
   components TestNetworkC, MainC, LedsC, ActiveMessageC;
   components DisseminationC;
   components new DisseminatorC(uint16_t, SAMPLE_RATE_KEY) as Object16C;
   components CollectionC as Collector;
   components new CollectionSenderC(CL_TEST);
   components new TimerMilliC();
   components new DemoSensorC();
   components new SerialAMSenderC(CL_TEST);
   components SerialActiveMessageC;
#ifndef NO_DEBUG
   components new SerialAMSenderC(AM_COLLECTION_DEBUG) as UARTSender;
   components UARTDebugSenderP as DebugSender;
#endif
   components RandomC;
   components new QueueC(message_t*, 12);
   components new PoolC(message_t, 12);

   TestNetworkC.Boot -> MainC;
   TestNetworkC.RadioControl -> ActiveMessageC;
   TestNetworkC.SerialControl -> SerialActiveMessageC;
   TestNetworkC.RoutingControl -> Collector;
   TestNetworkC.DisseminationControl -> DisseminationC;
   TestNetworkC.Leds -> LedsC;
   TestNetworkC.Timer -> TimerMilliC;
   TestNetworkC.DisseminationPeriod -> Object16C;
   TestNetworkC.Send -> CollectionSenderC;
   TestNetworkC.ReadSensor -> DemoSensorC;
   TestNetworkC.RootControl -> Collector;
   TestNetworkC.Receive -> Collector.Receive[CL_TEST];
   TestNetworkC.UARTSend -> SerialAMSenderC.AMSend;
   TestNetworkC.CollectionPacket -> Collector;
   TestNetworkC.CtpInfo -> Collector;
   TestNetworkC.CtpCongestion -> Collector;
   TestNetworkC.Random -> RandomC;
   TestNetworkC.Pool -> PoolC;
   TestNetworkC.Queue -> QueueC;

#ifndef NO_DEBUG
   components new PoolC(message_t, 10) as DebugMessagePool;
   components new QueueC(message_t*, 10) as DebugSendQueue;
   DebugSender.Boot -> MainC;
   DebugSender.UARTSend -> UARTSender;
   DebugSender.MessagePool -> DebugMessagePool;
   DebugSender.SendQueue -> DebugSendQueue;
   Collector.CollectionDebug -> DebugSender;
   TestNetworkC.CollectionDebug -> DebugSender;
#endif
   TestNetworkC.AMPacket -> ActiveMessageC;
}


Phil


_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to