From owner-freebsd-bluetooth@FreeBSD.ORG Mon Jan 10 22:22:45 2005 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85B4716A4CE for ; Mon, 10 Jan 2005 22:22:45 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A9B443D48 for ; Mon, 10 Jan 2005 22:22:45 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45])j0AMMLvh013386; Mon, 10 Jan 2005 16:22:21 -0600 Received: from s228130hz1ew03.apptix-01.savvis.net ([10.146.4.28]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Mon, 10 Jan 2005 16:22:19 -0600 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew03.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Mon, 10 Jan 2005 16:22:14 -0600 Message-ID: <41E30011.2050005@savvis.net> Date: Mon, 10 Jan 2005 14:22:09 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jes References: <20050107163705.616cbe5f@zurich.homeunix.com> <41DECEA3.5080500@savvis.net> <20050107195406.0c76f42e@zurich.homeunix.com> <41DEE958.70403@savvis.net> <20050107223725.15a4554d@zurich.homeunix.com> <20050110163125.060d1e26@zurich.homeunix.com> <41E2C546.10801@savvis.net> <41E2E01C.2090003@savvis.net> <20050110224201.373ad571@zurich.homeunix.com> In-Reply-To: <20050110224201.373ad571@zurich.homeunix.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Jan 2005 22:22:14.0691 (UTC) FILETIME=[D644DF30:01C4F762] X-ECS-MailScanner: No virus is found cc: freebsd-bluetooth@freebsd.org Subject: Re: Motorola E1000 and obexapp 1.4.4 in server mode X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2005 22:22:45 -0000 Jes, >> can i ask you to try something else? basically its the same change >> as before, but you need to adjust a couple more variables. >> >> 1) edit /sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h file >> and change >> >> #define RFCOMM_DEFAULT_MTU 127 >> >> to >> >> #define RFCOMM_DEFAULT_MTU 667 >> >> >> 2) edit /sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h file >> and change >> >> #define NG_BTSOCKET_RFCOMM_SENDSPACE \ (RFCOMM_MAX_CREDITS * >> RFCOMM_DEFAULT_MTU * 10) #define NG_BTSOCKET_RFCOMM_RECVSPACE \ >> (RFCOMM_MAX_CREDITS * RFCOMM_DEFAULT_MTU * 10) >> >> to >> >> #define NG_BTSOCKET_RFCOMM_SENDSPACE \ (RFCOMM_MAX_CREDITS * >> RFCOMM_DEFAULT_MTU * 2) #define NG_BTSOCKET_RFCOMM_RECVSPACE \ >> (RFCOMM_MAX_CREDITS * RFCOMM_DEFAULT_MTU * 2) >> >> >> 3) re-compile ng_btsocket module, i.e. >> >> # cd /sys/modules/netgraph/bluetooth/socket/ # make depend # make # >> make install >> >> >> 4) reboot and try again > > > WoW ! now I get everything working ... Those changes are good, > tested with both motorola e1000 and sony ericsson z600, obexapp in > both server and client mode and rfcomm_pppd. thanks for trying this. i'm glad it works for you now. once again it sort of points finger back at the phone. i did not change any logic in my code. all i did is changed default mtu on *rfcomm* sessions to match default *l2cap* mtu. btw, rfcomm spec says default rfcomm mtu should be 127 bytes. i still did not find anything in the spec that says otherwise. right now i'm fairly convinced that there is something wrong in l2cap/rfcomm channel configuration process. what i do not know is who is at fault here. i need to have access to the phone in question. anyone willing to donate phone/money? :) just for the record here how the fix works - default l2cap mtu is 672 bytes - rfcomm packet header is 5 bytes so, assuming one rfcomm frame must fit entirely into one l2cap packet we get 672 - 5 = 667 default rfcomm mtu. the second change it just to ensure we do not reserve too much memory for socket's send and receive buffers. > Thanks a lot Max. thank you for your time and patience. max