2007-08-22 06:07:54

by jaspreet singh

[permalink] [raw]
Subject: Re: [Bluez-users] Can't connect RFCOMM socket: Resource temporarilyunavailable

try: #rfcomm bind <address>
if it says already binded..then release and bind again..
check rfcomm for the channel...
#rfcomm
it should say <addr.> <channelno> clean
then it will be ok...

if problem persists than forgive me..ask any expert..

_________________________________________________________________
Wedding bells are ringing. When's your time to walk the aisle?
http://ad.in.doubleclick.net/clk;112111293;17571293;v?http://www.simplymarry.com/timesmatri/faces/jsp/UserTrackLandingPage.jsp?origin=hotmail_taglines_ros_june07


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2007-08-24 15:09:04

by Hamid MENOUAR

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

You're right, it was that the problem. I started hcid and now
everything is working well.

Thank you very much Marcel,
Hamid

On 8/24/07, Marcel Holtmann <[email protected]> wrote:
> Hi Hamid,
>
> > Oups! sorry, here is the output then:
> >
> > [root@localhost ~]# hcidump -X -V
> > HCI sniffer - Bluetooth packet analyzer ver 1.18
> > device: hci0 snap_len: 1028 filter: 0xffffffff
> > < HCI Command: Create Connection (0x01|0x0005) plen 13
> > bdaddr 00:0D:18:60:14:8E ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> > Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > > HCI Event: Command Status (0x0f) plen 4
> > Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > > HCI Event: Connect Complete (0x03) plen 11
> > status 0x00 handle 12 bdaddr 00:0D:18:60:14:8E type ACL encrypt 0x00
> > < ACL data: handle 12 flags 0x02 dlen 12
> > L2CAP(s): Connect req: psm 3 scid 0x0040
> > < HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
> > handle 12 policy 0x0f
> > Link policy: RSWITCH HOLD SNIFF PARK
> > > HCI Event: Command Complete (0x0e) plen 6
> > Write Link Policy Settings (0x02|0x000d) ncmd 1
> > status 0x00 handle 12
> > > HCI Event: Max Slots Change (0x1b) plen 3
> > 0000: 0c 00 05 ...
> > > ACL data: handle 12 flags 0x02 dlen 16
> > L2CAP(s): Connect rsp: dcid 0x0042 scid 0x0040 result 1 status 2
> > Connection pending - Authorization pending
> > > HCI Event: Number of Completed Packets (0x13) plen 5
> > handle 12
> > > HCI Event: PIN Code Request (0x16) plen 6
> > bdaddr 00:0D:18:60:14:8E
> > > ACL data: handle 12 flags 0x02 dlen 16
> > L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 3 status 0
> > Connection refused - security block
> > > HCI Event: Disconn Complete (0x05) plen 4
> > status 0x00 handle 12 reason 0x13
> > Reason: Remote User Teminated Connection
>
> you don't have hcid running and so no PIN code handling at. So you can't
> access the device. As simple as that.
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-08-24 14:59:59

by Marcel Holtmann

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

Hi Hamid,

> Oups! sorry, here is the output then:
>
> [root@localhost ~]# hcidump -X -V
> HCI sniffer - Bluetooth packet analyzer ver 1.18
> device: hci0 snap_len: 1028 filter: 0xffffffff
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:0D:18:60:14:8E ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > HCI Event: Connect Complete (0x03) plen 11
> status 0x00 handle 12 bdaddr 00:0D:18:60:14:8E type ACL encrypt 0x00
> < ACL data: handle 12 flags 0x02 dlen 12
> L2CAP(s): Connect req: psm 3 scid 0x0040
> < HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
> handle 12 policy 0x0f
> Link policy: RSWITCH HOLD SNIFF PARK
> > HCI Event: Command Complete (0x0e) plen 6
> Write Link Policy Settings (0x02|0x000d) ncmd 1
> status 0x00 handle 12
> > HCI Event: Max Slots Change (0x1b) plen 3
> 0000: 0c 00 05 ...
> > ACL data: handle 12 flags 0x02 dlen 16
> L2CAP(s): Connect rsp: dcid 0x0042 scid 0x0040 result 1 status 2
> Connection pending - Authorization pending
> > HCI Event: Number of Completed Packets (0x13) plen 5
> handle 12
> > HCI Event: PIN Code Request (0x16) plen 6
> bdaddr 00:0D:18:60:14:8E
> > ACL data: handle 12 flags 0x02 dlen 16
> L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 3 status 0
> Connection refused - security block
> > HCI Event: Disconn Complete (0x05) plen 4
> status 0x00 handle 12 reason 0x13
> Reason: Remote User Teminated Connection

you don't have hcid running and so no PIN code handling at. So you can't
access the device. As simple as that.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-08-24 14:47:40

by Hamid MENOUAR

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

Oups! sorry, here is the output then:

