From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 12 23:53:33 2012 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB8C3C48 for ; Fri, 12 Oct 2012 23:53:33 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id BA3218FC0C for ; Fri, 12 Oct 2012 23:53:33 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so3630456pbb.13 for ; Fri, 12 Oct 2012 16:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BLqeXH0Ze1sfviN9LVaTneBnLLG5V6NbowLq5j4TTD0=; b=yqoNj8CdkRN1dLNsxLmumOMjVhyKihKc0VKADR0Bj4bl2P9nNx9EoxS4N+CrrUrQBe EvIW5knRXmQbXLhHVxsws+2w6m/UAAvj5o7gRsi00Uys3+ku7sT9w3bze6PaXRz/i0KD 6IaD+LOVogOfXzsYkVE1O99IxrQqOgHauUdDjhxhHMHw/P0bwApDROAJo144pmWSiaY7 BANTAlAb+JcKeakfoVVWmZgzOSXVZrEOTrrBmXS/VfRaPBARKDzEh5BP3EbFqz91x60T nL5sP8pLxrpg42eAgUeMF6MiAK+3KXzGkXh+wDDhC9PknfOmXAa91H0aA49roi4bP9Iw yp5A== MIME-Version: 1.0 Received: by 10.66.77.199 with SMTP id u7mr15158196paw.7.1350086013405; Fri, 12 Oct 2012 16:53:33 -0700 (PDT) Received: by 10.68.240.38 with HTTP; Fri, 12 Oct 2012 16:53:33 -0700 (PDT) In-Reply-To: References: <507736A8.4050605@incore.de> <5077490F.7010901@incore.de> <50782E05.5080005@incore.de> Date: Fri, 12 Oct 2012 16:53:33 -0700 Message-ID: Subject: Re: btpand problem From: Maksim Yevmenkin To: Iain Hibbert Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-bluetooth@freebsd.org, Andreas Longwitz X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2012 23:53:34 -0000 On Fri, Oct 12, 2012 at 3:21 PM, Iain Hibbert wrote: > On Fri, 12 Oct 2012, Andreas Longwitz wrote: > >> > Is this more than one connection, can you show the entire dump? (the first >> > one is a rsp from the other side, then it sends a req later..?) >> >> I have only one connection: the dump gives the output of the command >> btpand -a panserver -d me -s NAP -i tap1. Full dump: > > yes, there are two L2CAP connections :) > > the first is to do the SDP query, then it sets up the BNEP link. And, it > seems that the BNEP link has been set up with a MTU/MRU of 1691 as > it should have.. > >> Yes, I used the code fragment >> >> { >> uint16_t mtu; >> socklen_t len = sizeof(mtu); >> getsockopt(chan->fd, SOL_L2CAP, SO_L2CAP_OMTU,&mtu,&len); >> log_err("writev: %m (mtu %d)\n", mtu); >> } >> >> and found mtu=1691 in all cases (ok or failed), same for SO_L2CAP_IMTU. > > I see, so it seems that the kernel is returning EMSGSIZE when trying to > send a packet that is greater than L2CAP_MTU_DEFAULT.. > > you could build the bluetooth netgraph code with debugging turned on, and > see if that kicked anything out about where the error is returned from.. > The most obvious place to look at could be ng_btsocket_l2cap_send(), if > that is the one, is pcb->omtu the correct value? there should be sysctl knobs to increase debug level for sockets and ng messages for ng nodes. so, yes, please try to increase debug level for l2cap nodes and sockets and see if anything pops up thanks, max