Hi,

I think that your problem is that you are running over the message's header:
file SenderC.nc:

pPacket = (packet_msg_t *)report.data;

*report *is a messaget_t, you are casting it to (packet_msg_t *) and running
over the header.

Try two things:

   1. Comment lines 42 through 45 in SenderC.nc.
   2. Change line 43 to the following:
   pPacket = (packet_msg_t*)call Packet.getPayload(&report, sizeof(report));
   Of course you need to wire interface Packet to ActiveMessageC

Arik


On Wed, Feb 24, 2010 at 03:16, Kartik Siddhabathula <
[email protected]> wrote:

>  Hi All,
>
> I am new to tinyos-2.x and was migrating my tinyos-1.x code to tinyos-2.x.
> I am having a problem with the reception of the message. I am sending a
> message but I am not able to receive it.
>
> I am sending the code as an attachment, if possible can anyone tell me
> where I am going wrong? Is there any problem with the configuration?
>
> Thanks in advance,
> Kartik
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Best Regards,
Arik Sapojnik
[email protected]
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to