>> RssiMsg* rssiStruct = (RssiMsg) (payload); // here error : conversion to non-scalar type requested
RssiMsg* rssiStruct = (RssiMsg*) (payload); >> uartQueue[uartIn] = rssiStruct -> rssi; // here warning: assignment makes pointer from integer without a cast >From my experience, I have nothing done with uartQueue[uartIn]. You may try put some codes in the message_t receive event. >> should I use the struct in the sender and the receiver(BaseStation) .. or it is enough to use it in BaseStation only .. ? Both of them should understand the same message. >> is there a way to collect the data using MIG tool .. or any other rather than Listen .. ? Please see tutorial lesson 5 (mote-pc communication) Ittipong On 13/04/2008, basem aljedai <[EMAIL PROTECTED]> wrote: > > > > ---------- Forwarded message ---------- > From: basem aljedai <[EMAIL PROTECTED]> > Date: Sun, Apr 13, 2008 at 5:15 PM > Subject: Re: [Tinyos-help] TinyOS help > To: Ittipong Khemapech <[EMAIL PROTECTED]> > > > HI lttipong , > Thanks a lot for your help , I have done what you side to mukesh and my > code have become like this : > > BaseStationP: > > uses { > . > . > . > interface CC2420Packet as rssiReader; > } > > event message_t *RadioReceive.receive[am_id_t id](message_t *msg,void > *payload,uint8_t len) > { > // my modification .... > RssiMsg* rssiStruct = (RssiMsg) (payload); // here error : > conversion to non-scalar type requested > rssiStruct -> rssi = call rssiReader.getRssi(msg); > > uartQueue[uartIn] = rssiStruct -> rssi; // here warning: > assignment makes pointer from integer without a cast > //end of modification > return receive(msg, payload, len); > } > > this the struct where I hold the data .. > > #ifndef RSSIMSG_H > #define RSSIMSG_H > > > enum { > AM_RSSIMSG = 10 > }; > > // This sturct will hold the RSSI .. > typedef nx_struct RssiMsg > { > nx_int8_t rssi; > } RssiMsg; > > #endif > > should I use the struct in the sender and the receiver(BaseStation) .. or > it is enough to use it in BaseStation only .. ? > > is there a way to collect the data using MIG tool .. or any other rather > than Listen .. ? > > Thanks a lot > Basem ; > > On Fri, Apr 11, 2008 at 7:51 PM, Ittipong Khemapech < > [EMAIL PROTECTED]> wrote: > > > 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 > > Tinyos-help@millennium.berkeley.edu > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > > > > > -- > Basem M Al-jedai > > > > -- > Basem M Al-jedai > _______________________________________________ > 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