LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Probing the nine pin serial port (https://www.linuxquestions.org/questions/linux-hardware-18/probing-the-nine-pin-serial-port-551968/)

hpladd 05-07-2007 10:27 AM

Probing the nine pin serial port
 
Hey All,

I'm experimenting with the "LOW SPEED DATA" port on my DirecTV Box (model #DRD523RB). I've connected to the DirecTV box via a nine pin serial connector. I hope to use the port to change channels etc.

I have no idea how to probe the port for "signs of life."

Any suggestions much appreciated.

Perhaps the following info will help:

Quote:

root@mythboxen# cat /dev/proc/ttyS?
/dev/ttyS0
/dev/ttyS1
/dev/ttyS2
/dev/ttyS3
/dev/ttyS4

root@mythboxen# cat /dev/proc/ttyS??
No such file or directory

root@mythboxen# cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
14 sound
21 sg
29 fb
61 BaseRemoteCtl
81 video4linux
116 alsa
128 ptm
136 pts
171 ieee1394
180 usb
189 usb_device
195 nvidia
212 DVB
251 pcmcia
252 aac
253 megaraid_sas_ioctl
254 megadev_legacy

Block devices:
1 ramdisk
2 fd
3 ide0
7 loop
8 sd
9 md
11 sr
22 ide1
65 sd... #edited for brevity
135 sd
253 device-mapper
254 mdp

theNbomr 05-07-2007 11:40 AM

The first thing to do is to establish which logical tty is connected to the physical serial port. If there is only one serial port on the computer, then it will almost certainly be /dev/ttyS0. If not, you will have to experiment a bit. I like to get a program like C-Kermit or minicom, and use it to try sending data to a logical tty (type at the keyboard) while pins 2 & 3 on the serial port are jumpered together. When you see characters echo back whenever the jumper is installed, but stop echoing when the jumper is removed, you established the correlation between a logical device and a physical device.

Next, you will need to establish whether the set-top box is a DTE or DCE. This will dictate whether your cable needs to be a straight through cable, or one that crosses over the Tx & Rx signals, along with possibly other modem control signals. This is fairly easy if you hav a DVM or other way to meacure low voltage DC signals. The Tx signal on a serial interface with normally be driven to a logical zero, repesented by a positive voltage, somewhere between 6 & 12 volts DC. This signal will be on either of pins 2 or 3 on each interface (I guess we should assume that the set-top box uses some industry standard pin numbering scheme). The chassis may be used as a ground ref, pin 7 is even better. A functioning connection will require the Tx pin on each device to be connected to the Rx pin on the counterpart device.

Code:

2 ----------------------------- 2

3 ----------------------------- 3

Code:

2 ----------\  /--------------- 2
            \/
            /\
3 ----------/  \--------------- 3

Once you establish this, you will need to guess at the communications parameters, such as bit rate, parity, and number of data and parity bits. A very good first guess would be 9600 BPS, 8 data, 1 stop, no parity. Using your terminal emulator these seting are easy to modify. If the box only sends binary data not intended for direct human interpretation, it will be very difficult to establish when you've encountered the correct settings. In fact you may not ever be able to gues the correct settings this way, as it may not respond with anything until it has received some non-ASCII byte sequence that you are unable to send via a keyboard. The nature of the data sent on the interface should be documented, to explain how to operated the device through the interface.

You will probably have plenty of questions along the way. Come back here to ask away.

--- rod.

hpladd 05-07-2007 06:26 PM

Wow! thanks for taking the time to give such a thorough answer!

I'll take it step by step. First step find cKermit or minicon. Would I need some type of break out box to do the jumpering?

Thanks Again.

theNbomr 05-07-2007 06:58 PM

A breakout box works best, and usually has indicators to use to display signal levels. To jumper two adjacent pins, I often just use a small screwdriver tip. Helps to have some kind of third hand. It didn't sound like you had a lot of experience with these matters, and were unlikely to have a breakout box.

Oh, and while you are looking for minicon, look for minicom, instead (unless that was just a typo). It is probably already installed on your linux. C-kermit, might be. Should be easy to find.

--- rod.

dxqcanada 05-07-2007 07:15 PM

Google says:

http://www.mythtv.org/wiki/index.php...29_Port_Pinout
http://www.dtvcontrol.com/

hpladd 05-07-2007 10:11 PM

Wow! thanks for taking the time to give such a thorough answer!

I'll take it step by step. First, find and get to know cKermit or minicon.

Would I need some type of break out box to do the jumpering?

Thanks Again,

hpladd 05-07-2007 10:22 PM

Oops, sorry for the double post!

hpladd 05-07-2007 10:35 PM

Rod,

Quote:

It didn't sound like you had a lot of experience with these matters, and were unlikely to have a breakout box.

Oh, and while you are looking for minicon, look form minicom, instead (unless that was just a typo). It is probably already installed on your linux. C-kermit, might be. Should be easy to find.
You're right! I don't have any experience with this. Don't even know what a break-out box is -- yet. I learned the term researching this project.

Mincon was a bust. I found Minicom in a second.

Thanks for your patience and help.


All times are GMT -5. The time now is 06:18 PM.