[root@localhost ~]# hcidump -X -V
HCI sniffer - Bluetooth packet analyzer ver 1.18
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:0D:18:60:14:8E ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 12 bdaddr 00:0D:18:60:14:8E type ACL encrypt 0x00
< ACL data: handle 12 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0040
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 12 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK
> HCI Event: Command Complete (0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 1
status 0x00 handle 12
> HCI Event: Max Slots Change (0x1b) plen 3
0000: 0c 00 05 ...
> ACL data: handle 12 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0042 scid 0x0040 result 1 status 2
Connection pending - Authorization pending
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 12
> HCI Event: PIN Code Request (0x16) plen 6
bdaddr 00:0D:18:60:14:8E
> ACL data: handle 12 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 3 status 0
Connection refused - security block
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 12 reason 0x13
Reason: Remote User Teminated Connection


Regards,
Hamid

On 8/24/07, Marcel Holtmann <[email protected]> wrote:
> Hi Hamid,
>
> > I think it's better that I give you all the output I got from the
> > beginning in order to understand better the situation.
>
> actually hcidump works like tcpdump. You have to run it in a different
> terminal. Otherwise it is useless.
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-08-24 14:27:01

by Marcel Holtmann

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

Hi Hamid,

> I think it's better that I give you all the output I got from the
> beginning in order to understand better the situation.

actually hcidump works like tcpdump. You have to run it in a different
terminal. Otherwise it is useless.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-08-24 14:06:33

by Hamid MENOUAR

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

Dear all,
I think it's better that I give you all the output I got from the
beginning in order to understand better the situation.

The output is as follow:

[root@localhost ~]# hciconfig
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN
RX bytes:0 acl:0 sco:0 events:0 errors:0
TX bytes:0 acl:0 sco:0 commands:0 errors:0

[root@localhost ~]# hciconfig hci0 reset
Can't set scan mode on hci0: Device or resource busy (16)
[root@localhost ~]# hciconfig hci0 reset
[root@localhost ~]#
[root@localhost ~]# hciconfig hci0
hci0: Type: USB
BD Address: 00:16:38:CA:56:A8 ACL MTU: 1017:8 SCO MTU: 64:1
UP RUNNING PSCAN ISCAN
RX bytes:146 acl:0 sco:0 events:17 errors:0
TX bytes:65 acl:0 sco:0 commands:17 errors:0

[root@localhost ~]#
[root@localhost ~]# hcitool scan
Scanning ...
00:0D:18:60:14:8E Bluetooth-device

[root@localhost ~]#
[root@localhost ~]# /etc/init.d/bluetooth restart
Stopping Bluetooth services: [FAILED]
Starting Bluetooth services: [ OK ]
[root@localhost ~]# /etc/init.d/bluetooth restart
Stopping Bluetooth services: [ OK ]
Starting Bluetooth services: [ OK ]
[root@localhost ~]#
[root@localhost ~]# l2ping 00:0D:18:60:14:8E
Ping: 00:0D:18:60:14:8E from 00:16:38:CA:56:A8 (data size 20) ...
4 bytes from 00:0D:18:60:14:8E id 0 time 52.69ms
4 bytes from 00:0D:18:60:14:8E id 1 time 9.75ms
4 bytes from 00:0D:18:60:14:8E id 2 time 29.74ms
4 bytes from 00:0D:18:60:14:8E id 3 time 31.71ms
4 sent, 4 received, 0% loss
[root@localhost ~]#
[root@localhost ~]# rfcomm release all
[root@localhost ~]#
[root@localhost ~]# rfcomm bind 00:0D:18:60:14:8E
[root@localhost ~]# rfcomm
rfcomm0: 00:0D:18:60:14:8E channel 0 clean
[root@localhost ~]#
[root@localhost ~]# rfcomm connect rfcomm0 00:0D:18:60:14:8E
Can't connect RFCOMM socket: Resource temporarily unavailable
[root@localhost ~]#
[root@localhost ~]# lsmod
Module Size Used by
...
rfcomm 42333 1
l2cap 30661 5 rfcomm
hci_usb 18761 0
bluetooth 56133 3 rfcomm,l2cap,hci_usb
...
[root@localhost ~]#
[root@localhost ~]# cat /etc/bluetooth/rfcomm.conf
#
# RFCOMM configuration file.
#
# $Id: rfcomm.conf,v 1.1 2002/10/07 05:58:18 maxk Exp $
#

rfcomm0 {
# Automatically bind the device at startup
bind yes;

# Bluetooth address of the device
device 00:0D:18:60:14:8E;

# RFCOMM channel for the connection
channel 0;

# Description of the connection
comment "GPS: You got me";
}
[root@localhost ~]#
[root@localhost ~]# sdptool search DUN
Inquiring ...
Searching for DUN on 00:0D:18:60:14:8E ...
[root@localhost ~]#
[root@localhost ~]# hcidump -X -V
HCI sniffer - Bluetooth packet analyzer ver 1.18
device: hci0 snap_len: 1028 filter: 0xffffffff


What do you think ? any idea ?

Many thanks in advance,
Menouar


On 8/24/07, Marcel Holtmann <[email protected]> wrote:
> Hi,
>
> > have u tried "l2ping" to your device?
> > try sdptool,hcitool also..check services running on ur gps device.
> > if tht doesn't help.
> > then check the services running on other laptop(which u have tried
> > successfully) and compare those with urs.
>
> as usual. Include "hcidump -X -V" output.
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-08-24 12:18:00

by Marcel Holtmann

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

Hi,

> have u tried "l2ping" to your device?
> try sdptool,hcitool also..check services running on ur gps device.
> if tht doesn't help.
> then check the services running on other laptop(which u have tried
> successfully) and compare those with urs.

as usual. Include "hcidump -X -V" output.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-08-22 14:56:15

by Hamid MENOUAR

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

I'm using an Anycom bluetooth 2.0 USB adabtor (see:
http://www.anycom.com/products/bluetooth_it_pc_accessoires/?id=102&group_id=3)

And what I'm trying to connect is some bluetooth-based GPS device.

So, on the laptop I'm using I have a Fedora Core 4 (Linux version
2.6.11 and gcc version 4.0.0). And know that I've already tried to
connect the same bluetooth-based GPS device using the same blutooth
USB adaptor but on some other fully similar laptop with same Fedora
Core 4 and it wored very well.

