LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-12-2006, 08:37 AM   #1
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,220

Rep: Reputation: 116Reputation: 116
Problem using bluetooth mobile as modem/rfcomm connection refused.


I have a USB bluetooth dongle, mobile is SonyEricsson K608i, distro is Mandriva 2006.
First time I connected it worked fine - well, I had to launch gnome-phone-manager, select settings -> apply, and the phone worked fine as a bluetooth-modem.
Next bootup it doesn't work. I believe there's a problem with rfcomm, the channel is closed and refuses to connect.
In short, here's what I get:
Code:
[root@edgar ~]# rfcomm show 
rfcomm0: 00:16:20:0A:72:C7 channel 1 closed  (adress=phone) 

[root@edgar ~]# rfcomm connect 0 
Can't connect RFCOMM socket: Connection refused 

[root@edgar ~]# hciconfig scan 
hci0:   Type: USB   BD Address: 00:09:DD:10:76:B2 ACL MTU: 192:8 SCO MTU: 64:8   (adress=USB dongle)
UP RUNNING PSCAN ISCAN
RX bytes:2834 acl:36 sco:0 events:98 errors:0
TX bytes:1335 acl:32 sco:0 commands:38 errors:0 

[root@edgar ~]# l2ping 00:16:20:0A:72:C7 
Ping: 00:16:20:0A:72:C7 from 00:09:DD:10:76:B2 
(data size 44) ... 44 bytes from 00:16:20:0A:72:C7 id 0 time 89.83ms
A little longer explanation: First time: I didn't change any hcid/rfcomm config-file. Just put in the dongle, used gnome-phone-manager and then dialup with kppp. Closing connection with kppp and /dev/rfcomm0 was deleted, had to use gnome-phone-manager again as above.
When next time it didn't work, I searched the 'net for info and changed my config-files (see bottom): Phone connects, request for PIN in phone and computer. Phone adds computer ok. Using kppp, phone says: "edgar wants to connect to Internet. Accept?"
Yes -> phone says ok, computer says "connection refused".
When issuing "rfcomm connect 0 ", the phone asks for permission to access, I press "Yes", phone says "connection refused by the other unit". Terminal output:
"Can't connect RFCOMM socket: Connection refused "

The PIN in /etc/bluetooth/pin is correct (four digits only).
My config files:
Code:
# RFCOMM configuration file. 
rfcomm0 { 	
bind yes; 	
device 00:16:20:0A:72:C7; 
#	channel	1; 	
comment "Sony Ericsson k608i"; }  

# HCI daemon configuration file. 
options { 	
autoinit yes; 	
security user; 	
pairing multi; 	
pin_helper /bin/bluepin; 	
dbus_pin_helper; } 
device { 	
name "Sony %h-%d"; 	
class 0x3e0100; 	
iscan enable; pscan enable; 	
lm accept; 	
lp rswitch,hold,sniff,park; }
And please forgive me for not googling more before asking - it is a bit difficult without a working internet connection...
 
Old 07-12-2006, 08:49 AM   #2
mesharam.amit
LQ Newbie
 
Registered: Jul 2006
Location: City: Nagpur State: Maharashtra Country: INDIA
Distribution: Redhat 4.0
Posts: 15

Rep: Reputation: 0
hi there

as per u r problem ,it just because of bluetooth service.
do one thing goes in terminal mode & just type the command

service bluetooth stop then type

rfcomn o/p will be nothing......

then type service bluetooth start

then type rfcomn

the o/p will be look like this

rfcomm0: 00:16:20:0A:72:C7 channel 1 clean

then type pppd call gprs

if the problem arises again do above step one more time . hope it will solve u r prob.

Last edited by mesharam.amit; 07-12-2006 at 08:59 AM.
 
Old 07-12-2006, 09:04 AM   #3
mesharam.amit
LQ Newbie
 
Registered: Jul 2006
Location: City: Nagpur State: Maharashtra Country: INDIA
Distribution: Redhat 4.0
Posts: 15

Rep: Reputation: 0
Post solution for bluetooth dongle

hi there

as per u r problem ,it just because of bluetooth service.
do one thing goes in terminal mode & just type the command

service bluetooth stop then type

rfcomn o/p will be nothing......

then type service bluetooth start

then type rfcomn

