?
Solved

How to access serial com port?

Posted on 2003-03-17
12
Medium Priority
?
14,443 Views
Last Modified: 2013-12-09
HI,

I have a device that configurable thru serial port and I can use Windows HyperTerminal to communicate it with my PC serial RS 232 port.  Now I move this port to attach to an UNIX machine's serial port.  What is the tty that I should use(ttys1?) and how do I configure(baud rate, etc) and access from unix?  I moved this box to unix so that I can telnet it from any ip network.

Thanks
0
Comment
Question by:lsmgms
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +1
12 Comments
 

Accepted Solution

by:
yheffen earned 400 total points
ID: 8156132
You are looking for the tip(1) or cu(1) command. See
the manpage for details or post more specific queries.
0
 
LVL 1

Author Comment

by:lsmgms
ID: 8157015
More help is needed, please.

For example, when I use HyperTerminal, by typing "help", it will show a help list.  How do I achieve this in Unix?
0
 
LVL 2

Expert Comment

by:jimbb
ID: 8157164
COM1-4 will be tty00-3 on OpenBSD.

For example, COM2 would be tty01 (/dev/tty01).

As yheffen says, you can use 'tip' or 'cu' as your client program.  Each of them has a man page:

man tip
man cu
(actually it's the same man page on OpenBSD)

There's also an excellent terminal program called 'minicom' that has more features if you need it.  It can be installed through the 'ports' system.

The man page describes how to configure the port; specifically, it looks for a definition in /etc/remote.  That file also has its own man page:

man remote
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:yheffen
ID: 8157214
For detailed help on tip(1) or cu(1), type,

  $ man tip

At a shell prompt.

I'll use tip(1) as an example of what you might do to communicate
at 9600 baud on cua00 (this would be COM1 in DOS),

  # tip -9600 cua00

To get help while the program is running, type,

  ~?
0
 

Expert Comment

by:yheffen
ID: 8157228
For detailed help on tip(1) or cu(1), type,

  $ man tip

At a shell prompt.

I'll use tip(1) as an example of what you might do to communicate
at 9600 baud on cua00 (this would be COM1 in DOS),

  # tip -9600 cua00

To get help while the program is running, type,

  ~?
0
 
LVL 2

Expert Comment

by:jimbb
ID: 8157303
Ahh yes of course, as yheffen says, if you're "calling out" then you'll want to use the 'cua' devices, not the 'tty' ones.  Disregard that part of what I said. ;)
0
 
LVL 62

Expert Comment

by:gheist
ID: 8162084
Yo may chose a ports/comms/minicom for Curses-based terminal program or ports/comms/seyon for X-based terminal program, tip and cu are hard to learn and very impractical, as most serial access is done via pppd/ppp/getty etc
0
 
LVL 1

Author Comment

by:lsmgms
ID: 8163618
Hi,

Thanks for everybody.

I tried these few commands and they did not work:
tip -9600 cua00

tip -9600 tty00
>>tip: unknown host tip9600

However, after adding the following line to the /etc/remote, then it worked:

console:dv=/dev/tty00:br#9600
tip console

I guess it is because I am using NetBSD instead of Open BSD and a system name has to be defined in remote file?

0
 
LVL 1

Author Comment

by:lsmgms
ID: 8163624
Sorry, typo, I meant:

tip -9600 /dev/tty00
>>tip: unknown host tip9600
0
 
LVL 62

Expert Comment

by:gheist
ID: 8168204
then corrected typo - get minicom or seyon from pkgsrc, they are more like terminals with file transfer support
0
 

Expert Comment

by:yheffen
ID: 8168762
tip(1) does support file transferes. See the,

  ~<
  ~>
  ~p
  ~f
  ~|
  ~$
  ~C

Escapes.

Feel free to use one of those ports of course, but the best thing about tip(1) is that "its always there." It's good to have a basic understanding of how to use it.

Glad you got it working. Yes, it would have been helpful to have known what *BSD or UNIX flavor you were using from the start. For tip(1), the "system" always needs to be in the remote(5) file, but we were giving you recommendations based on what is in the default remote(5) on OpenBSD. The default remote(5) varies between OSes.
0
 
LVL 1

Author Comment

by:lsmgms
ID: 8171077
Thanks everybody, thanks yheffen
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question