2009-11-14 10:45:00

by Ramagudi Naziir

[permalink] [raw]
Subject: 'cat /dev/rfcomm0' yields strange data

# rfcomm watch /dev/rfcomm0 1 muahahahah
Waiting for connection on channel 1
Connection from xxx to /dev/rfcomm0
Press CTRL-C for hangup


on another terminal:


# cat /dev/rfcomm0

^J^J^J
^J^J^J



^J



^J



^J^J



^^J
...
...

and these character output goes on and on for a minute or so until it stops.

Any idea what is it ? is it supposed to be here ?
I was expecting the 'cat' command to show me only data that was sent
from the remote end
(e.g. If I do on the remote peer 'echo bla > /dev/rfcomm0' I do see
the bla here on the local 'cat').

thank you for the help
naziir


2009-11-15 12:26:25

by Ramagudi Naziir

[permalink] [raw]
Subject: Re: 'cat /dev/rfcomm0' yields strange data

Hi Marcel,

On Sun, Nov 15, 2009 at 1:58 PM, Marcel Holtmann <[email protected]> wrote:
> you have to switch the device into raw mode before cat will work. The
> rfcomm utility should have a --raw option.

Do I have to do that also if I plan to open /dev/rfcomm0 with an
application that expects a standard serial tty device (e.g. I usually
feed it with /dev/ttyS1) ?

Can you please explain in a few words what exactly does --raw do ?

Thanks!
Naziir
>
> Regards
>
> Marcel
>
>
>

2009-11-15 11:58:01

by Marcel Holtmann

[permalink] [raw]
Subject: Re: 'cat /dev/rfcomm0' yields strange data

Hi Ramagudi,

> # rfcomm watch /dev/rfcomm0 1 muahahahah
> Waiting for connection on channel 1
> Connection from xxx to /dev/rfcomm0
> Press CTRL-C for hangup
>
>
> on another terminal:
>
>
> # cat /dev/rfcomm0
>
> ^J^J^J
> ^J^J^J
>
>
>
> ^J
>
>
>
> ^J
>
>
>
> ^J^J
>
>
>
> ^^J
> ...
> ...
>
> and these character output goes on and on for a minute or so until it stops.
>
> Any idea what is it ? is it supposed to be here ?
> I was expecting the 'cat' command to show me only data that was sent
> from the remote end
> (e.g. If I do on the remote peer 'echo bla > /dev/rfcomm0' I do see
> the bla here on the local 'cat').

you have to switch the device into raw mode before cat will work. The
rfcomm utility should have a --raw option.

Regards

Marcel