Mac Screen CR/LF problem

24 Jul 2010

Information on how to set Screen /dev/tty.usbmodem1d2f  to translate /n to CR LF Please.

J.Knott

26 Jul 2010 . Edited: 26 Jul 2010

 

I found this issue so frustrating when working with the mbed on OSX that I have written my own simple Serial Terminal program (SerialTerminal.app) which adds the carriage returns necessary to maintain sanity.

The program provides lists of the serial ports and baud rates available and remembers your previous settings to connect automatically on startup.  It also provides a handy menu item to unmount/mount the mbed.

Anyone who wishes to try it can download from:

http://homepage.ntlworld.com/green_bean/mbed/SerialTerminal.app.zip

The program is suitable for 64 bit Intel based Macs with java 1.6  or higher set as the default.  Tested on OSX 10.6.4.

28 Jul 2010

Hi,

Another option to solve the CRLF and the saving to file problem in some cases is possibly just to use cat on the stream:

cat /dev/tty.usbXXX             // stream to screen
cat /dev/tty.usbXXX > file.txt  // stream to file
Works fine, although i'm not sure how you should exit to cleanly release the serial port. On the mac I just tested on, it seemed once you ht ctrl-c or ctrl-\ to exit, running the command again didn't work and had to release the serial port (e.g. unplug/replug)

Someone may know a way to release/exit cat cleanly, or a way to easily release the serial port without resorting to physical unplugging :)

Simon

06 Feb 2013

Thank you for this Tom. Just got my new mac mini setup for mbed development and started changing my '\n' to '\n\r' and then got frustrated and then found this thread. Thank you so much for this litlte program! Much appreciated.

- Tyler

08 Mar 2013

You could also try Coolterm, which seems to've been written just for this task. I've only started to use my Kinetis board and have only loaded the Hello World program so I'm not even a novice yet. But, lo and behold it was as easy as using my Arduino. After spending some time trying to get Codewarrior or COOCOX to work under Wine and getting nowhere fast I'd all but given up on using this board under OS X, then I stumbled upon MBED and I hold out great hope of it being a long and productive experience. Mike