you can refer to Tinyos Tutorial.
--------------
void sendMessage() {
EasyCollectionMsg* msg =
(EasyCollectionMsg*)call Send.getPayload(&packet,
sizeof(EasyCollectionMsg));
msg->data = 0xAAAA;
if (call Send.send(&packet, sizeof(EasyCollectionMsg)) != SUCCESS)
call Leds.led0On();
else
sendBusy = TRUE;
}
2010/12/16 Edel A. Rodriguez Sanchez <[email protected]>
> I'am trying to send a message. I have done that:
>
> 1. message_t packet; // Message buffer
> 2. uint8_t Msg[8]; // Message that i want to send.
> 3. call AMPacket.setDestination(&packet, node); // Put the dest of
> message
> 4. bat, how i put the mesaje Msg in the packet packet?
>
> Thanks
>
> *
> *
> Edel Angel Rodríguez Sánchez
> Facultad de Informática
> *Universidad de Granma. Cuba*
>
> ------------------------------
> *From: *[email protected]
> *To: *[email protected]
> *Sent: *Wednesday, December 15, 2010 5:21:57 AM
> *Subject: *Tinyos-help Digest, Vol 92, Issue 50
>
> Send Tinyos-help mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tinyos-help digest..."
>
>
> Today's Topics:
>
> 1. MSP430 General IO on TelosB hardware (Joey Wilson)
> 2. Re: MSP430 General IO on TelosB hardware (Jos? A. Tarifa)
> 3. Re: (no subject) (Yong, Chee Yeew)
> 4. Re: CTP: CC2420Packet.getPower() (Yusnaidi Md Yusof)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 14 Dec 2010 16:11:47 -0700
> From: Joey Wilson <[email protected]>
> Subject: [Tinyos-help] MSP430 General IO on TelosB hardware
> To: [email protected]
> Message-ID:
>
> <[email protected]<aanlktimxqjhjgpmfoxwzna_dvpaw%2bwdmz_az68%2b3%[email protected]>
> >
> Content-Type: text/plain; charset="utf-8"
>
> Hello all,
>
> I am trying to figure out an easy way to turn on/off a digital output from
> the TelosB hardware from TinyOS software. I have been searching the web and
> found that some people say to use the MSP430GeneralIOC component in the
> application wiring, but this is not working. I have tried a lot of variants
> and can't seem to figure it out. Could anyone explain how to wire the
> MSP430's general IO components correctly?
>
> Thanks for your time.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101214/dfd5cd84/attachment-0001.htm
>
> ------------------------------
>
> Message: 2
> Date: Wed, 15 Dec 2010 02:13:13 +0100
> From: "Jos? A. Tarifa" <[email protected]>
> Subject: Re: [Tinyos-help] MSP430 General IO on TelosB hardware
> To: Tinyos-help <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> I've tried to use these functionality... and it seems it works!! :D
>
> Components:
> components HplMsp430GeneralIOC as GeneralIOC;
> components new Msp430GpioC() as DigitalA;
> components new Msp430GpioC() as DigitalB;
> components new Msp... (etc).
>
> Wiring:
> DigitalA -> GeneralIOC.Port23; // This is pin#3 from the 6-pin
> connector
> DigitalB -> GeneralIOC.Port26; // This is pin#4 from the 6-pin
> connector
>
> ModuleC.DigA -> DigitalA;
> ModuleC.DigB -> DigitalB;
>
> And then, in your application module (named ModuleC) you must define
> these interfaces:
> uses interface GeneralIO as DigA;
> uses interface GeneralIO as DigB;
>
> For example, if you want to set pin#3 to output, you write
> call DigA.makeOutput();
>
> If you want to set pin#4 to "1" (like output), you can write:
> call DigB.makeOutput();
> ...
> call DigB.set();
>
>
> http://www.tinyos.net/tinyos-2.1.0/doc/nesdoc/telosb/ihtml/tos.interfaces.GeneralIO.html
>
> I hope to help you... if you need further help... ask to the mailing list
> :)
>
> Regards,
> Jose A.
>
> ------------------------------------------------------------------------
>
> El 15/12/2010 0:11, Joey Wilson escribi?:
> > Hello all,
> >
> > I am trying to figure out an easy way to turn on/off a digital output
> > from the TelosB hardware from TinyOS software. I have been searching
> > the web and found that some people say to use the MSP430GeneralIOC
> > component in the application wiring, but this is not working. I have
> > tried a lot of variants and can't seem to figure it out. Could anyone
> > explain how to wire the MSP430's general IO components correctly?
> >
> > Thanks for your time.
> >
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> --
> Jose A.
> Seville, Spain
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101215/055ff49d/attachment-0001.htm
>
> ------------------------------
>
> Message: 3
> Date: Wed, 15 Dec 2010 08:39:31 -0000
> From: "Yong, Chee Yeew" <[email protected]>
> Subject: Re: [Tinyos-help] (no subject)
> To: "'vino bala'" <[email protected]>,
> [email protected]
> Message-ID:
>
>
> <5026_1292402375_4d087ec7_5026_17835_1_b90e0206899b3442bb5b86f32cadffa4279...@nts013.uk.trt.thales
> >
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> The instructions refer to the public version TinyOS-1.1, not the MoteWorks
> version of TinyOS.
>
> http://www.cse.wustl.edu/wsn/index.php?title=WU_WSN_Research_Lab
> <http://www.cse.wustl.edu/wsn/index.php?title=WU_WSN_Research_Lab>
> http://www.cse.wustl.edu/wsn/index.php?title=TinyOS_1.x_Installation
> <http://www.cse.wustl.edu/wsn/index.php?title=TinyOS_1.x_Installation>
>
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]on Behalf Of vino bala
> Sent: 14 December 2010 07:03
> To: [email protected]
> Subject: [Tinyos-help] (no subject)
>
>
> hi
> I'am using tinyos1.x through cygwin(crossbow moteworks) in my XP machine
> while installing wsn2_Arq application, from the site
>
>
> http://www.cse.wustl.edu/wsn/index.php?title=WS2_Installation_Instructions
> <
> http://www.cse.wustl.edu/wsn/index.php?title=WS2_Installation_Instructions
> >
>
>
> in that they are saying to make some changes in the nesc code located in
>
>
>
> C:\tinyos\cygwin\opt\tinyos-cvs\contrib\imote2\tos\sensorboards\BasicSensorb
> oard\BasicSensorboardAccelDataM.nc
>
> I checked my tinyos1.x in that no folder named BasicSensorboard,how to fix
> this
> help me to fix this..
>
> How to set home dir,TOSROOT,TOSDIR,MAKERULES,
> PATH
>
> Help me
>
> Regards
> Vino
>
>
> Please consider the environment before printing a hard copy of this
> e-mail.
>
> The information contained in this e-mail is confidential. It is intended
> only for the stated addressee(s) and access to it by any other person is
> unauthorised. If you are not an addressee, you must not disclose, copy,
> circulate or in any other way use or rely on the information contained in
> this e-mail. Such unauthorised use may be unlawful. If you have received
> this e-mail in error, please inform us immediately on +44 (0)118 986 8601
> and delete it and all copies from your system.
>
> Thales Research and Technology (UK) Limited. A company registered in
> England and Wales. Registered Office: 2 Dashwood Lang Road, The Bourne
> Business Park, Addlestone, Weybridge, Surrey KT15 2NX. Registered Number:
> 774298
>
> Thales UK Limited. A company registered in England and Wales. Registered
> Office: 2 Dashwood Lang Road, The Bourne Business Park, Addlestone,
> Weybridge, Surrey KT15 2NX. Registered Number: 868273
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101215/6899c5d1/attachment-0001.htm
>
> ------------------------------
>
> Message: 4
> Date: Wed, 15 Dec 2010 10:21:40 +0000
> From: Yusnaidi Md Yusof <[email protected]>
> Subject: Re: [Tinyos-help] CTP: CC2420Packet.getPower()
> To: Doug Carlson <[email protected]>
> Cc: [email protected]
> Message-ID:
> <[email protected]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Doug,
>
> Yes, that what I meant.
>
> I see. Then, can I access the metadata information, instead? If so, can I
> know what components and interface to use? Is it the same CC2420Packet?
>
> Other way, if the metadata is meant not to be transmitted, then I am
> wondering what is the purpose of the metadata? Is it just like the
> message_t
> which serves as a template for packet creation and storage?
>
> Many thanks.
>
> Yusnaidi
>
>
> On Mon, Dec 13, 2010 at 6:47 PM, Doug Carlson <[email protected]> wrote:
>
> > Yusnaidi,
> > I see, so you actually want to see the power which the sender specified
> > (value between 0 and 31), not the RSSI of the packet which was received.
> >
> > This information is not transmitted with the basic CC2420 packet (see
> > CC2420.h: it's under the metadata section which is described as not
> > transmitted with the packet). Just the header + payload are sent, not the
> > metadata. If you need access to this information at the receiver, then I
> > guess the simplest solution is to duplicate it in the payload of the
> packet.
> >
> > Hope this answers your question.
> > -Doug
> >
> >
> > On Mon, Dec 13, 2010 at 10:32 AM, Yusnaidi Md Yusof <
> [email protected]>wrote:
> >
> >> Hi Doug,
> >>
> >> Many thanks for the help. However, I need to read the received power on
> >> every received packet, thus I guess I have to choose getPower() rather
> than
> >> getRssi(). Is it?
> >>
> >> I have set the transmission power for a given packet using
> >> CC2420Packet.setPower(), thus to read the transmission power settings
> for
> >> the received packet, I need to use CC2420Packet.getPower(), is it? Or,
> >> getRssi() also gives a similar meanings?
> >>
> >> thanks
> >>
> >> Yusnaidi
> >>
> >>
> >>> ------------------------------
> >>>
> >>> Message: 2
> >>> Date: Fri, 10 Dec 2010 12:23:18 -0500
> >>> From: Doug Carlson <[email protected]>
> >>> Subject: Re: [Tinyos-help] CTP: CC2420Packet.getPower()
> >>> To: [email protected]
> >>> Message-ID:
> >>> <[email protected]>
> >>> Content-Type: text/plain; charset="iso-8859-1"
> >>>
> >>> Yusnaidi,
> >>> See the CC2420Packet documentation (
> >>>
> >>>
> http://www.tinyos.net/tinyos-2.1.0/doc/nesdoc/telosb/ihtml/tos.chips.cc2420.interfaces.CC2420Packet.html
> >>> ).
> >>>
> >>> You are looking for CC2420Packet.getRssi(). get/set power are for
> >>> transmission power, getRssi will give you the received signal strength
> of
> >>> a
> >>> received packet (or, the RSSI of the acknowledgement for a sent
> packet).
> >>>
> >>> -Doug
> >>>
> >>> On Fri, Dec 10, 2010 at 11:10 AM, Yusnaidi Md Yusof <
> >>> [email protected]>wrote:
> >>>
> >>> > Hi All,
> >>> >
> >>> > I am so stucked to read the power of the received packet. I am using
> >>> CTP
> >>> > protocol and sending the packet using Send.send().
> >>> >
> >>> > I have tried with the AM communication (my other test that not using
> >>> CTP
> >>> > protocol), and in that test I send packets using AMSend.send(). I set
> >>> > certain power using CC2420Packet.setPower() and able to read the
> >>> correct
> >>> > same power using CC2420Packet.getPower().
> >>> >
> >>> > However, I always get power value as '31' using the
> >>> CC2420Packet.getPower
> >>> > while running the test in CTP Protocol.
> >>> >
> >>> > I guess, CTP not support using AMSend, but only support using 'Send'
> >>> > interface.
> >>> >
> >>> > How can I get the power reading in CTP?
> >>> >
> >>> > Is it the nature that the 'Send.send()' used in CTP does not support
> >>> > CC2420Packet.getPower()??
> >>> >
> >>> > I do really need an advise here. Pleaseeeee...
> >>> >
> >>> > thanks
> >>> >
> >>> > Yusnaidi
> >>> >
> >>> > _______________________________________________
> >>> > Tinyos-help mailing list
> >>> > [email protected]
> >>> >
> >>>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >>> >
> >>> -------------- next part --------------
> >>> An HTML attachment was scrubbed...
> >>> URL:
> >>>
> https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101210/ba6afe86/attachment-0001.htm
> >>>
> >>> ------------------------------
> >>>
> >>> _______________________________________________
> >>> Tinyos-help mailing list
> >>> [email protected]
> >>>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >>>
> >>> End of Tinyos-help Digest, Vol 92, Issue 41
> >>> *******************************************
> >>>
> >>
> >>
> >>
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101215/7eb6ae93/attachment.htm
>
> ------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> End of Tinyos-help Digest, Vol 92, Issue 50
> *******************************************
>
> ________________________________________
> Universidad de Granma. Bayamo, M.N. Cuba
> *http://www.udg.co.cu* <http://www.udg.co.cu>
>
> Participe en el III Congreso Cubano de Desarrollo Local
> 9 al 11 de marzo de 2011
> *http://www.udg.co.cu/congreso* <http://www.udg.co.cu/congreso>
>
> Tiempo:
> *http://www.udg.co.cu/mrtg/weather/weather.html*<http://www.udg.co.cu/mrtg/weather/weather.html>
> Imagenes desde el satelite: *
> http://www.udg.co.cu/mrtg/weather/map/today-Bayamo-CUXX0001.jpg*<http://www.udg.co.cu/mrtg/weather/map/today-Bayamo-CUXX0001.jpg>
>
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
Regards,
Xiaozong Cui
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help