All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] bluetooth socket + rfcomm tty
Date: Mon, 24 Jan 2005 22:24:51 +0100	[thread overview]
Message-ID: <1106601891.8058.110.camel@pegasus> (raw)
In-Reply-To: <Pine.LNX.4.44.0501242148470.14852-100000@antilope>

Hi Victor,

> Could not find it through the archives... 
> I create a bluetooth socket and then create TTY (/dev/rfcomm0) based on it (like it is done in dund from bluez-utils). 
> Is it still allowed to use the descriptor of the open socket to send/receive data through the channel? 
> Cause when I send data to the _socket_ it looks like it is sent (like 
> ATD1234 command to the phone, I see the phone starting to dial, though it 
> stops half way for no reason), but when I'm trying to read from the socket 
> select() returns that there is data to be read, but then read() blocks.

this is maybe possible, but it is not intended. When you converted a
socket into a TTY the socket should be closed. Otherwise we must
duplicate the incoming data and if one party is not reading the flow
control will be brocken and both parties are blocked.

> P.S. Is there any way to check if read() is non-blocking (like ioctl() 
> FIONREAD)?

Check the fcntl() manpage.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2005-01-24 21:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-24 21:13 [Bluez-devel] bluetooth socket + rfcomm tty Victor Shcherbatyuk
2005-01-24 21:24 ` Marcel Holtmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-01-26 11:00 Victor Shcherbatyuk
2005-01-26 17:34 ` Marcel Holtmann
2005-01-29 17:03 Victor Shcherbatyuk
2005-01-29 17:26 ` 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=1106601891.8058.110.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.