Linux PPP protocol development
 help / color / mirror / Atom feed
* serial device access from welcome script
@ 2006-09-06 12:45 Thilo Riessner
  2006-09-06 12:53 ` Thilo Riessner
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Thilo Riessner @ 2006-09-06 12:45 UTC (permalink / raw)
  To: linux-ppp

From a program called by the welcome script which tries to access the serial 
port (in this case /dev/ttyI0) I get the errormessage:
	Port or socket open error!
I guess, that the serial port is blocked by the pppd.
Is there any possibility to access the serial port nevertheless?
Thanks for any help

Thilo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* serial device access from welcome script
  2006-09-06 12:45 serial device access from welcome script Thilo Riessner
@ 2006-09-06 12:53 ` Thilo Riessner
  2006-09-06 21:53 ` James Carlson
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Thilo Riessner @ 2006-09-06 12:53 UTC (permalink / raw)
  To: linux-ppp

From a program called by the welcome script which tries to access the serial 
port (in this case /dev/ttyI0) I get the errormessage:
        Port or socket open error!
I guess, that the serial port is blocked by the pppd.
Is there any possibility to access the serial port nevertheless?
Thanks for any help

Thilo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: serial device access from welcome script
  2006-09-06 12:45 serial device access from welcome script Thilo Riessner
  2006-09-06 12:53 ` Thilo Riessner
@ 2006-09-06 21:53 ` James Carlson
  2006-09-07  6:45 ` Pieter Loubser
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: James Carlson @ 2006-09-06 21:53 UTC (permalink / raw)
  To: linux-ppp

Thilo Riessner writes:
> >From a program called by the welcome script which tries to access the serial 
> port (in this case /dev/ttyI0) I get the errormessage:
>         Port or socket open error!
> I guess, that the serial port is blocked by the pppd.
> Is there any possibility to access the serial port nevertheless?

You shouldn't be trying to access the port directly.  Instead, when
the "welcome" script runs, your script's standard input and standard
output are connected directly to the tty.

You should be able to use 'read' and 'echo' (or whatever your
scripting language supports) without having to open anything.

This is true for "connect", "disconnect", "init", and "pty" as well.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: serial device access from welcome script
  2006-09-06 12:45 serial device access from welcome script Thilo Riessner
  2006-09-06 12:53 ` Thilo Riessner
  2006-09-06 21:53 ` James Carlson
@ 2006-09-07  6:45 ` Pieter Loubser
  2006-09-07 11:59 ` James Carlson
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Pieter Loubser @ 2006-09-07  6:45 UTC (permalink / raw)
  To: linux-ppp


Have you removed the "lock" option from your ppp options file
(/etc/ppp/options)?



> >From a program called by the welcome script which tries to access the serial 
> port (in this case /dev/ttyI0) I get the errormessage:
> 	Port or socket open error!
> I guess, that the serial port is blocked by the pppd.
> Is there any possibility to access the serial port nevertheless?
> Thanks for any help
> 
> Thilo
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: serial device access from welcome script
  2006-09-06 12:45 serial device access from welcome script Thilo Riessner
                   ` (2 preceding siblings ...)
  2006-09-07  6:45 ` Pieter Loubser
@ 2006-09-07 11:59 ` James Carlson
  2006-09-07 14:44 ` Thilo Riessner
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: James Carlson @ 2006-09-07 11:59 UTC (permalink / raw)
  To: linux-ppp

Pieter Loubser writes:
> 
> Have you removed the "lock" option from your ppp options file
> (/etc/ppp/options)?

The "lock" option only creates UUCP advisory lock files; it doesn't
actually prevent access to the serial port.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: serial device access from welcome script
  2006-09-06 12:45 serial device access from welcome script Thilo Riessner
                   ` (3 preceding siblings ...)
  2006-09-07 11:59 ` James Carlson
