Serial console cable selection

After playing with an Rpi2 for a while, it looks like a serial console cable would be a good idea. The display hosts would be either an old-ish Intel CoreDuo Imac, with USB ports, or an even older but still reliable Intel box with traditional RS-232 serial ports having 9-pin male dsub connectors.

For the moment I tend to favor an RPi-RS-232 solution, but they don't seem common. USB to RPi adapters seem more common, but it appears they require device drivers, which I'd rather avoid if possible.

Speed isn't an issue, 9600N81 is fine if the Pi will run that slow.

Thanks for reading, and any guidance.

bob prohaska

Reply to
User Bp
Loading thread data ...

Pardon me for clarifying, but when you say RPi-RS-232, you mean a physical RS-232 cable from the rPi as compared to a USB dongle with an RS-232 connector? The RPi-RS-232 would require a level shifter to match the expansion connector serial port to the RS-232 standard. Is that correct?

I believe I have seen these expansion port adapters before. If you can't find one, I would be happy to make one for you. It is a very simple design. I'm sure you aren't the only person in the world who wants to use that serial port.

--

Rick
Reply to
rickman

I've made an adapter that connects the Pi to a PC or serial terminal (I sometimes use an old Wyse60 terminal).

What you need is a MAX3232 chip (not the MAX232 which runs at 5V instead of the 3.3V the Pi needs). You can get ready-built boards with a DB9 socket on for a few quid. Then just connect them to TxD, Rxd, GND and

3v3 on the Pi and you're done.

Set the console and terminal speed to whatever you want in cmdline.txt and /etc/inittab and you're ready to go.

I use 19200 or 9600 for the terminal, and 115200 for a PC. As there's no handshaking it might be wise to set it to a lower rate to avoid buffer overruns.

Reply to
Dom

I used these cables and work without problems. You need to install a driver on the PC side though.

formatting link

Bye Jack

--
Yoda of Borg am I! Assimilated shall you be! Futile resistance is, hmm?
Reply to
Jack

On 16/06/2015 08:23, Jack wrote: []

Thanks for that pointer, Jack. These also look very useful:

formatting link

formatting link

GBP 10 + tax from RS components:

formatting link

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

How are you planning to get serial data out of the RPi? Plugging a USB- Serial adapter into it would be easiest.

You don't say what OS the PC with serial ports is using. As I've used serial ports under both Linux and DOS/Windows, here's what I know:

If the PC end is running Linux, there's no general issue because all Linuxes have serial port drivers and utilities for setting baud rate, parity and stop bits: its serial ports can talk to the usb adapter at the RPi end. The standard set of USB Serial drivers and configuration utilities should be available for Raspbian.

I've also used serial ports from DOS/early Windows. I don't know whether later Windows (XP or later) now have serial drivers, but I suspect not since serial ports have been on the way out from well before XP was released. Microsoft has never released serial drivers for either DOS or earlier Windows, so an application that used serial ports either rolled its own built-in drivers or used a third-party library such as Willies COM-DRIV. Programs I've written using COM-DRIV worked well (I used them to receive data from serial GPS receivers) and so did Kermit, a program that can emulate most serial terminals and do file transfers over serial lines.

Why not simply use an Ethernet connection? Configured SSH for X.11 forwarding on the RPi and you will have both textual and graphic apps running on a Linux box with nothing more needed. If your PC is running Windows, PUtty lets textual apps run and installing one of the OSS X-Term packages (Cygwin/X, VcXsrv, XWinLogon) lets the RPi use a graphical desktop.

I don't know what you'd need on the iMac, but I'm certain somebody else will know about that.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

I think you can relax on that one!

Every version of Windows has drivers for standard COM: ports and all the USB->serial manufacturers provide drivers for their virtual COM: ports

Reply to
Andy Burns

Wouldn't it be easier to put both on a network and ssh in?

Reply to
ray carter

The serial USB cable I bought worked out of the box on Debian (initially to connect to a Pi with a corrupted memory card). Perhaps ironically (being a port of software written originally for W******), Putty is the best Linux software I've yet found for serial terminal emulation.

Reply to
Hils

Have you tried:

screen /dev/ttyUSB0 9600

--

-TV
Reply to
Tauno Voipio

But that doesn't give you a serial _console_, i.e. a terminal where the boot messages are sent to and that works even if the system is unable to go multiuser or something upsets the network settings. If you are running the Pi headless it is only a matter of time before you'll need it even if you manage initial set up without one.

--
Andrew Smallshaw 
andrews@sdf.lonestar.org
Reply to
Andrew Smallshaw

Aye, there's the rub! 8-)

This looks like it might be appropriate:

formatting link

It's DCE, all I have to do is make up a 4 conductor cable over to the Pi. Soldering up those tiny connectors will be a challenge.

Does anybody see a fly in the ointment?

Just to clarify, the Intel box is running FreeBSD, so serial terminal support is there. It's also close to the Pi, so cables won't be long. The Mac (my terminal) is some distance away. All three are on Ethernet.

Thanks for reading and replying,

bob prohaska

Reply to
User Bp

Interesting, I never thought of using screen for that... I discovered some years ago that serial-term in Emacs works pretty well for basic serial terminal stuff, even in Windows.

Reply to
Anssi Saari

Screen works nicely at 115200 baud with the cable I have. But serial-term doesn't work at all. :-(

Reply to
Hils

If you want to solder/breadboard something up it looks like the max3222 is the 3.3v to ``true'' rs232 (if I recall/unsderstand correctly it gives

+/-10V) and is available in dip. The plain max232 is cheaper on digikey. It's nonminally 5v/ttl but my understanding is that the GPIO pins go from close to zero to close to 3.3V (at least from 2.2V) and can drive TTL fine. Driving the pi you need a current limiting resistor on the pi's input. You still need 5V to drive the charge pump but you got that, so perhaps the max3222 is only needed if you have a pure 3.3V circuit.

Google should give you examples & the datasheets have example circuits too.

Ron

Reply to
colonel_hack

At this point a packaged solution for $10 looks pretty good if I only have to solder wires. If I'm reading

formatting link
corectly it appears that all the level changes are taken care of in both directions. Thanks for reading,

bob prohaska

Reply to
User Bp

This was the cable I bought. Excellent piece of equipment, plug and play with Debian. I suspect most Pi hackers will need one at some time.

formatting link

Reply to
Hils

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.