2006-08-22 16:15:32

by The Peach

[permalink] [raw]
Subject: [Bluez-users] rfcomm hell

Hi all, this is my first time posting to this ml.

Since yesterday I've got a problem with bluetooth and in particular with rfcomm connection to a bluetooth interface: I hope this mailing list is ok for this to be posted.

Objective: connect to the mobile (a nokia 6680) and to the GPS reciver
The system runs a gentoo patched kernel version 2.6.17-r4 with bluez-libs 2.25 and bluez-utils 2.25-r1

The bluetooth dongle works well (in my opinion):
# hcitool scan
Scanning ...
00:12:62:A8:12:FE Miditree

# l2ping 00:12:62:A8:12:FE
Ping: 00:12:62:A8:12:FE from 00:0A:3A:63:21:B7 (data size 44) ...
0 bytes from 00:12:62:A8:12:FE id 0 time 121.81ms
0 bytes from 00:12:62:A8:12:FE id 1 time 12.15ms
0 bytes from 00:12:62:A8:12:FE id 2 time 13.08ms
3 sent, 3 received, 0% loss

but:
# rfcomm bind 0 00:12:62:A8:12:FE
# rfcomm show all
rfcomm0: 00:12:62:A8:12:FE channel 1 clean
# rfcomm connect 0 00:12:62:A8:12:FE
Can't create RFCOMM TTY: Address already in use
# rfcomm release all
# rfcomm connect 1 00:12:62:A8:12:FE
Can't open RFCOMM device: No such file or directory

some configuration files:

/etc/conf.d/bluetooth
[code]
HCID_ENABLE=true
HCID_CONFIG="/etc/bluetooth/hcid.conf"
SDPD_ENABLE=true
HIDD_ENABLE=false
HIDD_OPTIONS=""
HID2HCI_ENABLE=false
RFCOMM_ENABLE=true
RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
DUND_ENABLE=false
DUND_OPTIONS="--listen --persist"
PAND_ENABLE=false
PAND_OPTIONS="--listen --role NAP"
[/code]

/etc/bluetooth/hcid.conf
[code]
options {
autoinit yes;
security auto;
pairing multi;
pin_helper /usr/bin/bluepin;
}
device {
name "%h (%d)";
class 0x3e0100;
iscan enable; pscan enable;
lm accept;
lp rswitch,hold,sniff,park;
#auth enable;
#encrypt enable;
}
[/code]

I've tried also to mknod the device but there's nothing to do. when I launch rfcomm it will be deleted and it ends with a "No such file or directory".

Any hint??? This thing is driving me mad!!!

--
Matteo 'Peach' Pescarin

ICQ UIN = 71110111
Jabber ID = [email protected]
Web Site = http://www.smartart.it
GeCHI = http://www.gechi.it

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2006-08-29 20:49:38

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] rfcomm hell

Hi Stefan,

> > I found what was wrong, and it was udev.
> > After following a tutorial I added the following rule to change the permissions upon dev creation:
> >
> > # cat /etc/udev/rules.d/10-udev.rules
> > KERNEL="rfcomm[0-9]*", NAME="bluetooth/%k", GROUP="users", MODE="0660"
> >
> > after commenting it rfcomm started connecting :-D
>
> i have
> root@susi:/tmp# cat /etc/udev/rules.d/47-rfcomm.rules
> # udev-rules for rfcomm devices
> KERNEL=="rfcomm*", NAME="%k" GROUP="uucp" MODE="0660" OPTIONS="resmgr"

these should be needed at all. The rfcommX devices are TTYs and a

SUBSYSTEM=="tty", GROUP="dialout"

or similar should take care of the correct permissions and group
assignment.

> The OPTIONS=resmgr is probably SUSE specific, but the rest should be generic
> and works just fine for me.

Yes, it is.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-29 18:01:24

by Stefan Seyfried

[permalink] [raw]
Subject: Re: [Bluez-users] rfcomm hell

On Tue, Aug 29, 2006 at 11:06:13AM +0200, The Peach wrote:
> On Tue, 22 Aug 2006 18:15:32 +0200
> The Peach <[email protected]> wrote:
> =

> > Objective: connect to the mobile (a nokia 6680) and to the GPS reciver
> =

> I found what was wrong, and it was udev.
> After following a tutorial I added the following rule to change the permi=
ssions upon dev creation:
> =

> # cat /etc/udev/rules.d/10-udev.rules =

> KERNEL=3D"rfcomm[0-9]*", NAME=3D"bluetooth/%k", GROUP=3D"users", MODE=3D"=
0660"
> =

> after commenting it rfcomm started connecting :-D

i have
root@susi:/tmp# cat /etc/udev/rules.d/47-rfcomm.rules
# udev-rules for rfcomm devices
KERNEL=3D=3D"rfcomm*", NAME=3D"%k" GROUP=3D"uucp" MODE=3D"0660" OPTIONS=3D"=
resmgr"

