Linux bluetooth development
 help / color / mirror / Atom feed
From: Mahtab Hossain <mahtab_hossain2002@yahoo.com>
To: bluez-users@lists.sourceforge.net
Subject: [Bluez-users] hci_read_rssi command
Date: Mon, 9 Jan 2006 01:25:36 -0800 (PST)	[thread overview]
Message-ID: <20060109092540.65589.qmail@web50506.mail.yahoo.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2272 bytes --]

 Dear Users,
 My project is to work with rssi/tpl/lq. My initial goal is to read them and show them graphically with some handy features!
 
 I have gone through hcitool.c (most of the code) and tried to exactly copy the necessary things only to retrieve RSSI. But, I couldn't call "hci_read_rssi" as them. Compiling my program gave this error:
 
 mySignalScan.c:102: warning: implicit declaration of function `hci_read_rssi'
 mySignalScan.c: At top level:
 /tmp/cc4x36ri.o(.text+0x25b): In function `cmd_rssi':
 : undefined reference to `hci_read_rssi'
 collect2: ld returned 1 exit status
 
 I couldn't find "hci_read_rssi" function listed in my current "hci_lib.h" header file. I have exactly all the header files added as in "hcitool.c".  hcitool works just fine and gives me the values (e.g. rssi, lq). But my aim is to have those values in my program so that, I can use them in my desired way! I wonder how hcitool could call "hci_read_rssi" file and I can't.
 
 I tried to write my "hci_read_rssi" function stated exactly the same way as in "hci.c". But my program gives this error while run and couldn't retrieve RSSI:
 
 Read RSSI failed: Input/output error
 
 Upto calling to "my_hci_read_rssi" (my function imitating the main hci_read_rssi function), all the things are alright. I checked the connection information and printed them out:
 
 Device name: Mahtab
 Device Address: 00:13:70:C3:88:37
 Handle: 6
 Role: 1
 Direction: 1
 Link mode: 5
 State: 1
 ** These were also exactly the same values shown by my KDE-bluetooth utilities about the connection.
 
 I made the connection with the following command:
 rfcomm connect 0 00:13:70:C3:88:37
 Connected /dev/rfcomm0 to 00:13:70:C3:88:37 on channel 1
 Press CTRL-C for hangup
 
 hcidump shows exactly the same sequence for both my program and while ran
 "hcitool rssi 00:13:70:C3:88:37".
 
 My Program:
 < HCI Command: Read RSSI (0x05|0x0005) plen 2
 > HCI Event: Command Complete (0x0e) plen 7
 
 hcitool rssi 00:13:70:C3:88:37:
 < HCI Command: Read RSSI (0x05|0x0005) plen 2
 > HCI Event: Command Complete (0x0e) plen 7
  
 Right now, I am stuck. I will appreciate any suggestions.
 Thanks
 Mahtab
 
 
 

		
---------------------------------
 Yahoo! DSL Something to write home about. Just $16.99/mo. or less

[-- Attachment #2: Type: text/html, Size: 2561 bytes --]

             reply	other threads:[~2006-01-09  9:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-09  9:25 Mahtab Hossain [this message]
2006-01-10 16:09 ` [Bluez-users] hci_read_rssi command Marcel Holtmann
2006-01-11  6:45   ` Mahtab Hossain
2006-01-11  8:33     ` Marcel Holtmann

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=20060109092540.65589.qmail@web50506.mail.yahoo.com \
    --to=mahtab_hossain2002@yahoo.com \
    --cc=bluez-users@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox