linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
[parent not found: <1129010637.2346.1.camel@localhost.localdomain>]
* [Bluez-devel] ttyS0 problem
@ 2005-10-09 16:38 davidgchen
  2005-10-09 16:45 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: davidgchen @ 2005-10-09 16:38 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

Hi marcel,

I want to write some commands to the uart(ttyS0), but it fails. The steps are as follows:

1. hciattach ttyS0 texas
2. Open ttyS0 device again and get a fd, init ttyS0 with speed, flow_ctl and so on,then write a command(0x30) to the fd but return 0; That is nothing is written to ttyS0.

If I write the same command  in the  function texas(int fd, struct uart_t *u, struct termios *ti), it succeeds.
From bluez-utiles I see the following code which maybe the reason why I can't write the command to ttyS0 after running hciattach ttyS0 texas.

/* Set TTY to N_HCI line discipline */
 i = N_HCI;
 if (ioctl(fd, TIOCSETD, &i) < 0) {
  perror("Can't set line discipline");
  return -1;
 }

It seems the codes is very important ,because if I delete these codes, the following codes can't run any more.

Is there any method that I can write the command to the ttyS0 successfully after step 1?

regurds,

David

[-- Attachment #2: Type: text/html, Size: 2097 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-11  6:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1128906830.2417.1.camel@localhost.localdomain>
2005-10-10  1:53 ` [Bluez-devel] ttyS0 problem david
2005-10-10  3:19   ` Marcel Holtmann
     [not found] <1129010637.2346.1.camel@localhost.localdomain>
2005-10-11  6:39 ` david
2005-10-09 16:38 davidgchen
2005-10-09 16:45 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).