* [Bluez-users] reading RSSI value with D-Bus Api
@ 2007-04-05 9:26 Emanuele Novelli
2007-04-05 9:28 ` Marcel Holtmann
0 siblings, 1 reply; 7+ messages in thread
From: Emanuele Novelli @ 2007-04-05 9:26 UTC (permalink / raw)
To: Bluez-users
[-- Attachment #1.1: Type: text/plain, Size: 1296 bytes --]
Hello,
reading another post here, I saw Marcel hinted to use the inquiry from D-Bus
API to sort the devices by their RSSI so I tried a simple test
this is the part of code I'm using
...
if (dbus_message_is_signal(msg, "org.bluez.Adapter",
"RemoteDeviceFound")) {
printf ("Remote Device Found Signal Received\n");
while (dbus_message_iter_get_arg_type(&iter) !=
DBUS_TYPE_INVALID) {
switch (dbus_message_iter_get_arg_type(&item)) {
case DBUS_TYPE_STRING: /* first pameter bdaddress */
.....
break;
case DBUS_TYPE_UINT32: /* second parameter class of
device */
........
break;
case DBUS_TYPE_INT16: /* rssi */
dbus_message_iter_get_basic(&args, &rssi);
printf("rssi: %d\n", rssi);
break;
......
Now the problem is: I can read the bdaddress and the device class good, but
the RSSI values I get from variuous devices are negatives (the are in range
-40 -90 usually). I read somewhere RSSI should range from 0 to 255 so maybe
I'm doing something wrong ? api says the type RSSI is int16 not uint16 so I
used a signed variable.
[-- Attachment #1.2: Type: text/html, Size: 3094 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] reading RSSI value with D-Bus Api
2007-04-05 9:26 [Bluez-users] reading RSSI value with D-Bus Api Emanuele Novelli
@ 2007-04-05 9:28 ` Marcel Holtmann
2007-04-05 9:36 ` Emanuele Novelli
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2007-04-05 9:28 UTC (permalink / raw)
To: BlueZ users
Hi Emanuele,
> reading another post here, I saw Marcel hinted to use the inquiry from
> D-Bus API to sort the devices by their RSSI so I tried a simple test
>
> this is the part of code I'm using
> ...
>
> if (dbus_message_is_signal(msg, " org.bluez.Adapter",
> "RemoteDeviceFound")) {
> printf ("Remote Device Found Signal Received\n");
>
> while (dbus_message_iter_get_arg_type(&iter) !=
> DBUS_TYPE_INVALID) {
> switch (dbus_message_iter_get_arg_type(&item)) {
> case DBUS_TYPE_STRING: /* first pameter
> bdaddress */
> .....
>
> break;
> case DBUS_TYPE_UINT32: /* second parameter class
> of device */
> ........
> break;
>
> case DBUS_TYPE_INT16: /* rssi */
> dbus_message_iter_get_basic(&args, &rssi);
> printf("rssi: %d\n", rssi);
> break;
>
> ......
>
>
>
> Now the problem is: I can read the bdaddress and the device class
> good, but the RSSI values I get from variuous devices are negatives
> (the are in range -40 -90 usually). I read somewhere RSSI should range
> from 0 to 255 so maybe I'm doing something wrong ? api says the type
> RSSI is int16 not uint16 so I used a signed variable.
the RSSI value is a signed int8 actually (except that D-Bus doesn't
support this type). You might confuse this with the link quality value,
but the RSSI is always signed.
Regards
Marcel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] reading RSSI value with D-Bus Api
2007-04-05 9:28 ` Marcel Holtmann
@ 2007-04-05 9:36 ` Emanuele Novelli
2007-04-06 10:24 ` Mahtab Hossain
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Emanuele Novelli @ 2007-04-05 9:36 UTC (permalink / raw)
To: BlueZ users
[-- Attachment #1.1: Type: text/plain, Size: 638 bytes --]
Hi Marcel,
I'm referring to this function (from bluez dbus-api) where the rssi
parameter is int16
----
void RemoteDeviceFound(string address, uint32 class, int16 rssi)
This signal will be send every time an inquiry result
has been found by the service daemon. In general they
only appear during a device discovery.
----
you posted in another thread you can use that value to check how close is
the remote device to the dongle who does inquiry. Maybe I'm wrong and that's
not the correct value to check for this purpose?
Anyway the third parameter I read with the snipped code I posted is
negative.
[-- Attachment #1.2: Type: text/html, Size: 834 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] reading RSSI value with D-Bus Api
2007-04-05 9:36 ` Emanuele Novelli
@ 2007-04-06 10:24 ` Mahtab Hossain
2007-04-06 10:24 ` Mahtab Hossain
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Mahtab Hossain @ 2007-04-06 10:24 UTC (permalink / raw)
To: BlueZ users
[-- Attachment #1.1: Type: text/plain, Size: 1619 bytes --]
Hi Emanuele,
Sometimes, the Bluetooth module vendor provides absolute signal strength (like Wi-Fi) rather than the relative RSSI value indicated in Bluetooth Spec. I had one dongle which did just that. You may need to send your inquiry to them as well if it's really the case.
Thanks
Mahtab
Emanuele Novelli <ema.novelli@gmail.com> wrote: Hi Marcel,
I'm referring to this function (from bluez dbus-api) where the rssi parameter is int16
----
void RemoteDeviceFound(string address, uint32 class, int16 rssi)
This signal will be send every time an inquiry result
has been found by the service daemon. In general they
only appear during a device discovery.
----
you posted in another thread you can use that value to check how close is the remote device to the dongle who does inquiry. Maybe I'm wrong and that's not the correct value to check for this purpose?
Anyway the third parameter I read with the snipped code I posted is negative.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
---------------------------------
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
[-- Attachment #1.2: Type: text/html, Size: 2146 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] reading RSSI value with D-Bus Api
2007-04-05 9:36 ` Emanuele Novelli
2007-04-06 10:24 ` Mahtab Hossain
@ 2007-04-06 10:24 ` Mahtab Hossain
2007-04-06 10:24 ` Mahtab Hossain
2007-04-06 10:45 ` Mahtab Hossain
3 siblings, 0 replies; 7+ messages in thread
From: Mahtab Hossain @ 2007-04-06 10:24 UTC (permalink / raw)
To: BlueZ users
[-- Attachment #1.1: Type: text/plain, Size: 1596 bytes --]
Hi Emanuele,
Sometimes, the Bluetooth module vendor provides absolute signal strength (like Wi-Fi) rather than the relative RSSI value indicated in Bluetooth Spec. I had one dongle which did just that. You may need to send your inquiry to them as well if it's really the case.
Thanks
Mahtab
Emanuele Novelli <ema.novelli@gmail.com> wrote: Hi Marcel,
I'm referring to this function (from bluez dbus-api) where the rssi parameter is int16
----
void RemoteDeviceFound(string address, uint32 class, int16 rssi)
This signal will be send every time an inquiry result
has been found by the service daemon. In general they
only appear during a device discovery.
----
you posted in another thread you can use that value to check how close is the remote device to the dongle who does inquiry. Maybe I'm wrong and that's not the correct value to check for this purpose?
Anyway the third parameter I read with the snipped code I posted is negative.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
---------------------------------
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
[-- Attachment #1.2: Type: text/html, Size: 2036 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] reading RSSI value with D-Bus Api
2007-04-05 9:36 ` Emanuele Novelli
2007-04-06 10:24 ` Mahtab Hossain
2007-04-06 10:24 ` Mahtab Hossain
@ 2007-04-06 10:24 ` Mahtab Hossain
2007-04-06 10:45 ` Mahtab Hossain
3 siblings, 0 replies; 7+ messages in thread
From: Mahtab Hossain @ 2007-04-06 10:24 UTC (permalink / raw)
To: BlueZ users
[-- Attachment #1.1: Type: text/plain, Size: 1626 bytes --]
Hi Emanuele,
Sometimes, the Bluetooth module vendor provides absolute signal strength (like Wi-Fi) rather than the relative RSSI value indicated in Bluetooth Spec. I had one dongle which did just that. You may need to send your inquiry to them as well if it's really the case.
Thanks
Mahtab
Emanuele Novelli <ema.novelli@gmail.com> wrote: Hi Marcel,
I'm referring to this function (from bluez dbus-api) where the rssi parameter is int16
----
void RemoteDeviceFound(string address, uint32 class, int16 rssi)
This signal will be send every time an inquiry result
has been found by the service daemon. In general they
only appear during a device discovery.
----
you posted in another thread you can use that value to check how close is the remote device to the dongle who does inquiry. Maybe I'm wrong and that's not the correct value to check for this purpose?
Anyway the third parameter I read with the snipped code I posted is negative.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
[-- Attachment #1.2: Type: text/html, Size: 2073 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] reading RSSI value with D-Bus Api
2007-04-05 9:36 ` Emanuele Novelli
` (2 preceding siblings ...)
2007-04-06 10:24 ` Mahtab Hossain
@ 2007-04-06 10:45 ` Mahtab Hossain
3 siblings, 0 replies; 7+ messages in thread
From: Mahtab Hossain @ 2007-04-06 10:45 UTC (permalink / raw)
To: BlueZ users
[-- Attachment #1.1: Type: text/plain, Size: 1633 bytes --]
Hi Emanuele,
Sometimes, the Bluetooth module vendor provides absolute signal strength (like Wi-Fi) rather than the relative RSSI value indicated in Bluetooth Spec. I had one dongle which did just that. You may need to send your inquiry to them as well if it's really the case.
Thanks
Mahtab
Emanuele Novelli <ema.novelli@gmail.com> wrote: Hi Marcel,
I'm referring to this function (from bluez dbus-api) where the rssi parameter is int16
----
void RemoteDeviceFound(string address, uint32 class, int16 rssi)
This signal will be send every time an inquiry result
has been found by the service daemon. In general they
only appear during a device discovery.
----
you posted in another thread you can use that value to check how close is the remote device to the dongle who does inquiry. Maybe I'm wrong and that's not the correct value to check for this purpose?
Anyway the third parameter I read with the snipped code I posted is negative.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
---------------------------------
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
[-- Attachment #1.2: Type: text/html, Size: 2134 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-04-06 10:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 9:26 [Bluez-users] reading RSSI value with D-Bus Api Emanuele Novelli
2007-04-05 9:28 ` Marcel Holtmann
2007-04-05 9:36 ` Emanuele Novelli
2007-04-06 10:24 ` Mahtab Hossain
2007-04-06 10:24 ` Mahtab Hossain
2007-04-06 10:24 ` Mahtab Hossain
2007-04-06 10:45 ` Mahtab Hossain
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.