All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Singer <steven.singer@csr.com>
To: bluez-users@lists.sourceforge.net
Subject: Re: [Bluez-users] Odd inquiry scan result
Date: Wed, 29 Jun 2005 18:28:29 +0100	[thread overview]
Message-ID: <42C2DA3D.3020808@csr.com> (raw)
In-Reply-To: <20050629163820.10206.qmail@web30711.mail.mud.yahoo.com>

Olivier Randriamanana wrote:
>> HCI Event: 0x0e plen 8
>   01 1D 0C 12 00 00 00 00

Event 0e:    Command Complete
01:          num_hci_command_packets = 1
1D 0C:       Opcode 0x0c1d = Read Inquiry Scan Activity
12:          Status = Invalid HCI command parameters !
00 00 00 00: Parameters = not valid as there was an error !

See the 10 commandments of C by Henry Spencer at:

  http://www.lysator.liu.se/c/ten-commandments.html

Commandment 6:

  If a function be advertised to return an error code in the event of
  difficulties, thou shalt check for that code, yea, even though the
  checks triple the size of thy code and produce aches in thy typing
  fingers, for if thou thinkest ``it cannot happen to me'', the gods
  shall surely punish thee for thy arrogance.

In this case for "function ... return" read "event ... contain".

[...]
>   len = READ_INQ_ACTIVITY_RP_SIZE;
[...]
>   if (hci_send_cmd(dd, ogf, ocf, len, ptr /*buf*/) < 0) {

Would I be right in thinking that READ_INQ_ACTIVITY_RP_SIZE is the
size of the response and not the size of the command?

You should be passing the size of the command parameters (0) here.

Confirm that the command that was sent was correct by looking at an
hcidump log.

	- Steven
-- 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

  reply	other threads:[~2005-06-29 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-29 16:38 [Bluez-users] Odd inquiry scan result Olivier Randriamanana
2005-06-29 17:28 ` Steven Singer [this message]
2005-06-29 17:55   ` 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=42C2DA3D.3020808@csr.com \
    --to=steven.singer@csr.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 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.