Why it doesn't work with my laptop ? ... I dont know what is missing here :(

Thanks much,
Menouar



On 8/22/07, jaspreet singh <[email protected]> wrote:
>
> plz tell the device you are using ..check wether it is compatible ar not
> with your system..also write the linux you are using..the bluetooth stack u
> r using.
>
> http://www.holtmann.org/linux/bluetooth/rfcomm.html
>
> _________________________________________________________________
> Live the life in style with MSN Lifestyle. Check out!
> http://content.msn.co.in/Lifestyle/Default
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-08-22 14:26:58

by jaspreet singh

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


plz tell the device you are using ..check wether it is compatible ar not
with your system..also write the linux you are using..the bluetooth stack u
r using.

http://www.holtmann.org/linux/bluetooth/rfcomm.html

_________________________________________________________________
Live the life in style with MSN Lifestyle. Check out!
http://content.msn.co.in/Lifestyle/Default


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-08-22 07:58:50

by Hamid MENOUAR

[permalink] [raw]
Subject: Re: [Bluez-users] Can't connect RFCOMM socket: Resource temporarilyunavailable

Thanks Jaspreet,

I tried it and it still doesn't work. That's what I got :

[root@localhost ~]# rfcomm release all
[root@localhost ~]# rfcomm bind 00:0D:18:60:14:8E
[root@localhost ~]# rfcomm
rfcomm0: 00:0D:18:60:14:8E channel 1 clean
[root@localhost ~]# rfcomm connect rfcomm0 00:0D:18:60:14:8E 1
Can't connect RFCOMM socket: Resource temporarily unavailable
[root@localhost ~]#

Could anyone help me to explain and solve this ?

Many thanks in advance,
Menouar

On 8/22/07, jaspreet singh <[email protected]> wrote:
> try: #rfcomm bind <address>
> if it says already binded..then release and bind again..
> check rfcomm for the channel...
> #rfcomm
> it should say <addr.> <channelno> clean
> then it will be ok...
>
> if problem persists than forgive me..ask any expert..
>
> _________________________________________________________________
> Wedding bells are ringing. When's your time to walk the aisle?
> http://ad.in.doubleclick.net/clk;112111293;17571293;v?http://www.simplymarry.com/timesmatri/faces/jsp/UserTrackLandingPage.jsp?origin=hotmail_taglines_ros_june07
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2007-09-05 10:47:03

by Jared Kidd

[permalink] [raw]
Subject: Re: [Bluez-users] Can't connect RFCOMM socket: Resource temporarilyunavailable

I'm trying to get rfcomm working as well. It works great on my main
laptop but for some reason I can't get it to work on this other laptop.
When I try the commands talked about below I get weird responses:

carpc xamindar # rfcomm bind 00:12:56:5a:92:59
Can't create device: Operation not supported
carpc xamindar # rfcomm
Can't get device list: Operation not supported

What does this mean? I must be missing something.

jaspreet singh wrote:
> try: #rfcomm bind <address>
> if it says already binded..then release and bind again..
> check rfcomm for the channel...
> #rfcomm
> it should say <addr.> <channelno> clean
> then it will be ok...
>
> if problem persists than forgive me..ask any expert..
>
> _________________________________________________________________
> Wedding bells are ringing. When's your time to walk the aisle?
> http://ad.in.doubleclick.net/clk;112111293;17571293;v?http://www.simplymarry.com/timesmatri/faces/jsp/UserTrackLandingPage.jsp?origin=hotmail_taglines_ros_june07
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users