From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 3 10:53:56 2004 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 EFE8116A4CE for ; Wed, 3 Mar 2004 10:53:56 -0800 (PST) Received: from web40312.mail.yahoo.com (web40312.mail.yahoo.com [66.218.78.91]) by mx1.FreeBSD.org (Postfix) with SMTP id E684143D2F for ; Wed, 3 Mar 2004 10:53:56 -0800 (PST) (envelope-from m_evmenkin@yahoo.com) Message-ID: <20040303185356.54129.qmail@web40312.mail.yahoo.com> Received: from [66.35.239.94] by web40312.mail.yahoo.com via HTTP; Wed, 03 Mar 2004 10:53:56 PST Date: Wed, 3 Mar 2004 10:53:56 -0800 (PST) From: Maksim Yevmenkin To: zhangweiwu@realss.com, freebsd-bluetooth@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: bluetooth channels -- not very clear on concept 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: Wed, 03 Mar 2004 18:53:57 -0000 Hello, [...] > > > sometimes when other people are connected, I use "rfcomm_pppd > > > -c -C LAN -l bluetooth-client" and get "no socket available" prompt, > then I > > > use "rfcomm_pppd -c -C 1 -l bluetooth-client" and it works. > > > >hmmm... is that the exact command you using? in client mode (-c) you need > >to specify the address of the server to connect to (-a) otherwise it will > >not work. also what does "no socket available" is that the error you are > >getting? > > Sorry I wasn't clear. Here is the script(1) to produce the problem: > > thinkpad# rfcomm_pppd -c -a 00:04:61:80:6f:e4 -C LAN -l bluetooth > rfcomm_pppd: Could not obtain RFCOMM channel: Socket is not connected > thinkpad# rfcomm_pppd -c -a 00:04:61:80:6f:e4 -C 1 -l bluetooth > thinkpad# ifconfig tun0 > tun0: flags=8051 mtu 1500 > inet 192.168.0.87 --> 192.168.0.120 netmask 0xffffffff > Opened by PID 47776 ok. that tells me that you are having a problem with SDP. when you specify -C LAN rfcomm_pppd(8) will try to query remote server from RFCOMM channel. for whatever reason the server did not respond to client's SDP query. when you run rfcomm_pppd(8) with -C 1 it does not use SDP and connects directly to the RFCOMM channel 1. i need to look at hcidump(1) output. > MAC OS and Windows doesn't ask for Channel number. They recognize LAN and > connect to channel 1. Linux user always gets refused. (so strange the Linux > bluetooth LAN tool pand(1) don't have a parameter to specify what channel > to connect to.) well, think about it :) how would MAC OS and Windows would know which RFCOMM channel to use? the only way to find out is to send SDP query to the server and ask if the server provides LAN service. so both MAC OS and Windows *do* ask for RFCOMM channel number. Linux tools do the same. it seems that you have the same problem on FreeBSD and Linux when you try to use SDP. > > > Sometimes (not very frequently) iBook disconnects and cannot connect > > > anymore unless the > > > bluetooth ppp server restart. (Windows notebook no problem.) Is it > because > > > >that is strange. i'd like to take a look at hcidump output. you will need > >to download it from http://www.geocities.com/m_evmenkin/ > > Do you mean your homepage? You forgot I am in China I cannot go to > geocities. To help me you sent me your sdp package through email a week > ago:) ok. i will send you the tarball. compile and intall it. then run as root # hcidump -w rfcomm.dump and in another window try to # rfcomm_pppd -c -a 00:04:61:80:6f:e4 -C LAN -l bluetooth then interrupt (with ^C) hcidump(1) and send me the rfcomm.dump file. BTW Linux users should have hcidump tool. it should be compatible with the one from FreeBSD. it would be nice to have Linux dump as well. > Today the iBook problem is (I guess) solved. I found this line in ppp.log: > Mar 3 10:59:34 dino ppp[2274]: Phase: deflink: ** Too many ECHO LQR > packets lost ** > I disabled lqr, the iBook don't have the problem any more. ok. thanks, max __________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com