Hi,

Take a look at the tinyos folder, this is basic manip :
/opt/tinyos-2.1.0/apps/tutorials/RssiDemo.
For converting to [dBm] value obtained slightly modify the java code
(RssiDemo) as follow:

  public void messageReceived(int to, Message message) {
    RssiMsg msg = (RssiMsg) message;
    //int source = message.getSerialPacket().get_header_src();
    //System.out.println("Rssi Message received from node " + source +
    //           ": Rssi = " +  msg.get_rssi());

    int source = message.getSerialPacket().get_header_src(), rssi;
    rssi = printMsg.get_rssi()- 45;
    System.out.println("Rssi Message received from node " + source +
               ": Rssi = " +  rssi());
  }

2014-03-01 22:58 GMT+04:00 Tassos Paraskevopoulos <[email protected]>:

>   I am still stuck on how to convert RssiNoiseSampling app in order to
> receive packets, store rssi to flash and after retrieve rssi from flash
> through serial port. I want your help on how to break this app into two
> parts because I want the motes record rssi  (powered by batteries) and
> afterwards to connect Rx mote with PC to print rssi to file (noise.txt). If
> anybody wants to cooperate I can forward my transformed code.
> Kind Regards,
> Tassos.
>  *From:* tassos21 __ <[email protected]>
> *Sent:* Tuesday, February 25, 2014 1:48 PM
> *To:* Antonio Linan <[email protected]>
> *Cc:* [email protected]
> *Subject:* Re: [Tinyos-help] Transformation of RssiNoiseSampling
> toRssiPacketSampling code
>
>   I followed your guidance with printfUART but I am getting values with
> unrecognizable format:
> RSSI [6160292] LQI [17248]
> RSSI [5373860] LQI [17248]
>  Is there any way to print the received RSSI by using TestSerial Java app
> that is included in the RssiSampling folder?
>
> Regards,
> Tassos.
>  *From:* Antonio Linan <[email protected]>
> *Sent:* Tuesday, February 25, 2014 11:46 AM
> *To:* tassos21 __ <[email protected]>
> *Cc:* tinyos forum <[email protected]>
> *Subject:* Re: [Tinyos-help] Transformation of RssiNoiseSampling to
> RssiPacketSampling code
>
>   You must read the RSSI on received packets, you should be using instead:
>
> event message_t* Receive.receive(message_t* bufPtr,  void* payload,
> uint8_t len) {
>     printfUART("RSSI [%d] LQI [%d]\n", (call
> CC2420Packet.getRssi(bufPtr)-45), call CC2420Packet.getLqi(bufPtr));
>
> You can wire CC2420Packet in your configuration file as:
>
>   components CC2420PacketC;
>   App.CC2420Packet -> CC2420PacketC;
>
> Then in your module:
>   uses interface CC2420Packet;
>
> Cheers,
>
> --Antonio
>
>
> On Tue, Feb 25, 2014 at 10:30 AM, tassos21 __ <[email protected]>wrote:
>
>>   Hi,
>> I am trying to transform HyungJune Lee code (
>> http://sing.stanford.edu/abbado/RssiSampling.tar) in order to print RSSI
>> readings from receiving packets instead of noise. I have included Receive
>> and CC2420Packet interfaces but I can't bypass noise readings. Any ideas?
>> King Regards,
>> Tassos.
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> [email protected]
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> --
> Antonio Liñán Colina
> R+D Engineer
> @: [email protected]
> @: [email protected]
> ------------------------------
> Advancare
> Ph.: +34 935 511 403
> http://www.advancare.com
> http://www.zolertia.com
> http://zolertia.sourceforge.net
> http://webshop.zolertia.com
>
> ------------------------------
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 

(si réponse merci de l'adresser aux deux adresses email)
(adress your answer with both email adresses)

*========================================================      *

*                  RANDRIATSIFERANA Rivo Sitraka A.*

 *Laboratoire d'Energétique, d'Electronique  et Procédés (LE2P) - S3.08*

*  Faculté  des Sciences et Technologies,  Université de la Réunion*.

      Tel.  : +262 (0)2 62 93 86 72   GSM: +262 (0)6 92 44 39 68

Email : [email protected]
             [email protected]

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

Reply via email to