All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Matteo Petracca <matteo.petracca@sssup.it>
Cc: linux-wpan@vger.kernel.org
Subject: Re: At86rf233 RSSI
Date: Sat, 20 Jun 2015 10:11:21 +0200	[thread overview]
Message-ID: <20150620081116.GA730@omega> (raw)
In-Reply-To: <55844786.5080102@sssup.it>

Hi,

On Fri, Jun 19, 2015 at 06:47:02PM +0200, Matteo Petracca wrote:
> Hi,
> is there any way to get RSSI form the transceiver?
> 

not directly. I think it depends on your use case.

First make you clear what receceiving indicator which you want, there
exists more than RSSI in 802.15.4.

1. LQI (some indicator, standard doesn't say much about this value and
        how it's caluclated, in case of at86rf233 it's just "connection
	nearly to death (<0xFF) or some "good" connection indicated by
	0xFF. -> means packet quality.

2. RSSI

3. ED (energy detection, normally use to check if the channel is clear,
       there exists CCA modes with thresholds to specify the
       threshold).

Refer to atmels FAQ [0].



It depends on your use case what you want. Normally you want some
mapping from "latest frame from node xxx" and the measured LQI, RSSI, ED
values when the frame was received. And this is what we plan to do. Nodes
are indicated by the used address then.

We don't have such feature now, but what you could do is to readout the
register value over regmap.



RSSI (in case of RPI, spi name differs maybe):

echo $(( 0x`cat /sys/kernel/debug/regmap/spi32766.0/registers | sed -ne "s/06: \(.*\)/\1/p"` & 0x1f ))

This will readout the RSSI value register. But this doesn't working
well. Because the datasheet said:

"It is not recommended reading the RSSI value when using the Extended Operating
Modes or Smart Receiving, see Section 11.10.2.2. Instead, the automatically generated
ED value should be used, see Section 8.5."

I suppose this is because the "Smart Receiving" why I read only 0 or 1
out. You need to hack the driver and turn it off, it's default enabled.
I didn't test it.



ED (in case of RPI, spi name differs maybe):

cat /sys/kernel/debug/regmap/spi32766.0/registers  | sed -ne "s/07: \(.*\)/\1/p"

The above RSSI value said it's recommended using the ED value which
automatically updated (when exactly, depends on many things).


This is not a quite solution and we should provide this information in
some mapping for dumping it in userspace/"kernelspace" and updated the
values on each received frame from $NEIGHBOR_NODE.

- Alex

[0] http://atmel.force.com/support/articles/en_US/FAQ/Understanding-RSSI-ED-and-LQI-in-IEEE802-15-4-transceivers-and-SoCs
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in

      reply	other threads:[~2015-06-20  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 16:47 At86rf233 RSSI Matteo Petracca
2015-06-20  8:11 ` Alexander Aring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150620081116.GA730@omega \
    --to=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=matteo.petracca@sssup.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.