The installation uses PCs running the Windows98 version of TinyTerm emulator
to connect to the server through a network hub.
One of the PCs acts as a retail till, with cash drawer etc, and needs to run
different programs than the other PCs. The software house normally uses
terminals with serial connections, and has coded it so that their system
runs the till software based on the tty connection number.
However, with this installation, it's trying to identify the till by a ttyp
number, and this is being allocated on a "first come, first serve" basis.
Hence the till's ttyp number can be different, and therefore will not always
run the till software.
I suggested that they identify the till by something fixed such as the MAC
address, login name, or TCP/IP address, but it seems that they can't (won't)
change it.
My question is, is there anyway to "lock" a ttyp number to one particular
terminal - possibly as part of a login script?
Thanks in advance
David Nash
We had the same problem. We have Real World accounting point of sale
software at a client, and they had all registers that were hardwired
over serial lines. Then they installed a network, and wanted to start
using some registers that are actually PC's. This was fine, except
for the pseudo tty problem.
We have the source, so we changed the software to check if it was
running on a PC versus a serial terminal. If so, we retrieved the
ttyp device, and set all the register printing and cash-drawer opening
to use this device. The added problem is that the terminal emulator
on the PC needs to do transparent printing, so we also had to add
special codes to the print logic to signal the emulator to pass the
receipt printing and drawer open codes on to the PC's printer.
This situation is probably why the software vendor won't help you.
IOW, they wont reprogram to do dynamic dev assignments, or it is not
possible.
There was talk in this newsgroup before about allowing static
assignment of pseudo tty's, but I never saw any concrete or easy ways
to do this. I am hoping someone here has found something and posts
it, as I would like to use it too.
Either way, be aware that you will need to do transparent printing in
order to send reports and drawere open codes down the same ttyp that
you are using for the terminal.
There may be a way around the whole mess if you can specify spoolers
in the software instead of devices. I am assuming you just need to
print and send the drawer open codes to the PC. What you would do is
setup an LPD server on the PC so that it allows printing from unix
over the network. Then in unix you add the printer to the PC. Then in
the software where it uses a device for printing, substitute the
spooler.
Just some ideas and info. Post if you have any questions.
Paul
There is a way around this though. You can use an LPD server on the
--------------------------------------
To reply by email, please take out
*REMOVETHIS* from my email address
>I have installed OpenServer 5.0.5 for a customer, mainly so that they can
>use a retail/wholesale system supplied by a third party software house.
>One of the PCs acts as a retail till, with cash drawer etc, and needs to run
>different programs than the other PCs. The software house normally uses
>terminals with serial connections, and has coded it so that their system
>runs the till software based on the tty connection number.
>
>However, with this installation, it's trying to identify the till by a ttyp
>number, and this is being allocated on a "first come, first serve" basis.
>Hence the till's ttyp number can be different, and therefore will not always
>run the till software.
>
Try to find out how they know it's ttyp5 for example. If they use the
'tty' command you could rename it and replace it with a shell script that
could return a fixed tty. You could also change the PATH of the software
to look in /usr/local/bin and put a 'tty' script in there.
Ultimately they should update their software, it's pitifull to think that a
software vendor thinks everyone is still using serial ports for
connectivity.
Gary Quiring
(1) The till PC logs in on ttyp?? and then
executes "cu -l tty1a" to make a connection out
through the serial port, which is wired straight
to the other serial port. It then logs in _again_
on tty2a. Fixed port. TinyTERM (we use it too)
can automate the (first) login.
(2) Reserve ttyp0 at boot time by "telnet
localhost". When the till user logs in, this is
cancelled, freeing ttyp0 so that the till user can
do "telnet localhost" and log in on it. When till
user logs out, you make the system reserve ttyp0
again. If this lock is broken and another user
connects to ttyp0, you have statements in the
user's .profile to disconnect the user and get the
reservation reinstated.
(3) Conceivably, at boot time you could start
"telnet localhost" which logs in on ttyp0, with
input and output tied to FIFO special files
created with the mkfifo command. When the actual
till user logs in on any port, their shell is
connected to the other end of the fifo pipes, so
their input appears as ttyp0 input and ttyp0 utput
appears on their screen.
Maybe you could do that one by using fifos but
without telnet - use the fifos _instead_ of a
named terminal? That doesn't use up a user
connection.
If you want to stop the user escaping to a shell,
with SCO telnet you can use the "-E" switch; I
don't think you can do an equivalent with "cu",
so maybe it would be better instead to do raw cat
from the telnet session in and out of the
specified serial port.
Robert Carnegie
Sent via Deja.com http://www.deja.com/
Before you buy.
Thanks,
Paul
On 10 Dec 1999 04:16:54 -0600, John H <he...@ujoint.org> wrote:
>
>
>I've accomplished something using FacetTerm
>http://www.facetcorp.com/ft_overview.html
>
>By editing the user's .profile, you can specify how many pseudo tty's to
>open, and which ones. So the initial login comes in on whatever the lowest
>ttyp choice is and the facetterm fires up and runs, spawns a new window or
>windows starting at..ohh ttyp80, ttyp81, ttyp82, etc.. Up to 10 sessions per
>login.
>
>We've configured FacetTerm so that when the user logs in to SCO, facetterm
>fires up automatically and spawns a new ttyp and then spawns our application.
>So user x will always be on the same ttyp when running our app. Just make
>sure to add enough pseudo ports via netconfig so actual user count doesn't
>hit the pseudo port assignments for the facetterm windows.
>
>Example:
>
>We have 128 pseudo ttys assigned via netconfig
>
>User X logs in to ttyp0
> FacetTerm opens ttyp80, 81, and 82
> Our app runs on ttyp80
>
>User Y logs in to ttyp1
> FacetTerm opens ttyp90, 91, and 92
> Our app runs on ttyp90
>
>User Z logs in to ttyp2
> FacetTerm opens ttyp100, 101, and 102
> Our app runs on ttyp100
>
>Good Luck.
>
>-----
>-John Hiemenz, Certified Computer User & Abuser
> the Universal JoiNT - Where Unix Joins NT
Enough!
Log in and start a FacetTerm sessions with 1 windows - SCO Licenses used 1
Log in and start a FacetTerm sessions with 3 windows - SCO Licenses used 1
Log in and start a FacetTerm sessions with 5 windows - SCO Licenses used 1
and so forth.
The "reserved" ptty is not. Quite simply you configure FacetTerm to
use ptty numbers high enough that there is little chance the system will
be using them at the time of login. Providing you have enough pttys
configured, it almost always works but can fail.
--
==========================================================================
Tom Parsons t...@tegan.com
==========================================================================
>>There was talk in this newsgroup before about allowing static
>>assignment of pseudo tty's, but I never saw any concrete or easy ways
>>to do this. I am hoping someone here has found something and posts
>>it, as I would like to use it too.
>>
> I've accomplished something using FacetTerm
> http://www.facetcorp.com/ft_overview.html
> By editing the user's .profile, you can specify how many pseudo tty's to
> open, and which ones. So the initial login comes in on whatever the lowest
> ttyp choice is and the facetterm fires up and runs, spawns a new window or
> windows starting at..ohh ttyp80, ttyp81, ttyp82, etc.. Up to 10 sessions per
> login.
Why not just use mscreen, then?
.mscreenrc usage and format
+++++++++++++++++++++++++++
mscreen automatically assigns pseudo terminal devices when it starts up. If
necessary, you can assign pseudo terminals by creating a file named
.mscreenrc in your home directory.
.mscreenrc contains a list of pseudo terminals to be used, for example:
ttyp0
ttyp1
...
ttypn
-sw