Return-Path: Date: Sat, 22 Nov 2014 20:15:05 +0200 From: Johan Hedberg To: Gilles =?iso-8859-1?Q?Gr=E9goire?= Cc: Arman Uguray , BlueZ development Subject: Re: Where in the code is a BLE connection accepted? Message-ID: <20141122181505.GA14692@t440s.P-661HNU-F1> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Gilles, On Sat, Nov 22, 2014, Gilles Gr?goire wrote: > I still find this a bit surprising: when using an l2capSocket, I still > have to listen() and accept() the connection. One would expect that > without anyone accept()'ing, the connection is not accepted! E.g. ATT uses a fixed L2CAP channel, i.e. there is no L2CAP signaling involved to establish it. Instead the channel is implicitly available once the baseband link becomes available (i.e. through the LE Connection Complete HCI event). There's therefore nothing to accept or reject as as far as a fixed channel like ATT is concerned. If you were doing Connection oriented Channels which have an actual L2CAP Connect request/response pair the socket accept() would indeed map to the L2CAP Connect Response. Johan