View previous topic :: View next topic |
Author |
Message |
szczerb Veteran

Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Tue Sep 16, 2008 3:01 pm Post subject: bluetooth "Can't connect RFCOMM socket: Connection refu |
|
|
I'm not sure if it's the right forum for that - if not please move it.
I have lots of guides on connecting bluetooth devices. I need to use my phone as a gprs modem and bluetooth is the only avaialable connection (since I don't have a cable for it).
This is what I get:
Code: | nomad szczerb # rfcomm
rfcomm0: 00:12:37:AC:32:68 channel 1 clean
nomad szczerb # rfcomm connect 0
Can't connect RFCOMM socket: Connection refused
nomad szczerb # rfcomm
rfcomm0: 00:12:37:AC:32:68 channel 1 clean |
l2ping works just fine.
hcid.conf
Code: | #
# HCI daemon configuration file.
#
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
security auto;
# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;
# Default PIN code for incoming connections
passkey "131186";
}
# Default settings for HCI devices
laptop device {
# Local device name
# %d - device id
# %h - host name
name "%h (%d)";
# Local device class
class 0x3e010c;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept;
# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;
} |
input.conf
Code: | # Configuration file for the input service
# This section contains options which are not specific to any
# particular interface
[General]
# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)
#IdleTimeout=30 |
rfcomm.conf
Code: | #
# RFCOMM configuration file.
#
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device 00:12:37:AC:32:68;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment "Sagem myX6-2";
} |
Code: | nomad szczerb # ls -l /dev/rfcomm0
crw-rw-rw- 1 root uucp 216, 0 IX 16 14:45 /dev/rfcomm0 |
Pairing works just fine so I don't post my /etc/bluetooth/pin
If some guide mentions this problem, it is always resolved by unpairing and pairing again. I have tried it many times with restarts etc.
Anyone has some ideas? |
|
Back to top |
|
 |
kernelhacker n00b

Joined: 18 Feb 2004 Posts: 27
|
Posted: Tue Sep 16, 2008 9:51 pm Post subject: Re: bluetooth "Can't connect RFCOMM socket: Connection |
|
|
Hi,
szczerb wrote: | I'm not sure if it's the right forum for that - if not please move it.
I have lots of guides on connecting bluetooth devices. I need to use my phone as a gprs modem and bluetooth is the only avaialable connection (since I don't have a cable for it).
[SNIP]
Anyone has some ideas? |
Sounds like you have got the same problem as me and your bluetooth services get stopped when a new device is connected and your /dev/rfcomm0 gets accessed. I "fixed" it like this:
in /etc/udev/rules.d/70-bluetooth.rules i changed:
Code: | SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*" , RUN+="bluetooth.sh" |
to
Code: | SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*" |
So the bluetooth.sh script does not get called by udev anymore and /etc/init.d/bluetooth does not get stopped anymore.
Please try that and tell me if that worked for you!
hth and greetings,
Stefan _________________ signature temporarily disabled |
|
Back to top |
|
 |
szczerb Veteran

Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Tue Sep 16, 2008 10:05 pm Post subject: |
|
|
I've read that topic and I tried that. Just forgot to mention it - sorry.
That's how it looks:
Code: | szczerb@nomad ~ $ cat /etc/udev/rules.d/70-bluetooth.rules
# Start/Stop bluetooth service on device insertion. Gentoo specific.
SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*"
#, RUN+="bluetooth.sh"
# So that normal users can dial out.
SUBSYSTEM=="tty", SUBSYSTEMS=="bluetooth", GROUP="uucp" |
Anything else guys?  |
|
Back to top |
|
 |
kernelhacker n00b

Joined: 18 Feb 2004 Posts: 27
|
Posted: Tue Sep 16, 2008 10:09 pm Post subject: |
|
|
szczerb wrote: | I've read that topic and I tried that. Just forgot to mention it - sorry.
That's how it looks:
Code: | szczerb@nomad ~ $ cat /etc/udev/rules.d/70-bluetooth.rules
# Start/Stop bluetooth service on device insertion. Gentoo specific.
SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*"
#, RUN+="bluetooth.sh"
# So that normal users can dial out.
SUBSYSTEM=="tty", SUBSYSTEMS=="bluetooth", GROUP="uucp" |
Anything else guys?  |
Hm, try to increase the udev log level using
Code: | udevcontrol log_priority=X |
I cannot test which number for X gives reasonable results, you just have to try that. Maybe we can see what happens and if it is udev related! _________________ signature temporarily disabled |
|
Back to top |
|
 |
szczerb Veteran

Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Wed Sep 17, 2008 11:35 am Post subject: |
|
|
I don't have udevcontrol utility. In what package is that? |
|
Back to top |
|
 |
kernelhacker n00b

Joined: 18 Feb 2004 Posts: 27
|
Posted: Wed Sep 17, 2008 12:25 pm Post subject: |
|
|
szczerb wrote: | I don't have udevcontrol utility. In what package is that? |
Sorry - udevcontrol seems to be old style. You have to use udevadm, which is part of the udev ebuild, which is already installed.
Code: |
udevadm control --log-priority=X
|
hth,
Stefan _________________ signature temporarily disabled |
|
Back to top |
|
 |
|