Discussion:
echo and tty issue
Add Reply
Philip Yao
2018-11-18 17:49:16 UTC
Reply
Permalink
Hi,

I'm experiencing an issue with echoing into a tty serial port on my mac.
Does there exist any issues relevant to this with MacPorts?

Thanks
Pierre Malard
2018-11-18 19:32:47 UTC
Reply
Permalink
A simple Shell question: just send standard output to this TTY like that:
echo toto > /dev/<TTY>
where <TTY> is the serial device used.
Hi,
I'm experiencing an issue with echoing into a tty serial port on my mac. Does there exist any issues relevant to this with MacPorts?
Thanks
--
Pierre Malard

«[...]développer la science ? Noble ambition ; mais qu'est-ce que
la science ? Une puissance et une joie ; et, si elle ne s'anime pas
de l'esprit de justice, [...] de la vie des hommes, [...] elle est un
privilÚge en plus.»
Jean Jaures - "L'idéal de justice" - 1889
|\ _,,,---,,_
/,`.-'`' -. ;-;;,_
|,4- ) )-,_. ,\ ( `'-'
'---''(_/--' `-'\_) πr

perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-. ;-;;,_: |,A- ) )-,_. ,\ ( `'"'"'-'"'"': '"'"'-3'"'"'2(_/--'"'"' `-'"'"'\_): 24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--
Dave Horsfall
2018-11-18 20:33:37 UTC
Reply
Permalink
Post by Pierre Malard
A simple Shell question: just send standard output to this TTY like
that:echo toto > /dev/<TTY> where <TTY> is the serial device used.
And you'll need to configure the tty port for speed etc, of course, and
that's where it starts to get tricky.

It would be helpful if the original problem was stated more fully, but
that has little to do with MacPorts.

-- Dave
Philip Yao
2018-11-18 20:43:23 UTC
Reply
Permalink
I am trying to echo like so:

echo -ne “hello” > try.mydevice

and I believe I have the correct baud rate settings. I can screen into my
tty device just fine and everything works on a Linux computer.

I found some old stackexchange post mention some problem with echo and
macports, so I’m just making sure.

Thanks
Post by Dave Horsfall
Post by Pierre Malard
A simple Shell question: just send standard output to this TTY like
that:echo toto > /dev/<TTY> where <TTY> is the serial device used.
And you'll need to configure the tty port for speed etc, of course, and
that's where it starts to get tricky.
It would be helpful if the original problem was stated more fully, but
that has little to do with MacPorts.
-- Dave
j***@tigger.ws
2018-11-19 12:59:53 UTC
Reply
Permalink
Post by Dave Horsfall
Post by Pierre Malard
A simple Shell question: just send standard output to this TTY like
that:echo toto > /dev/<TTY> where <TTY> is the serial device used.
And you'll need to configure the tty port for speed etc, of course, and
that's where it starts to get tricky.
It would be helpful if the original problem was stated more fully, but
that has little to do with MacPorts.
You’d do better installing minicom

eg
stty 19200 </dev/cu.whatervertty (it was 9600)
echo 123 > /dev/cu.whatervertty

It comes out at 9600 baud. Error? No! It was 9600, stty set it to 19200, but when stty was finished it may revert to 9600. That kind of tricky

James

Loading...