public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Marples <dave-lists@marples.net>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] rfcomm device blocking/data available behaviour
Date: Fri, 16 Jun 2006 11:40:17 -0400	[thread overview]
Message-ID: <4492D0E1.5090806@marples.net> (raw)
In-Reply-To: <4492B0C9.6010305@marples.net>

Folks,
Replying to myself here, but moving over to the python library, the 
following code _works_;

import bluetooth

s=bluetooth.BluetoothSocket( bluetooth.RFCOMM )
s.connect(("xx:xx:xx:xx:xx:xx",1))
s.send('ATZ\r')
while 1:
    c=s.recv(1)
    print "Got",len(c),"Detail:",ord(c),c

...so, I can only conclude that it's something to do with the device 
emulation side of things.  Hope this is helpful to someone.

Regards

DAVE

Dave Marples wrote:
> Folks,
>
> I've got a problem using rfcomm to a generic BT device (actually a SE 
> K750i phone, but that's just what I'm using for an example).  It looks 
> to me like a bug in the rfcomm/socket interface, but what do I know?
>
> The problem seems to be that blocking/select on a rfcomm serial port 
> isn't working correctly. This is using Ubuntu Dapper (latest release) 
> and I've checked the bluetooth/rfcomm directory against patch 2.6.16-mh3 
> to ensure that all of the current changes are in there, and they are (in 
> fact, only core.c has changed, and that's mostly beautification).
>
> The easiest way to create the problem is as follows;
>
> 1) In /etc/bluetooth/rfcomm.conf establish a connection to the phone;
>
> rfcomm3 {
>    bind yes;
>    # Bluetooth address of the device
>    device xx:xx:xx:xx:xx:xx;
>    # RFCOMM channel for the connection
>    channel    1;
>    # Description of the connection
>    comment "K750i";
> }
>
> 2) ...then cat /dev/rfcomm3
>
> Obviously, at this point nothing happens.
> 3) _RING_ the phone
>
> The output from the 'cat' job goes crazy, and never finishes.
>
> Another way to create the problem  is the following (using python);
>
> fd=open("/dev/rfcomm3","r+")
> fd.write("ATZ\n")
> while 1:
>    c=fd.read(1)
>    print "Got",len(c),"Detail:",ord(c),c
>
> Can anyone help?  I'm stuck here....it's quite possible I'm doing 
> something _really_ silly, but I need someone to hold a mirror up to be 
> able to see that...
>
> Regards
>
> DAVE
>
>
>
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>   



_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

  reply	other threads:[~2006-06-16 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-16 13:23 [Bluez-users] rfcomm device blocking/data available behaviour Dave Marples
2006-06-16 15:40 ` Dave Marples [this message]
2006-06-17 10:19   ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4492D0E1.5090806@marples.net \
    --to=dave-lists@marples.net \
    --cc=bluez-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox