Have you connected this interface in the implementation of the configuration
component?
You should have something like this:
configuration RssiAppC{
}
implementation{
components CC2420PacketC;
RssiC.RadioPacket -> CC2420PacketC;
}
Do you have it?
On Tue, Jan 11, 2011 at 7:31 AM, SHIVASANKAR GANESAN <[email protected]>wrote:
> Hi
>
> In *uses* I add
>
> *interface CC2420Packet as RadioPacket;*
>
> Then I called getRssi in my function
>
> *rssi = call RadioPacket.getRssi(rx_buffer_ptr);*
> *
> *
> *CC2420Packet * is defined as
>
> *
> #include "AM.h"
> interface CC2420Packet {
> async command int8_t getRssi( TOS_Msg* strength );
> }
>
>
> TOS_Msg in AM is defined by
>
> typedef struct TOS_Msg
> {
> /* The following fields are transmitted/received on the radio. */
> uint8_t length;
> uint8_t fcfhi;
> uint8_t fcflo;
> uint8_t dsn;
> uint16_t destpan;
> uint16_t addr;
> uint8_t type;
> uint8_t group;
> int8_t data[TOSH_DATA_LENGTH];
>
> uint8_t strength;
> uint8_t lqi;
> bool crc;
> uint8_t ack;
> uint16_t time;
> } TOS_Msg;
>
> *
> While compiling this file, I am getting error
>
> *"RadioPacket.getRssi not connected"*
> *
> *
> Why it is not connected?.How to solve this error.
>
> **
> *With regards*
> *Sivasankar*
>
>
> --- On *Mon, 10/1/11, Sergio Valcarcel <[email protected]>* wrote:
>
>
> From: Sergio Valcarcel <[email protected]>
> Subject: Re: [Tinyos-help] Reg:RSSI_VAL register
> To: "SHIVASANKAR GANESAN" <[email protected]>
> Date: Monday, 10 January, 2011, 7:04 PM
>
> Hi,
>
> not really, you just need to use the interface CC2420Packet, that is
> provided by
> component CC2420PacketC.
>
> uses {
> interface Receive as BeaconReceive;
> interface CC2420Packet as RadioPacket;
> }
>
> Then, when you receive the message (in my example is a struct of type
> BeaconMsg)
>
> event message_t * BeaconReceive.receive(message_t *msg, void *payload,
> uint8_t len){
> BeaconMsg * pointerBeacon;
> int8_t rssi;
> if ( len == sizeBeacon ) {
> pointerBeacon = (BeaconMsg*) payload;
> rssi = call RadioPacket.getRssi(msg);
> }
> }
>
>
> Cheers!
> Sergio
>
>
> On Mon, Jan 10, 2011 at 6:06 AM, SHIVASANKAR GANESAN
> <[email protected]<http://mc/[email protected]>
> > wrote:
>
> Hi
>
> Do we need to include any header file for using RSSI_VAL register.
>
> I want to read RSSI Value.
>
> when I am using below given line.
>
> *power=RSSI_VAL-45;//for RSSI reading,here RSSI_OFFSET is -45dBm.*
>
> It is giving error as
>
> *`RSSI_VAL' undeclared (first use in this function).*
>
> *With regards*
> *Sivasankar*
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]<http://mc/[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