Gentoo Archives: gentoo-user

From: David Relson <relson@×××××××××××××.com>
To: gentoo-user@l.g.o
Cc: wireless@×××××××××××.com
Subject: Re: [gentoo-user] Re: serial port identification question
Date: Sun, 27 Dec 2009 14:01:45
Message-Id: 20091227073447.074b5e40@osage.osagesoftware.com
In Reply to: [gentoo-user] Re: serial port identification question by James
1 Hello James,
2
3 Thanks for writing. Lots of good information in your post!
4
5 I've working on porting some DOS code to Linux and (as you likely know)
6 the code needed for serial communications differs greatly between the 2
7 environments.
8
9 The initial problem was trying to identify COM1, COM2, etc from lots
10 of /dev/tty?? entries. There were no /dev/ttyS? entries. This was
11 solved thru googling and running MAKEDEV (for COM1, COM2, etc).
12
13 The second problem seems to be an odd pinout. The device has an RJ11
14 connector and came with an RJ11 to RS232 cable. The DB9 connector is
15 documented as TX on pin 2 and RX on pin 3 (which is normal).
16 Connecting a breakout box, indicated TX on pin 3. With a null-modem
17 and a loopback plug, send/receive started working using my program.
18
19 Send/receive was also verified using 2 terminal sessions and commands:
20
21 cat /dev/ttyS0
22 echo this is a test > /dev/ttyS0
23
24 The tip on setserial is appreciated. I learned of stty's -F ... -a
25 options, but didn't know of setserial.
26
27 Having solved/learned the above on the Gentoo box, the next trick is
28 getting my code to work on the embedded 486SX linux system (non-Gentoo).
29
30 So far I know that programmed setting of baud rate is working (as
31 confirmed with stty). However no data is being seen from the keypad
32 or the two connected preamps. They should all be continuously sending
33 data to com3, com2, and com4 (respectively).
34
35 The programming world is full of strange and wonderful problems to
36 solve, isn't it?
37
38 Regards,
39
40 David

Replies

Subject Author
[gentoo-user] Re: serial port identification question James <wireless@×××××××××××.com>