2008-07-08 17:19:42

by Bram Jansen

[permalink] [raw]
Subject: [Bluez-users] Can't connect RFCOMM socket: Host is down

Hi,



I've been browsing the web for a while now and I can't find a solution to my
problem.



I'm trying to connect my Debian Etch box to the DUN service to any phone I
have. For some reason rfcomm isn't happy and is not able to make a
connection.



I've tried the following



1. passkey-agent -default 0000
2. hcitool cc <bdaddr>
3. hcitool auth <bdaddr>

a. pairing succeeded and my box are in the phones's paired devices list


4. rfcomm bind <bdaddr> 1 (channel is correctly found with sdptool)
works fine but gives a strange bdaddr for the phone it binds to.

a. rfcomm0: 01:00:00:00:00:00 channel 1 clean



for some reason only one time the correct Bluetooth address of one of my
phones was there but I'm not able to reproduce it.



Can anyone please point me in the right direction about why after the above
steps I only see the following line when I type



rfcomm show rfcomm0



I get the result

rfcomm0: 01:00:00:00:00:00 channel 1 clean



and not

rfcomm0: <bdaddr> channel 1 clean



thanks in advance,



Bram




Attachments:
(No filename) (347.00 B)
(No filename) (164.00 B)
Download all attachments

2008-07-10 17:24:01

by jayjwa

[permalink] [raw]
Subject: Re: [Bluez-users] Can't connect RFCOMM socket: Host is down


On Tue, 8 Jul 2008, Bram Jansen wrote:

-> I'm trying to connect my Debian Etch box to the DUN service to any phone I
-> have. For some reason rfcomm isn't happy and is not able to make a
-> connection.

-> 1. passkey-agent -default 0000
-> 2. hcitool cc <bdaddr>
-> 3. hcitool auth <bdaddr>
->
-> a. pairing succeeded and my box are in the phones's paired devices list
->
->
-> 4. rfcomm bind <bdaddr> 1 (channel is correctly found with sdptool)
-> works fine but gives a strange bdaddr for the phone it binds to.
->
-> a. rfcomm0: 01:00:00:00:00:00 channel 1 clean

Not sure if there are typo's or not here, but those aren't the correct command
syntaxes as-written.

I'm assuming you have a phone that has a modem inside and is advertising the
DUN service via bluetooth and you'd like to make the computer connect to the
phone and cause the modem to dial out, taking the connection for the computer?
This is the case with my LG cellphone. There are two ways, with the dund
binary handling rfcomm itself, or with you calling the rfcomm binary to get
the device, then giving that to pppd.


passkey-agent --default <PIN> <bt addr> &
auth-agent &
rfcomm bind 0 <bt addr> 1
(to bind chan. 1 at /dev/rfcomm0. )

Then use /dev/rfcomm0 for the pppd connection. If I remember correctly, you
don't have to do the 'hcitool cc/auth' part at all.






-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-07-09 09:28:21

by Bram Jansen

[permalink] [raw]
Subject: Re: [Bluez-users] Can't connect RFCOMM socket: Host is down

Hi Johan,

This did the trick.
Thanks a lot.

Regards,

Bram

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Johan
Hedberg
Sent: 08 July 2008 19:38
To: BlueZ users
Subject: Re: [Bluez-users] Can't connect RFCOMM socket: Host is down

Hi Bram,

On Jul 8, 2008, at 20:19, Bram Jansen wrote:
> Can anyone please point me in the right direction about why after
> the above steps I only see the following line when I type
>
> rfcomm show rfcomm0
>
> I get the result
> rfcomm0: 01:00:00:00:00:00 channel 1 clean
>
> and not
> rfcomm0: <bdaddr> channel 1 clean

That's because (as the man-page states) the parameters to rfcomm bind
are:
rfcomm bind <dev> <bdaddr> <channel>

Where <dev> is the number of the device node you want to use (e.g. 0
for rfcomm0).

If you give the command as you do the rfcomm tool will interpret your
bdaddr as the device node number (atoi(00:...") will yield 0) and 1 as
the remote address (which is why you see "01:00:...") and use the
channel 1 which is the default when no channel has been specified.

Johan

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-07-08 17:37:59

by Johan Hedberg

[permalink] [raw]
Subject: Re: [Bluez-users] Can't connect RFCOMM socket: Host is down

Hi Bram,

On Jul 8, 2008, at 20:19, Bram Jansen wrote:
> Can anyone please point me in the right direction about why after
> the above steps I only see the following line when I type
>
> rfcomm show rfcomm0
>
> I get the result
> rfcomm0: 01:00:00:00:00:00 channel 1 clean
>
> and not
> rfcomm0: <bdaddr> channel 1 clean

That's because (as the man-page states) the parameters to rfcomm bind
are:
rfcomm bind <dev> <bdaddr> <channel>

Where <dev> is the number of the device node you want to use (e.g. 0
for rfcomm0).

If you give the command as you do the rfcomm tool will interpret your
bdaddr as the device node number (atoi(00:...") will yield 0) and 1 as
the remote address (which is why you see "01:00:...") and use the
channel 1 which is the default when no channel has been specified.

Johan

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users