.NET Components for Mobility

RSSI values issue ???

Last post 04-01-2009 5:52 AM by alanjmcf. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 10-31-2007 2:10 PM

    RSSI values issue ???

    On my HTC Trinity BthReadRSSI (http://msdn2.microsoft.com/en-us/library/aa916821.aspx) is supported and returns a value in range 0-255. How can i map this value correctly to the Bluetooth specification which defines the signal strength in -127 - 128 range ! If the RSSI is within the Golden Receiver Range, HCI_Read_RSSI returns the zero. If the RSSI is below the Golden Receiver Range lower limit, HCI_Read_RSSI returns a negative value. If the RSSI is above the Golden Receiver Range upper limit, HCI_Read_RSSI returns a positive value. Is it right to convert the byte in sbyte ???
  • 11-01-2007 8:47 AM In reply to

    Re: RSSI values issue ???

    Yup looks like from the MSDN documentation that the value returned is actually a signed char.  However the text is a bit confused, e.g. mentioning "USHORT" at one place.  For complete certainty it would be better to double check, can you do some testing locally.  I don't have any device that supports that method, and I think Peter doesn't either.  Move a remote device to various distances away and see what values the method reports.  Otherwise give Microsoft developer support a call -- hopefully they will refund any charge as its a sensible question...

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 11-01-2007 11:31 AM In reply to

    Re: RSSI values issue ???

    Hi Alan, BluetoothDeviceInfo.Rssi returns a System.Byte So the value is always positive in range 0-255. After testing with my device, i realised that to get a bluetooth specification conform value within the range -127 and 128,i had to convert the byte to sbyte. System.Convert will throw overflow exception, so i suggest to use unchecked((sbyte)bdi.Rssi) In my tests,i was getting values in range of -16 (240) to +24(24). This behaviour looks now to be OK since the hardware manufacturers are free in implementing the negative and positive scaling of the RSSI values out of the Golden Receiver Range. I have added the post in MSDN forums as well..
  • 11-02-2007 11:23 AM In reply to

    Re: RSSI values issue ???

    Thanks for your feedback. I'll look into changing the property to return a signed type. I'm still looking for a device to actually test the values for myself :-)

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 11-13-2007 3:01 AM In reply to

    Re: RSS Bluetooth Application

    hi everyone,ı want to develop a project for a digital museum system.This system will send to visitor some  information for example mp3 which will describe city information.the visitor who has pocket pc shuold understand which bluetooth transmitter.because pocket pc  should take nearest bluetooth device information.In this way this is my first application on over blueetoth so Can you suggest me any information,documancation etc.

     

  • 11-16-2007 5:37 AM In reply to

    Re: RSS Bluetooth Application

    I didn't see your message as it was not in a new thread but at the end of an old one...

    Documentation, see the user's guide (to be included in the next release) at http://www.codeplex.com/32feet/SourceControl/DirectoryView.aspx?SourcePath=%24%2f32feet%2fInTheHand.Net.Personal%2fReadme&changeSetId=28542  See the samples included in the download.

    You'll want to do discovery in a loop retrying every so often, and do an OBEX push to the devices that you haven't seen before.  There could be ways to be informed when a different set of devices are discoverable -- but that's mucho advanced so do the loop for now.

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 11-16-2007 8:00 AM In reply to

    Re: RSSI values issue ???

    I'm developping an app for Symbol MC35, and it seems to support the rssi property too!

  • 03-08-2009 5:51 AM In reply to

    • koksun
    • Top 500 Contributor
    • Joined on 02-16-2009
    • Posts 3

    Re: RSSI values issue ???

    Hi, my i see your code on the rssi part? thanks

  • 03-08-2009 10:55 AM In reply to

    Re: RSSI values issue ???

    The Rssi property is on BluetoothDeviceInfo, see http://inthehand.com/library/html/P_InTheHand_Net_Sockets_BluetoothDeviceInfo_Rssi.htm  But that's a little out of date currently we return int.MinValue on error (e.g. if not supported; device not present/connected etc).  If you want to see the internal workings download the sources from our repository at http://www.codeplex.com/32feet/SourceControl/ListDownloadableCommits.aspx

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 03-26-2009 3:55 AM In reply to

    • koksun
    • Top 500 Contributor
    • Joined on 02-16-2009
    • Posts 3

    Re: RSSI values issue ???

    hi, i had read the links you provided. however, i cannot catch anything from there. sorry of it..

    here is my system code: 

    '==================================================================================================== 

    Imports System
    Imports System.Net
    Imports System.IO
    Imports System.Net.Sockets
    Imports InTheHand.Net.Sockets

    Public Class Form1

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        End Sub
        Public ReadOnly Property Rssi() As Integer

            Get
                Label2.Text = "test test"
                Try
                    Dim btClient As New BluetoothClient

                    Dim bdi As BluetoothDeviceInfo() = btClient.DiscoverDevices(1)

                    For Each device As BluetoothDeviceInfo In bdi
                        'Add the array item to the list
                        System.Console.WriteLine(device.Rssi)
                        Label1.Text = device.Rssi
                        Label2.Text = "test"

                    Next
                Catch ex As Exception
                    Return False

                End Try
            End Get
        End Property
      

    End Class

    '====================================================================================================

    may i know where is the problem of my code?

    i had test it with a pda but the result is nothing. no error, no output.

    can u please help me to check on my code? do i miss some steps for setting?

    thank you.

  • 03-27-2009 10:28 AM In reply to

    Re: RSSI values issue ???

    Download the library sources, compile the library for your platform (...CF2), reference that library in your app, and debug.  Set a breakpoint on the Rssi property and step through it and see what happens.  What error route does it take?  MissingMethodException, or error!=0?

    Get the sources from http://32feet.codeplex.com/SourceControl/ListDownloadableCommits.aspx

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 03-29-2009 2:31 AM In reply to

    • koksun
    • Top 500 Contributor
    • Joined on 02-16-2009
    • Posts 3

    Re: RSSI values issue ???

    Hi, There are many sources in the link provided by you, I had downloaded the Change Set 47830.

    As your advice to compile the library for the platform (...CF2), then i try run the file in the folder.

    32feet-47803 -> InTheHand.Net.Personal_Widcomm -> InTheHand.Net.Personal.CF2 (folder) -> InTheHand.Net.Personal.CF2 (Visual C# Project file)

    However, there are a lot of errors while i opening it, include:

    1. The project "InTheHand.Net.Personal.FX2" is under course control. An error occured registering this project with source control. It is recommended that you do not make any changes to this project.

    2. The solution appears to be under source control, but its binding information cannot be found. It is possiblt that the MSSCCPRJ.SCC file or another item that holds the source control settings for the solution, has been deleted. Because it is not possible to recover this missing infromation automatically, the project whose binding are missing will be treated as not under source control.

    3. Error retrieving information from user datastore. Platform Not found.

    4. The project could not be opened because it refers to a device platform that does not exist in your datastore.

    5. Unexpected error encountered. It is recommeded that you restart the application as soon as possible. Error: Unspecified error File: vsee\lib\vapifunctionwrapper\vapvapifunctionwrapper.cpp Line number: 169

    6. One or more projects in the solution could not be loaded for the following reason(s): The application for the project is not installed. These project will be labeled as unavailable in Solution Explorer. Expand the project node to show the reason the project could not be loaded.

    My questions are:

    1. Is the change set 47830 is the correct library source for me to do the bluetooth rssi?

    2. How should I compile the library source? Sorry for I am still very blur with the 32feet .net. Hope you can help me to learn it and solve my problem.

    Thank you.

  • 04-01-2009 5:52 AM In reply to

    Re: RSSI values issue ???

    Yikes!  That's no fun!

    For 1 and 2, just click the button that disables source-code control.  For the others, is it possible you have a version of VisualStudio that doesn't support NETCF?  Are you compiling your application there itself?  If you do File->NewProject do you see "Smart Device" project types listed?

    1. Any changeset should do.

    2. I'm worried about 3 and 4 etc...

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
Page 1 of 1 (13 items)
Copyright © 2001-2010 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.