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

Re: [bluetooth-dev] "physical" bluetooth (ttyBT*) port?

"Patrick O. Murphy" wrote:

> I have a pc running the openbt stack with an ericsson module hanging off one
> serial port (ttyS0). Coming into the other serial port (ttyS1) is a stream
> of data produced by another system (not a pc, unfortunately). My problem: I
> need the data arriving at ttyS1 directly forwarded to ttyBT0 for handling
> and transmission by the stack. I have a quick-n-dirty solution with a little
> app that opens both ports, then loops through reads from ttyS1 and writes to
> ttyBT0- but it doesn't work very well.
> Is it possible to somehow "attach" the ttyBT0 device to the physical port
> that is normally ttyS1, so anything received from the outside world on the
> port is immediately handed off to the bluetooth stack?

$ cat /dev/ttyS1 > /dev/ttyS0


You probably mean doing it in-kernel. Sorry, I'm not aware of any way to do
that. You could write a line discipline to do it.

BTW, if your data is not ASCII text, then you need to make sure that your tty's
are setup to be 'raw'. See the fd_setup() routine in btd.c for an example of
how to do that.


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