You have already declared several variables to store RSSI and LQI at the
receiving side (base station). The other thing you have to do is to put
those values into the payload of the message_t.

An example of defining your own message structure is:

#ifndef SAMPLEMSG_H_
#define SAMPLEMSG_H_

enum {
   AM_SAMPLEMSG = 10
};

typedef nx_struct SampleMsg {
   nx_uint8_t txpower;        // Current tx power
   nx_int8_t rssi;               // RSSI
   nx_uint8_t lqi;               // LQI
} SampleMsg;

#endif

About the current tx, you have to get it at the sending side NOT the
receiving one.

Hope this helps.

Ittipong


On 11/04/2008, mukesh rungta <[EMAIL PROTECTED]> wrote:
>
> Yes it doesnt displays anything.
>
> What do u mean by declaring your own message structure??
> I dont understand this..
> I am using the message_t *msg from RadioReceive.receive event and calling
> CC2420 packet
> to read Rssi/Lqi.
> also I have declared a pointer type for storing these values of Rssi/Lqi
> and I just receive a warning while compiling that "assignment make pointer
> from integer without
> a cast".
>
> Can u elaborate on this.
>
> thanks
>
> On Fri, Apr 11, 2008 at 11:27 AM, Ittipong Khemapech <
> [EMAIL PROTECTED]> wrote:
>
> > >>But when I use serial listen to see the packet values it doesnt
> > displays
> > anything.
> >
> > What does it mean exactly? Did you have 00 all the time OR nothing was
> > shown on PC screen?
> >
> > If it's the latter case, I think you forgot to declare your own message
> > structure.
> >
> >
> > Ittipong
> >
> > On 11/04/2008, mukesh rungta <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi
> > >
> > > Thanks for forwarding my mail to list.
> > >
> > > I am using Tmote sky, TinyOS, on xubuntos....
> > >
> > > I modify the following..
> > > BaseStationC
> > > .
> > > .
> > > components CC2420ActiveMesageC
> > > .
> > > .
> > > BaseStationP.CC2420Packet -> CC2420ActiveMessageC
> > >
> > > In BaseStationP
> > > uses{
> > > .
> > > .
> > > interfacce CC2420Packet;
> > > }
> > > after event RadioReceive.receive
> > > rssi = call CC2420Packet.getRssi(msg);
> > > lqi = call CC2420Packet.getLqi(msg);
> > > pow = call CC2420.getPower(msg);
> > >
> > > uartQueue[uartIn] = rssi;
> > > . .
> > > ..
> > >
> > > Now when I compile my code and it successfully compiles.
> > > But when I use serial listen to see the packet values it doesnt
> > > displays
> > > anything.
> > >
> > > I dont know why.
> > >
> > > Mukesh
> > >
> > > On Fri, Apr 11, 2008 at 5:09 AM, Ittipong Khemapech <
> > > [EMAIL PROTECTED]> wrote:
> > >
> > > > Firstly, I have forwarded your email to the list. You can have
> > > > better help and suggestions.
> > > >
> > > > Secondly, what your codes say?
> > > >
> > > > Thirdly, which platform, os, tinyos are you using?
> > > >
> > > > Ittipong
> > > >
> > > >
> > > > On 11/04/2008, mukesh rungta <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hi
> > > > >
> > > > > I am also working on to find out the RSSI/LQI using BaseStation.
> > > > > What I did was programmed few motes with BlinkToRaadio and
> > > > > one mote connected to computer as BaseStation. Now I modified this
> > > > >
> > > > > program to read and display the values of RSSI, LQI and received
> > > > > power
> > > > > instead of transmitted message from other nodes. But I am not able
> > > > > to
> > > > > read these. I guess there is some problem in my code.
> > > > >
> > > > > I guess you are also working in the same thing. I hope you can
> > > > > help me
> > > > > in this regard. I will appreciate your reply.
> > > > >
> > > > > Thanks
> > > > > Mukesh
> > > > >
> > > >
> > > >
> > >
> >
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to