From: Johan Hedberg <johan.hedberg@gmail.com>
To: Franko Danielos <danielos@zawiercie.net.pl>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: L2cap bind - invalid argument
Date: Fri, 13 Apr 2012 11:40:03 +0300 [thread overview]
Message-ID: <20120413084003.GA9229@x220> (raw)
In-Reply-To: <1334261010.32169.14.camel@dhj-danielos>
Hi Franko,
On Thu, Apr 12, 2012, Franko Danielos wrote:
> When I try to follow example from this site
> http://people.csail.mit.edu/albert/bluez-intro/x559.html
> I have an error while trying to bind. Error message is invalid argument.
> My question: is it related with newest bluetooth or kernel?
>
> I use linux mint 12.
> Linux Kernel version 3.0.0 (but the same applies to 3.2.x)
> Bluez version: 4.96
>
> I tested it also on earlier version of Linux Mint with kernel 2.6.32 and
> bluez 4.66 and that example works.
> Any ideas?
That would be because the PSM value in the example is not valid. Newer
kernels (post 2.6.32) check for this properly:
/* PSM must be odd and lsb of upper byte must be 0 */
if ((psm & 0x0101) != 0x0001) {
err = -EINVAL;
goto done;
}
Johan
next prev parent reply other threads:[~2012-04-13 8:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 20:03 L2cap bind - invalid argument Franko Danielos
2012-04-13 8:40 ` Johan Hedberg [this message]
2012-04-13 12:07 ` Franko Danielos
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=20120413084003.GA9229@x220 \
--to=johan.hedberg@gmail.com \
--cc=danielos@zawiercie.net.pl \
--cc=linux-bluetooth@vger.kernel.org \
/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