2005-01-29 17:03:14

by Victor Shcherbatyuk

[permalink] [raw]
Subject: Re: [Bluez-devel] bluetooth socket + rfcomm tty

Hi Marcel,

I use TTY because I want to provide AT command communication and PPP over
the same channel, in my case I send a number of AT commands, then start
pppd over the channel (converted to TTY) and then, after it is finished, I
want to send AT commands again. I want to do this all without reopening
bluetooth connection with the phone, which is being closed when pppd
finishes on TTY. I also can open a TTY from my application, so pppd can
not close the connection on exit (cause there are still open descriptors)
- but
sending commands through an open TTY works strange to me...

The phone is SonyEr T630, and so far is the most stable phone regarding communication using Bluez stack (Nokias, Siemens - hang or crash
now and then).

Regards,
Victor.

----- Original Message -----
From: "Marcel Holtmann" <[email protected]>
To: "BlueZ Mailing List" <[email protected]>
Sent: Wednesday, January 26, 2005 18:34
Subject: RE: [Bluez-devel] bluetooth socket + rfcomm tty


> Hi Victor,
>
>> Now I close the socket after converting to TTY. After this I open
>> "/dev/rfcomm0" with O_RDWR | O_NOCTTY and write ATD12345\n\r command to
>> it, then read the response (receive echo), and sleep, meanwhile phone
>> starts to dial the number, but then stops for no reason. If I do the
>> same with original (non-converted) socket (skipping converting to TTY),
>> everything is OK.
>
> if the socket way works, why don't you use it?
>
>> I've taken a look at hcidump output and it looks rather strange if I
>> compare it for both cases. In the case of file handle to converted TTY
>> all the data looks fragmented between ACL packets (like ATD1234 is not
>> sent in one packet, like in the case of non-converted socket, but piece
>> by piece in a number of packets) + there is a lot of activity from the
>> phone during the sleep phase when I do not do anything with the file
>> handle.
>
> What kind of phone is this?
>
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel

--




-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-01-29 17:26:45

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] bluetooth socket + rfcomm tty

Hi Victor,

> I use TTY because I want to provide AT command communication and PPP over
> the same channel, in my case I send a number of AT commands, then start
> pppd over the channel (converted to TTY) and then, after it is finished, I
> want to send AT commands again. I want to do this all without reopening
> bluetooth connection with the phone, which is being closed when pppd
> finishes on TTY. I also can open a TTY from my application, so pppd can
> not close the connection on exit (cause there are still open descriptors)
> - but
> sending commands through an open TTY works strange to me...

check if your TTY is set to raw mode and actually you should look at
dund, because this provides most of this functionality. And using pppd
you can also define post-connection scripts.

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel