TheDonald
Posts: 10
Joined: Sat Apr 20, 2013 12:27 am

SOLVED: Serial port - female DCE to male DTE?

Wed May 15, 2013 10:54 pm

I have another thread about building my own TTL-RS232 converter, but at this point my pre-made converter has arrived before my Maxim parts have.

I got the pre-made board hooked up and verified that it worked by logging in via the serial console.

I then modified the cmdline.txt and inittab files to disable the serial console and, using minicom on the RPi and TeraTerm and PuTTY on my desktop, verified that regular 9600-8-N-1 serial communication works.

Now I need to get my 9600-8-N-1 equipment to talk to the RPi. I guess that my PC serial port is DTE and my equipment is DCE and they communicate just fine.

I guess the port given by the MAX3232 board is also DCE(?).

The connection situation, as of now, is as follows:
- PC has male DB9 (DTE)
- RPi has female DB9 (DCE?)
- My equipment has female DB9 (DCE)
- I have a couple of male DB9 connectors and some cables that I want to use to connect the female DB9 on the RPi to the female DB9 on my equipment so that I can use the RPi to log the data coming from my equipment.

Image
(forum shrinks images - full size at http://i44.tinypic.com/xdw1lz.jpg)

I suppose that, if what's in my head is correct, to change the gender of the RPi connector and change from DCE to DTE (thus giving me basically what I have on my original PC) I would create this mystical cable as follows:

DB9M-1 Pin 5 --to-- DB9M-2 Pin 5
DB9M-1 Pin 2 --to-- DB9M-2 Pin 3
DB9M-1 Pin 3 --to-- DB9M-2 Pin 2

Is this correct, or is there more to it? I've tried cabling it up but I get nada on the minicom screen on the RPi.
Last edited by TheDonald on Thu May 16, 2013 1:45 am, edited 1 time in total.

sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am
Contact: Website

Re: Serial port - female DCE to male DTE?

Wed May 15, 2013 11:44 pm

AFAIK the UART on the RasPi provides only GND, RX and TX?

Your equipment may need some handshaking lines to talk, possibly DTR

Test this by running the equipment off the laptop through an RS232 cable with only those lines connected.
If it still works then it's probably a different problem, but if it stops talking to you then it might the the handshaking lines.

Have a look at
http://www.lammertbies.nl/comm/info/RS- ... .html#loop
and try one of the loop-back cables.

TheDonald
Posts: 10
Joined: Sat Apr 20, 2013 12:27 am

Re: Serial port - female DCE to male DTE?

Thu May 16, 2013 1:44 am

Thanks so much, sprinkmeier. You nailed it.

As soon as I read your post, I knew that was the answer. A couple years back I had to make up some cables for this equipment and I remember having to account for the handshake pins.

I used the cabling on the DB9M-to-DB9M cable I described above, jumpered pins 7 and 8 on each end and the data pops right up.

Now I just need to write some logging software to keep the data logs organized appropriately and I'll be ready to rock and roll.

Thanks again :D

Return to “Troubleshooting”