The OPTIONS=3Dresmgr is probably SUSE specific, but the rest should be gene=
ric
and works just fine for me.
-- =

Stefan Seyfried \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, N=FCrnberg \ -- Leonard Cohen

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-29 09:06:13

by The Peach

[permalink] [raw]
Subject: Re: [Bluez-users] rfcomm hell

On Tue, 22 Aug 2006 18:15:32 +0200
The Peach <[email protected]> wrote:

> Objective: connect to the mobile (a nokia 6680) and to the GPS reciver

I found what was wrong, and it was udev.
After following a tutorial I added the following rule to change the permissions upon dev creation:

# cat /etc/udev/rules.d/10-udev.rules
KERNEL="rfcomm[0-9]*", NAME="bluetooth/%k", GROUP="users", MODE="0660"

after commenting it rfcomm started connecting :-D

thanks for the help :)

--
Matteo 'Peach' Pescarin

ICQ UIN = 71110111
Jabber ID = [email protected]
Web Site = http://www.smartart.it
GeCHI = http://www.gechi.it

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-22 23:22:31

by The Peach

[permalink] [raw]
Subject: Re: [Bluez-users] rfcomm hell

On Tue, 22 Aug 2006 13:57:31 -0400
Andrew Kohlsmith <[email protected]> wrote:

> I'd imagine you could use rfcomm-listen-start and tell gpsd to look at stdin.
> If not, just use rfcomm --bind; I've never had issue with that. it's
> --connect that gets my goat.

it's getting me more errors than expected:
if I use the rfcomm-listen I get a timeout (is there no association
with the device? no pin input or such things? I cannot disable it on the GPS device).
if I use the rfcomm-read I get a

connect: : Resource temporarily unavailable

probably I start it the right way... any hint about it?

instead if I try to just bind the interface with rfcomm I get an hardlock and I must reboot when I start gpsdrive.

is there no other solution to `rfcomm connect` to work than not using it?


thanks,
--
Matteo 'Peach' Pescarin

ICQ UIN = 71110111
Jabber ID = [email protected]
Web Site = http://www.smartart.it
GeCHI = http://www.gechi.it

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-22 17:57:31

by Andrew Kohlsmith

[permalink] [raw]
Subject: Re: [Bluez-users] rfcomm hell

On Tuesday 22 August 2006 13:52, The Peach wrote:
> really nice tools and they all work flawless! :)
> The problem now is another: if I want to connect to a GPS reciever to use
> gpsd and gpsdrive I do need a physical device: can I accompilsh this task
> with any of these tools?

I'd imagine you could use rfcomm-listen-start and tell gpsd to look at stdin.
If not, just use rfcomm --bind; I've never had issue with that. it's
--connect that gets my goat.

-A.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-22 17:52:19

by The Peach

[permalink] [raw]
Subject: Re: [Bluez-users] rfcomm hell

On Tue, 22 Aug 2006 12:27:14 -0400
Andrew Kohlsmith <[email protected]> wrote:

> http://auriga.wearlab.de/~andi/smalltools/
>
> look at rfcomm-read, rfcomm-listen and rfcomm-listen-start, specifically.

really nice tools and they all work flawless! :)
The problem now is another: if I want to connect to a GPS reciever to use gpsd and gpsdrive I do need a physical device: can I accompilsh this task with any of these tools?

--
Matteo 'Peach' Pescarin

ICQ UIN = 71110111
Jabber ID = [email protected]
Web Site = http://www.smartart.it
GeCHI = http://www.gechi.it

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-22 16:27:14

by Andrew Kohlsmith

[permalink] [raw]
Subject: Re: [Bluez-users] rfcomm hell

On Tuesday 22 August 2006 12:15, The Peach wrote:
> # rfcomm bind 0 00:12:62:A8:12:FE

I've given up on rfcomm for the most part. rfcomm's connect option is just
plain broken. Instead of trying to dig in and fix it, I happened upon some
simple utilities which seem to work much better for my purposes. I still use
rfcomm bind to attach pppd, though.

http://auriga.wearlab.de/~andi/smalltools/

look at rfcomm-read, rfcomm-listen and rfcomm-listen-start, specifically.

Hope this helps!

-A.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-22 16:25:55

by The Peach

[permalink] [raw]
Subject: Re: [Bluez-users] rfcomm hell

On Tue, 22 Aug 2006 18:15:32 +0200
The Peach <[email protected]> wrote:

> This thing is driving me mad!!!

I almost forgot: Anytime I tried to connect to the mobile, I've got the question "Accept connection request from Laptop?" but if I answer yes the result is the previously posted :(

--
Matteo 'Peach' Pescarin

ICQ UIN = 71110111
Jabber ID = [email protected]
Web Site = http://www.smartart.it
GeCHI = http://www.gechi.it

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users