Hi Felipe,

it looks like you're using an old version (RSSI is defined as
nx_int8_t_t  in current TKN154_MAC.h [1]). Please note that when you
access the RSSI value, you are not supposed to access it directly via
the metadata struct, instead use the "command int8_t
getRSSI(message_t* frame);" provided by the IEEE154Frame interface (in
fact, the only header file you are supposed to include is TKN154.h,
where are all the definitions relevant to the next higher layer have
been put).

Jan

[1] http://code.google.com/p/tinyos-main/

On Fri, Jul 20, 2012 at 9:25 AM, Felipe Cruz Martínez
<[email protected]> wrote:
> Hi,
>
> I would like calculate the RSSI measurement in IEEE 802.15.4 TinyOS
> implementation (TKN154) whose libs are located at "/tos/lib/mac/tkn154" and
> test applications at "/apps/tests/tkn154" directories.
>
> In the file “TKN154_MAC.h” located at "/tos/lib/mac/tkn154” exists a 8 bits
> variable for store the RSSI value:
> typedef struct {
>   uint8_t rssi;
>   uint8_t linkQuality;
>   uint32_t timestamp;
> } ieee154_metadata_t;
>
> However, rssi is defined like a unsigned integer, therefore, when rssi takes
> negative values it crashes (by the fact of having defined rssi like an
> UNSIGNED integer). Someone has had considered this?
>
> The solution I've taken has been to change the value type of rssi from
> uint8_t to int8_t in the ieee154_metadata_t, allowing you to take positive
> values.
>
> Any help will be very appreciate.
>
> Thanks a lot,
> Felipe Cruz.
>
> _______________________________________________
> 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

Reply via email to