@ 2006-09-07 14:44 ` Thilo Riessner
  2006-09-12 10:29 ` Christopher Fowler
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Thilo Riessner @ 2006-09-07 14:44 UTC (permalink / raw)
  To: linux-ppp

Am Mittwoch, 6. September 2006 23:53 schrieben Sie:
> Thilo Riessner writes:
> > >From a program called by the welcome script which tries to access the
> > > serial
> >
> > port (in this case /dev/ttyI0) I get the errormessage:
> >         Port or socket open error!
> > I guess, that the serial port is blocked by the pppd.
> > Is there any possibility to access the serial port nevertheless?
>
> You shouldn't be trying to access the port directly.  Instead, when
> the "welcome" script runs, your script's standard input and standard
> output are connected directly to the tty.
>
> You should be able to use 'read' and 'echo' (or whatever your
> scripting language supports) without having to open anything.
>
> This is true for "connect", "disconnect", "init", and "pty" as well.
Thanks for your hint, but I have the problem, that the program (which is a 
binary program) I am running out of my welcome script (which is a bash 
script) does not support the usage of stdin and stdout, but it demands the 
usage of a device for reading and writing. Is there a trick that I could use 
in the  welcome script to  redirect stdin and stdout to a "device" and use 
that device in the program, which is called from the welcome script.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: serial device access from welcome script
  2006-09-06 12:45 serial device access from welcome script Thilo Riessner
                   ` (4 preceding siblings ...)
  2006-09-07 14:44 ` Thilo Riessner
@ 2006-09-12 10:29 ` Christopher Fowler
  2006-09-13  8:13 ` Thilo Riessner
  2006-09-13 15:55 ` Bill Unruh
  7 siblings, 0 replies; 9+ messages in thread
From: Christopher Fowler @ 2006-09-12 10:29 UTC (permalink / raw)
  To: linux-ppp

Use the files /dev/stdin and /dev/stdout

On Thu, 2006-09-07 at 16:44 +0200, Thilo Riessner wrote:
> Am Mittwoch, 6. September 2006 23:53 schrieben Sie:
> > Thilo Riessner writes:
> > > >From a program called by the welcome script which tries to access the
> > > > serial
> > >
> > > port (in this case /dev/ttyI0) I get the errormessage:
> > >         Port or socket open error!
> > > I guess, that the serial port is blocked by the pppd.
> > > Is there any possibility to access the serial port nevertheless?
> >
> > You shouldn't be trying to access the port directly.  Instead, when
> > the "welcome" script runs, your script's standard input and standard
> > output are connected directly to the tty.
> >
> > You should be able to use 'read' and 'echo' (or whatever your
> > scripting language supports) without having to open anything.
> >
> > This is true for "connect", "disconnect", "init", and "pty" as well.
> Thanks for your hint, but I have the problem, that the program (which is a 
> binary program) I am running out of my welcome script (which is a bash 
> script) does not support the usage of stdin and stdout, but it demands the 
> usage of a device for reading and writing. Is there a trick that I could use 
> in the  welcome script to  redirect stdin and stdout to a "device" and use 
> that device in the program, which is called from the welcome script.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: serial device access from welcome script
  2006-09-06 12:45 serial device access from welcome script Thilo Riessner
                   ` (5 preceding siblings ...)
  2006-09-12 10:29 ` Christopher Fowler
@ 2006-09-13  8:13 ` Thilo Riessner
  2006-09-13 15:55 ` Bill Unruh
  7 siblings, 0 replies; 9+ messages in thread
From: Thilo Riessner @ 2006-09-13  8:13 UTC (permalink / raw)
  To: linux-ppp

The program needs one device for reading and writing. Therefore the /dev/stdin 
and /dev/stdout is not usable. Or do I get something wrong there?


> Use the files /dev/stdin and /dev/stdout
>
> On Thu, 2006-09-07 at 16:44 +0200, Thilo Riessner wrote:
> > Am Mittwoch, 6. September 2006 23:53 schrieben Sie:
> > > Thilo Riessner writes:
> > > > >From a program called by the welcome script which tries to access
> > > > > the serial
> > > >
> > > > port (in this case /dev/ttyI0) I get the errormessage:
> > > >         Port or socket open error!
> > > > I guess, that the serial port is blocked by the pppd.
> > > > Is there any possibility to access the serial port nevertheless?
> > >
> > > You shouldn't be trying to access the port directly.  Instead, when
> > > the "welcome" script runs, your script's standard input and standard
> > > output are connected directly to the tty.
> > >
> > > You should be able to use 'read' and 'echo' (or whatever your
> > > scripting language supports) without having to open anything.
> > >
> > > This is true for "connect", "disconnect", "init", and "pty" as well.
> >
> > Thanks for your hint, but I have the problem, that the program (which is
> > a binary program) I am running out of my welcome script (which is a bash
> > script) does not support the usage of stdin and stdout, but it demands
> > the usage of a device for reading and writing. Is there a trick that I
> > could use in the  welcome script to  redirect stdin and stdout to a
> > "device" and use that device in the program, which is called from the
> > welcome script. -
> > To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: serial device access from welcome script
  2006-09-06 12:45 serial device access from welcome script Thilo Riessner
                   ` (6 preceding siblings ...)
  2006-09-13  8:13 ` Thilo Riessner
@ 2006-09-13 15:55 ` Bill Unruh
  7 siblings, 0 replies; 9+ messages in thread
