* L2cap bind - invalid argument
@ 2012-04-12 20:03 Franko Danielos
2012-04-13 8:40 ` Johan Hedberg
0 siblings, 1 reply; 3+ messages in thread
From: Franko Danielos @ 2012-04-12 20:03 UTC (permalink / raw)
To: linux-bluetooth
Hello
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?
Thank you
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: L2cap bind - invalid argument
2012-04-12 20:03 L2cap bind - invalid argument Franko Danielos
@ 2012-04-13 8:40 ` Johan Hedberg
2012-04-13 12:07 ` Franko Danielos
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2012-04-13 8:40 UTC (permalink / raw)
To: Franko Danielos; +Cc: linux-bluetooth
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: L2cap bind - invalid argument
2012-04-13 8:40 ` Johan Hedberg
@ 2012-04-13 12:07 ` Franko Danielos
0 siblings, 0 replies; 3+ messages in thread
From: Franko Danielos @ 2012-04-13 12:07 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
Hi Johan,
Thank you for your response. Now I know that I should read more about
bluetooth technology.
Regards,
Danielos
Dnia 2012-04-13, pią o godzinie 11:40 +0300, Johan Hedberg pisze:
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-13 12:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 20:03 L2cap bind - invalid argument Franko Danielos
2012-04-13 8:40 ` Johan Hedberg
2012-04-13 12:07 ` Franko Danielos
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.