Arik Sapojnik wrote:
> Nikos,
>
> I don't entirely agree with you:
>
>    1. "The BaseStation app will forward anything..." - but with what
>       AM type to what destination address?
>

All I'm saying is that the BaseStation app for tinyos is agnostic to AM 
types. if it's an ActiveMessage, it will handle it.
I'm not sure if it listens in on messages that are not directed to the 
id of the mote it runs on, although the RadioSnoop interface is wired.

Could anyone else shed some light into this?

>    1. I added printf in UartReceive.receive, and then sent the following:
>       "0x01" - Nothing happened
>       "0xFF" - the print worked
>
I'm not sure I understand what you mean.


>    1. I think that the reason is the first byte is the destination
>       address (since the UART works with AM layer).
>    2. I want to work with C and I couldn't find any examples working
>       with MIG (only Java examples).
>
>
for a header that  looks like this :

------------------------------------------------- definitions.h
#ifndef DEFINITIONS_H
#define DEFINITIONS_H

enum
  {
    AM_MOTE2MOTEMSG=1,
  };

typedef nx_struct Mote2MoteMsg
{
  nx_uint8_t nodeid;
  nx_uint16_t timestamp;
} Mote2MoteMsg;

-------------------------------------------------- definitions.h




issuing this command :

$>mig c -c-prefix=MOTE2MOTEMSG_H -target=mica2 definitions.h 
Mote2MoteMsg -o OUTCMoteMSG.h


will give you
OUTCMoteMSG.h and OUTCMoteMSG.c

with C functions to handle your specific message (for the mica2 
platform, in this case).

Was this what you were looking for?

Best regards,
Nikos


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

Reply via email to