From: Bill Unruh @ 2006-09-13 15:55 UTC (permalink / raw)
  To: linux-ppp

On Wed, 13 Sep 2006, Thilo Riessner wrote:

> The program needs one device for reading and writing. Therefore the /dev/stdin
> and /dev/stdout is not usable. Or do I get something wrong there?
>

???? reading=/dev/stdin, writing=/dev/stdout. ???

Also a device or whatever can in general be opened for both reading and
writing.


>
>> Use the files /dev/stdin and /dev/stdout
>>
>> On Thu, 2006-09-07 at 16:44 +0200, Thilo Riessner wrote:
>>> Am Mittwoch, 6. September 2006 23:53 schrieben Sie:
>>>> Thilo Riessner writes:
>>>>>> From a program called by the welcome script which tries to access
>>>>>> the serial
>>>>>
>>>>> port (in this case /dev/ttyI0) I get the errormessage:
>>>>>         Port or socket open error!
>>>>> I guess, that the serial port is blocked by the pppd.
>>>>> Is there any possibility to access the serial port nevertheless?
>>>>
>>>> You shouldn't be trying to access the port directly.  Instead, when
>>>> the "welcome" script runs, your script's standard input and standard
>>>> output are connected directly to the tty.
>>>>
>>>> You should be able to use 'read' and 'echo' (or whatever your
>>>> scripting language supports) without having to open anything.
>>>>
>>>> This is true for "connect", "disconnect", "init", and "pty" as well.
>>>
>>> Thanks for your hint, but I have the problem, that the program (which is
>>> a binary program) I am running out of my welcome script (which is a bash
>>> script) does not support the usage of stdin and stdout, but it demands
>>> the usage of a device for reading and writing. Is there a trick that I
>>> could use in the  welcome script to  redirect stdin and stdout to a
>>> "device" and use that device in the program, which is called from the
>>> welcome script. -
>>> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-09-13 15:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-06 12:45 serial device access from welcome script Thilo Riessner
2006-09-06 12:53 ` Thilo Riessner
2006-09-06 21:53 ` James Carlson
2006-09-07  6:45 ` Pieter Loubser
2006-09-07 11:59 ` James Carlson
2006-09-07 14:44 ` Thilo Riessner
2006-09-12 10:29 ` Christopher Fowler
2006-09-13  8:13 ` Thilo Riessner
2006-09-13 15:55 ` Bill Unruh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox