LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-07-2007, 10:27 AM   #1
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
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
 
Old 05-07-2007, 11:40 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
Old 05-07-2007, 06:26 PM   #3
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
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.
 
Old 05-07-2007, 06:58 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

Last edited by theNbomr; 05-08-2007 at 12:44 AM.
 
Old 05-07-2007, 07:15 PM   #5
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Google says:

http://www.mythtv.org/wiki/index.php...29_Port_Pinout
http://www.dtvcontrol.com/
 
Old 05-07-2007, 10:11 PM   #6
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
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,
 
Old 05-07-2007, 10:22 PM   #7
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Oops, sorry for the double post!
 
Old 05-07-2007, 10:35 PM   #8
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
serial port direct pin programming Lotharster Programming 5 04-08-2006 08:23 AM
Need help to read a signal from the CTS pin of a serial port juan_de_margo Linux - Hardware 0 02-24-2005 03:36 AM
configuring 25 pin serial null modem dnijaguar Linux - Networking 2 09-03-2004 02:46 PM
Why the STROBE pin in parallel port?? arunshivanandan Linux - General 3 09-01-2004 08:28 AM
Controlling serial port RTS pin from 'C' program dcarter Slackware 1 09-26-2003 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration