rssi issues

Help
2008-02-18
2013-04-26
  • Chris Weiss
    Chris Weiss
    2008-02-18

    I've got an ATT 2125, which is HTC tornado based windows mobile phone.  BT in general work great, headset works at least 15ft away even through walls.  I have a cheapy bt dongle on a desktop, and a scan picks it up as well as a sales guys's phone about 50ft away. 

    however, the distance reading I'm getting with my phone is negative only with "min" of about -30 when holding the phone right next to the dongle and 0 being about 3ft away. 

    running hcitool rssi I can see the numbers go from 0 to about 30, with a higher number closer to the dongle and again 0 at about 3 ft away.

    what can I do to get a rssi number that's useful?

     
    • Hi Chris,

      actually this can be considered a bug in BlueProximity. The rssi values are given by the bluetooth driver in  reference to the bluetooth adapter. When I created BlueProximity my bluetooth driver would only give me negative values so I thought it would make sense to multiply with minus one to get a nice value.
      The GUI does not let you enter negative values for the distance by default so you need a little patching:
      1. Stop BlueProximity
      2. open the file 'proximity.py' with an editor of choice (and the rights to change the file)
      3. change line 143 to
          'lock_distance=integer(-30,127,default=7)',
         (changed the 0 to -30 here)
      4. change line 145 to
          'unlock_distance=integer(-30,127,default=4)',
         (dito)
      5. save the file
      6. open the file 'proximity.glade' with an editor of choice
      7. change line 889 to
                        <property name="adjustment">0 -30 127 1 1 0</property>
         (changed again the second 0 to -30)
      8. change line 931 to
                        <property name="adjustment">0 -30 127 1 1 0</property>
         (dito)
      9. save the file
      10. start BlueProximity again
      You should now be able to set negative values up to -30 in the distance settings.

      Have fun,
      Lars

       
    • Chris Weiss
      Chris Weiss
      2008-02-20

      right, and that's the easy part, but I don't even get as far as being able to get useful enough values to set anything.

      the issue is, the rssi values range from about 30 to 0 with 30 being closest and 0 being less than a meter a away, less than the distance from my PC to my hip.  bluetooth works on the other side of the room, but the rssi value is always zero unless I hold the phone right next to the dongle.

       
    • Ouch, that sounds bad. The problem is rssi values are never used in the protocols but does affect internal stuff so the values that are spit out don't have to be sane... We could check if LinkQuality gives better results. Please try the following command while moving away for about 30 secs and comming slowly back during the next 30 secs. Move at least to the distance you think locking should accur.

      BTADD=PUTYOURADDRESSHERE for i in `seq 30`; do hcitool rssi $BTADD; hcitool lq $BTADD; sleep 1; done

      and post the output please. Let's see if we can do some different magic on your setup...

      Bye
      Lars

       
    • Chris Weiss
      Chris Weiss
      2008-02-20

      lq was always 255, no matter what.  maybe I just have a crappy old dongle...

       
      • Hm, sad to say so but at least your dongle not 'blueproximitable'. What if you cover your phone with tin foil? ;-)

        Bye
        Lars