General
cancel
Showing results for 
Search instead for 
Did you mean: 

Serial over IP / Virtual Serial Port on HP-UX

DaBe
Occasional Advisor

Serial over IP / Virtual Serial Port on HP-UX

Hi all,
we have a GSM-Modem which is connected to the network via TCP/IP. Now we want to configure the modem on our HP-UX Box. Therefore we have to configure a "Virtual Serial Port" which can be used by the application. There are software solutions for Linux and Windows emulating a local serial port. Does anybody know a similar solution for HP-UX?

Any help is appreciated.
10 REPLIES
Steven E. Protter
Exalted Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

Shalom,

Vpars or HP-UX Virtual machine does permit access and use of the serial port.

You should provide information on the version of the OS and hardware of the host OS to get more specific assistance.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

SEP: "Vpars or HP-UX Virtual machine does permit access and use of the serial port."

Could you please explain how to?

I'm not aware of something like virtual serial ports in hp-ux (except virtual consoles), but most systems have a "real" serial port for modems.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
DaBe
Occasional Advisor

Re: Serial over IP / Virtual Serial Port on HP-UX

Hi,

currently we are not using VPARs or iVM on this host. The OS Version is 11.23 at the moment but will be replaced by 11.31 soon.

We cannot connetc the modem to the serial port of the machine directly as it has only a tcp/ip interface.
My application only supports a local serial device so I need to configure something like a serial device that communicates via tcp/ip with the modem.

Application <-> Virt. Serial Port <-> Network via TCP/IP <-> GSM-Modem
Torsten.
Acclaimed Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

I don't think this can work anyhow, but IMHO if a device has a LAN connector it can work with lan connections directly. Maybe you can configure a fixed number, so he modem can dial if your server requests it (like a router does).

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
TTr
Honored Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

How does the modem listen for serial port traffic? Does it use a port? If so the hpnptyd daemon that is part of the hppi software (jetadmin) can be used.
This daemon binds a local HP-UX pseudo terminal to a port on a network device.
TTr
Honored Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

In my reply above
> Does it use a port?
This is a TCP port of course. If the GSM modem has an internal serial port which is associated with a TCP port then the hpnptyd daemon should do what you need.
Olivier Masse
Honored Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

Digi makes a software named RealPort that does this and it supports HP-UX, however the protocol is proprietary and your serial device must be hooked up to a Digi serial server.

From what I understand, your device is straight TCP so it might be possible to write something (in C or preferably perl) that redirects whatever passed through /dev/tty0pX to a raw TCP port.

I found the following which seems to do this:
http://lpccomp.bc.ca/remserial/

But it's for Linux, there might be some porting needed to make it work on HP-UX.

Good luck

TTr
Honored Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

> that redirects whatever passed through /dev/tty0pX to a raw TCP port...remserial.

This is the opposite of what is asked here. The HP-UX server does NOT have a physical serial port and neither an attached serial device. What DaBe wants to do is use a pseudo tty on the HP-UX server to connect via TCP to a network device (LAN attached GSM modem).
Olivier Masse
Honored Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

I built remserial on HP-UX and it seems to at least compile without error, and it lets me link /dev/tty1p0 which is an unused port on my system to a remote network port. I bridged it to a telnet-enabled server. Lsof shows me that both are open so it might work. I never figured out how cu works so I can't test it, but it seems to establish a socket connection. That's as far as I'll go.

Good luck
Olivier Masse
Honored Contributor

Re: Serial over IP / Virtual Serial Port on HP-UX

Ok try this:

remserial -d -r remote_device -p remote_port -l /dev/remserial1 /dev/ptmx

Then connect to /dev/remserial1

It should work. But I can't test it.