Configuring serial port

Discussion in 'Perl Misc' started by Mike Kelly, Jun 4, 2004.

  1. Mike Kelly

    Mike Kelly Guest

    I hadn't thought of using perl for this, but I saw a mention on a web
    site that someone used a trivial little perl program to set the
    parameters on a serial port for barcode scanner input...

    What I need to do is set the baud rate, parity, and start and stop
    bits so I can talk to a change machine, which is a pretty primitive
    device, and wants 9600,7,e,1

    Frankly, I don't care whether I use perl or not, but in an hour of
    googling and searching various linux sites I haven't come across the
    right combination of terms to find an appropriate command line... so ,
    whether it's perl or something else... if you can point me in the
    right direction, I'd appreciate it.
     
    Mike Kelly, Jun 4, 2004
    #1
    1. Advertising

  2. Mike Kelly

    Jacob Heider Guest

    On Fri, 04 Jun 2004 00:29:09 -0500, a posting issued forth from Mike Kelly...
    > I hadn't thought of using perl for this, but I saw a mention on a web
    > site that someone used a trivial little perl program to set the
    > parameters on a serial port for barcode scanner input...
    >
    > What I need to do is set the baud rate, parity, and start and stop
    > bits so I can talk to a change machine, which is a pretty primitive
    > device, and wants 9600,7,e,1
    >
    > Frankly, I don't care whether I use perl or not, but in an hour of
    > googling and searching various linux sites I haven't come across the
    > right combination of terms to find an appropriate command line... so ,
    > whether it's perl or something else... if you can point me in the
    > right direction, I'd appreciate it.
    >
    >


    This isn't a perl answer, but the canonical way to deal with the serial
    port under linux is 'setserial'. If it's not installed (I don't know
    what you're running), you should be able to find it.

    GL
    Jacob
     
    Jacob Heider, Jun 4, 2004
    #2
    1. Advertising

  3. Mike Kelly

    Anno Siegel Guest

    Mike Kelly <> wrote in comp.lang.perl.misc:
    > I hadn't thought of using perl for this, but I saw a mention on a web
    > site that someone used a trivial little perl program to set the
    > parameters on a serial port for barcode scanner input...
    >
    > What I need to do is set the baud rate, parity, and start and stop
    > bits so I can talk to a change machine, which is a pretty primitive
    > device, and wants 9600,7,e,1
    >
    > Frankly, I don't care whether I use perl or not, but in an hour of
    > googling and searching various linux sites I haven't come across the
    > right combination of terms to find an appropriate command line... so ,
    > whether it's perl or something else... if you can point me in the
    > right direction, I'd appreciate it.


    By a remarkable coincidence just last week I happened to set a serial
    port to 9600,7,e,1 to communicate with a barcode scanner.

    I used POSIX::Termios. The code is on a machine I can't reach at the
    moment. If you have problems applying Termios, mail me or post again.

    Anno
     
    Anno Siegel, Jun 4, 2004
    #3
  4. On Fri, 04 Jun 2004 00:29:09 -0500, Mike Kelly <> wrote:
    > I hadn't thought of using perl for this, but I saw a mention on a web
    > site that someone used a trivial little perl program to set the
    > parameters on a serial port for barcode scanner input...
    >
    > What I need to do is set the baud rate, parity, and start and stop
    > bits so I can talk to a change machine, which is a pretty primitive
    > device, and wants 9600,7,e,1
    >
    > Frankly, I don't care whether I use perl or not, but in an hour of
    > googling and searching various linux sites I haven't come across the
    > right combination of terms to find an appropriate command line... so ,
    > whether it's perl or something else... if you can point me in the
    > right direction, I'd appreciate it.


    The Perl Device::SerialPort module is a Linux/Unix port of
    Win32::SerialPort. I have used the former to chat AT codes with a modem.

    --
    David Efflandt - All spam ignored http://www.de-srv.com/
     
    David Efflandt, Jun 6, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Juan Luis Medina

    Configuring the serial port

    Juan Luis Medina, Feb 5, 2004, in forum: Python
    Replies:
    1
    Views:
    287
    Diez B. Roggisch
    Feb 5, 2004
  2. Pom
    Replies:
    2
    Views:
    1,684
    Bas-i
    Jan 31, 2007
  3. yogesh
    Replies:
    2
    Views:
    284
    Jim Langston
    Mar 8, 2007
  4. Max Kotasek
    Replies:
    4
    Views:
    994
    Max Kotasek
    Apr 9, 2010
  5. msalerno
    Replies:
    3
    Views:
    415
    Ilmari Karonen
    Jul 14, 2005
Loading...

Share This Page