Hi, Thank you for your reply.

I took a break from the whole thing and when I came back to it, the
lightbulb clicked on and I got two motes talking to each other and doing fun
things with the LEDs.

I was screwing around some more and saw you can use a UART port to send
messages to some Java tools, to display packets.

I have been having an interesting time with that.

Can the same AMSend() that sends from mote to mote be used to send messages
to the UART port for these Java tools to display?  A lot of what I have
found conflicts with other things I have found.  Seems like a TinyOS 1.0 vs
2.0 problem...so I am confused about what I should be doing.

and the TOS_UART_ADDR shown in examples doesn't seem to exist for me... so I
am not sure where I should even be sending these things to....


and one last thing.  Is this right? Can you do this?   I don't know if
you're allowed to wire interfaces to multiple components or not...

    Test.Packet     -> AMSenderC;
    Test.AMPacket     -> AMSenderC;
    Test.AMSend     -> AMSenderC;
    Test.AMControl     -> ActiveMessageC;
    Test.Packet     -> SerialAMSenderC;
    Test.AMPacket    -> SerialAMSenderC;
    Test.Send         -> SerialAMSenderC;
    Test.AMControl     -> SerialActiveMessageC;

thanks again

On Sat, Sep 17, 2011 at 9:52 AM, Sergio Valcarcel <serteck...@gmail.com>wrote:

> Hi Jude,
>
> That's a basic question on the use of the communication capabilities of
> TinyOS and, in my opinion, one of its strengths.
> You can start following this tutorial:
> http://docs.tinyos.net/tinywiki/index.php/Mote-mote_radio_communication
> And you may be interested to have this reference:
> http://www.tinyos.net/tinyos-2.x/doc/pdf/tinyos-programming.pdf
>
> In particular the AM_BLINKTORADIO defines a "logical" channel. So every
> node transmitting on this  channel will be able to reach any other
> node listening on this very same channel (if there is rf coverage, of
> course). Actually, the same idea mechanism is used to communicate PC with
> mote via serial port.
>
> For instance, you could have 5 nodes transmitting measurements to a sink in
> AM_MEAS, and also you could send them control commands through AM_CONTROL.
> This way, from an application level point of view, it is immediate to deal
> which each kind of messages, since they will signal different events (one
> per each AM_CHANNEL), and that is the reason because you pass it as a
> parameter to the AMSenderC, in order to be able to have many different kind
> of communications.
>
> Saying in a different way, instead using a switch-case control every time
> you get a message, and check the header to know what kind of message it is,
> the operating system signals a different event for each kind of message. The
> same when transmitting, using this functionality you do not have to set the
> kind of channel in a header. It is transparent to the user.
>
> An even more interesting quality of AMSenderC and AM_CHANNELNUMBER is that
>  it has an associated kind of data. Instead of just filling an array with
> the payload you want and having to decode the bytes according with the type
> of message, you define a specific struct for each channel. And the name of
> that struct is exactly what has to be after the "AM_" constant name. E.g. if
> you define "struct controlMsg {} controlMsg;" then you associate this kind
> of data to the corresponding channel using "enum {AM_CONTROLMSG 24}".
>
> I hope it clarifies :-)
>
> Cheers!
> Sergio
>
> On Sat, Sep 17, 2011 at 4:50 PM, Jude Allister <j.alliste...@gmail.com>wrote:
>
>> In the BlinkToRadio example, they use a value AM_BLINKTORADIO = 6, and
>> it's passed in to the AMSenderC.
>>
>> What is it for, and why is it set to 6?  What other values can be used?
>>
>>  Also, is there a document somewhere besides the TinyOS.net wiki that
>> explains these kinds of things better?
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> Tinyos-help@millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to