the o/p will be look like this

rfcomm0: 00:16:20:0A:72:C7 channel 1 clean

then type pppd call gprs

if the problem arises again do above step one more time . hope it will solve u r prob
 
Old 07-12-2006, 10:47 AM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,220

Original Poster
Rep: Reputation: 116Reputation: 116
Thanks for your suggestion, however no luck so far:
I get the channel clean, as you said. But I can't use the command "pppd call gprs" since it isn't configured.
Anyway, I tried to connect with rfcomm and kppp, but still "connection refused".
I also tried without any config-files, thus:
Code:
# mknod -m666 /dev/rfcomm0 c 216 0
# rfcomm bind 0 00:16:20:0A:72:C7
# rfcomm connect 0 00:16:20:0A:72:C7
Can't connect RFCOMM socket: Connection refused
So it binds correctly, but then there's a permission error. Maybe this is not a bluetooth/rfcomm issue?
Fedora has SELinux, does Mandriva has something like it? Can't find anything, really, except firewall (which is stopped).
(BTW, I always restart bluetooth services when changing config. However there's an error stopping l2p: "module in use".)
 
Old 07-12-2006, 01:44 PM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,220

Original Poster
Rep: Reputation: 116Reputation: 116
Now I booted Debian Sarge, same machine.
The steps I reported works fine!
Code:
# mknod -m666 /dev/rfcomm0 c 216 0
# rfcomm bind 0 00:16:20:0A:72:C7
# rfcomm connect 0 00:16:20:0A:72:C7
Connected /dev/rfcomm0 to 00:16:20:0A:72:C7 on channel 1
Press CTRL-C for hangup
This has to be a security issue, correct me if I'm wrong but I do believe bluetooth and rfcomm works fine.
"Connection refused"...
Hmmmmm....
 
Old 07-13-2006, 03:37 PM   #6
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,220

Original Poster
Rep: Reputation: 116Reputation: 116
... now I booted into Debian again, guess what:
Code:
# mknod -m666 /dev/rfcomm0 c 216 0
# rfcomm bind 0 00:16:20:0A:72:C7
# rfcomm connect 0 00:16:20:0A:72:C7
Can't connect RFCOMM socket: Connection refused
What's going on here???
First time it just works (as is normal with Linux), then next time "connection refused" - both Mandriva and Debian?!!???!!?
 
Old 07-15-2006, 02:08 AM   #7
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,220

Original Poster
Rep: Reputation: 116Reputation: 116
SOLVED!
Quote:
First time it just works (as is normal with Linux), then next time "connection refused" - both Mandriva and Debian?
... which made me start to think. The problem started when I switched OS's - the same as happens with SSH, key is no longer valid when set up in different system.
So I found there should be a /etc/bluetooth/link_key - only in Mandriva the location is /var/lib/lib/bluetooth/<USB dongle adress>/link_key.
I deleted that file => fixed!
(Only thing left now is to set the speed, 115kbit/s is what WinXP allows but I believi in Linux I can set it higher - I should have 384 kb/s.)
 
Old 07-15-2006, 02:13 AM   #8
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,220

Original Poster
Rep: Reputation: 116Reputation: 116
SOLVED!
Quote:
First time it just works (as is normal with Linux), then next time "connection refused" - both Mandriva and Debian?
... which made me start to think. The problem started when I switched OS's - the same as happens with SSH, key is no longer valid when set up in different system.
So I found there should be a /etc/bluetooth/link_key - only in Mandriva the location is /var/lib/lib/bluetooth/<USB dongle adress>/link_key.
I deleted that file => fixed!
(Only thing left now is to set the speed, 115kbit/s is what WinXP allows but I believi in Linux I can set it higher - I should have 384 kb/s.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mobile + bluetooth seaeye Linux - Networking 0 10-31-2004 06:05 PM
Enable serial service with rfcomm and bluetooth. philipina Linux - General 0 06-21-2004 08:08 AM
Connection Refused Problem sangjin Linux - Newbie 1 12-30-2003 06:43 AM
connection refused problem herambshembekar Linux - Networking 2 04-08-2002 07:48 AM
connection refused problem. jdevanand Linux - Networking 4 03-04-2002 07:30 PM


All times are GMT -5. The time now is 05:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration