[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] Strange uart behavior...



david LIBAULT wrote:

> I am trying to run the stack from cvs in kernel mode, kernel 2.4, on ARM.
> In bluetooth.c line 1001, I replaced
>
> if (sertty != NULL)
>         return sertty->driver.ioctl(sertty, file, cmd, arg);
> by
>
> if (sertty->driver.ioctl != NULL)
>         return sertty->driver.ioctl(sertty, file, cmd, arg);

>
> This is because sertty->driver structure is not properly initialised (I
> wonder why...).
>

No doubt you'll see my other email discussing kernel headers (not that I know
for sure that's your problem, but it sure would explain a lot).

>
> When I start btd, it passes that, but then the bt_receive_lower_stack doesn't
> receive data properly (always two bytes, although I could check on the scope
> that we receive correct uart data at the right speed). For example, if I do
> readbd :
>
> >readbd
> BT (driver) bt_ioctl: HCIREADLOCALBDADDR
> BT DATA <--|X|      4
>
> bt_write_lower_driver : (4)
>    0x01 0x09 0x10 0x00
>
> BT DATA -->|X|      2
>
> bt_receive_lower_stack : (2)
>    0x00 0x11
> BT SYS: ERROR :hci_receive_data, Discarding 2 bytes and waiting forever...
> cmd_timeout, Timeout when waiting for command response
> Current bd addr : 00:00:00:00:00:00
> >
>
> It looks that the line discipline or something didn't register properly...
> Could that be a 2.4 issue ?
>

The problems you're having passing  ioctls to the serial driver may prevent it
from getting its baud rate & other things setup correctly. Calls in btd like
tcsetattr actually result in ioctl calls like those you're seeing.

--gmcnutt

-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com