Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2004 10:53:56 -0800 (PST)
From:      Maksim Yevmenkin <m_evmenkin@yahoo.com>
To:        zhangweiwu@realss.com, freebsd-bluetooth@freebsd.org
Subject:   Re: bluetooth channels -- not very clear on concept
Message-ID:  <20040303185356.54129.qmail@web40312.mail.yahoo.com>
In-Reply-To: <LAW11-F70STOk0gaPEl0003aede@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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<UP,POINTOPOINT,RUNNING,MULTICAST> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040303185356.54129.qmail>