• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 14458
  • Last Modified:

How to access serial com port?

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
lsmgms
Asked:
lsmgms
  • 4
  • 4
  • 2
  • +1
1 Solution
 
yheffenCommented:
You are looking for the tip(1) or cu(1) command. See
the manpage for details or post more specific queries.
0
 
lsmgmsAuthor Commented:
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
 
jimbbCommented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
yheffenCommented:
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
 
yheffenCommented:
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
 
jimbbCommented:
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
 
gheistCommented:
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
 
lsmgmsAuthor Commented:
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
 
lsmgmsAuthor Commented:
Sorry, typo, I meant:

tip -9600 /dev/tty00
>>tip: unknown host tip9600
0
 
gheistCommented:
then corrected typo - get minicom or seyon from pkgsrc, they are more like terminals with file transfer support
0
 
yheffenCommented:
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
 
lsmgmsAuthor Commented:
Thanks everybody, thanks yheffen
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now