From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] HCI connection_handle
Date: Sat, 27 Nov 2004 20:58:49 +0100 [thread overview]
Message-ID: <1101585529.27074.18.camel@pegasus> (raw)
In-Reply-To: <2de46576041127045238dc2264@mail.gmail.com>
Hi Manjunath,
> I am trying to use the "hcitool cmd" options and i have to pass the
> connection_handle as a command parameter.
> root:]#hcitool con
> < ACL 00:0B:0D:31:D1:BA handle 7 state 1 lm MASTER
>
> Assuming the connection_handle to be 7, i tried to read the rssi value
>
> root:]#hcitool cmd 0x05 0x0005 0x0007
> I get the following
>
> < HCI Command: ogf 0x05, ocf 0x0005, plen 1
> 07
> > HCI Event: 0x0e plen 4
> 01 05 14 12
>
> This means there is some error as i have got 12 instead of 00......
>
> Can you tell me what the problem is??
the problem is that you should read the HCI specification if you wanna
play with the "hcitool cmd ..." call. The handle is a 16 bit value. And
btw error code 0x12 means invalid parameters.
However the RSSI can be read with "hcitool rssi ..." and this code also
does the handle lookup for you.
> 2) I tried using the test mode commands and I am simulatameously
> running the hcidump, which prints a unknown command type. I am just
> presuming that the commands might be working alright , only that
> hcidump doesn't decipher the test commands. Am i right??
What version of hcidump do you use? Show the undecoded output to us.
> 3) I was also trying to understand the hcitool.c code , can you tell
> me where the functions "hci_for_each_device" and the like defined?
Actually you can do this by yourself. Look at the bluez-libs and
bluez-utils source code. Maybe using grep is a good idea ;)
Regards
Marcel
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
next prev parent reply other threads:[~2004-11-27 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-27 12:52 [Bluez-users] HCI connection_handle Manjunath Prabhu
2004-11-27 19:58 ` Marcel Holtmann [this message]
2004-11-29 13:09 ` Manjunath Prabhu
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=1101585529.27074.18.camel@pegasus \
--to=marcel@holtmann.org \
--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