Linux bluetooth development
 help / color / mirror / Atom feed
From: Fred Schaettgen <bluez-user@schaettgen.de>
To: bluez-users@lists.sourceforge.net
Subject: Re: [Bluez-users] implementing security mode 2 or 3
Date: Tue, 26 Apr 2005 11:53:08 +0200	[thread overview]
Message-ID: <200504261153.08434.bluez-user@schaettgen.de> (raw)
In-Reply-To: <426E0C5A.8060203@gmx.ch>

On Tuesday, 26. April 2005 11:39, Marco Trudel wrote:
> I've two rfcomm service running on different channels.
> I wish to have one channel authenticated/encrypted, the other
> unathenticated(unencrypted).
>
> As much as I know, that means that security mode 3 won't work, security
> mode 2 has to be used and I've to program this myself.
>
> Does this mean that I've to request authentication/encryption on incoming
> connections? 

Yes.

> How can I do that using bluez? 

int opt = RFCOMM_LM_AUTH | RFCOMM_LM_ENCRYPT;
setsockopt(s, SOL_RFCOMM, RFCOMM_LM, &opt, sizeof(opt));

> Will this provide less security/encryption than using security mode 3?

No, but you will need a recent kernel. For older kernels it will simply not 
work, and IIRC the call even failed silently without reporting an error in 
one kernel version. Can't remember which one it was though. 2.6.8 or 9 maybe?

Fred

-- 
Fred Schaettgen
bluez-devel@schaettgen.de


-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

  reply	other threads:[~2005-04-26  9:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-26  9:39 [Bluez-users] implementing security mode 2 or 3 Marco Trudel
2005-04-26  9:53 ` Fred Schaettgen [this message]
2005-04-26 15:22   ` Marco Trudel
2005-04-26 15:49     ` Marcel Holtmann
2005-04-26 15:58       ` Marco Trudel
2005-04-26 16:19         ` Marcel Holtmann
2005-04-26 16:42           ` Marco Trudel
2005-04-26 17:00             ` Marcel Holtmann
2005-04-26 17:32               ` Marco Trudel
2005-04-27  8:55                 ` Marco Trudel
2005-04-27 10:41                   ` Marcel Holtmann
2005-04-27 11:28                     ` Marco Trudel
  -- strict thread matches above, loose matches on Subject: below --
2005-04-25 14:35 Marco Trudel

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=200504261153.08434.bluez-user@schaettgen.de \
    --to=bluez-user@schaettgen.de \
    --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