Redirect COM port output to a file?

Discussion in 'NZ Computing' started by JohnO, Feb 16, 2010.

  1. JohnO

    JohnO Guest

    Hi All,

    Under windows (XP Pro) is it possible to link the COM1 port to a file
    to capture output set to the port? A customer site has an ancient
    label printer attached to COM1 and I want to capture the label markup
    language being sent to it. If I can redirect the port to a file I
    could just print a label, have the data go to a file and then examine
    it with a text editor.

    Possible?

    TIA,
    JohnO
    JohnO, Feb 16, 2010
    #1
    1. Advertising

  2. JohnO

    JohnO Guest

    On Feb 17, 11:32 am, JohnO <> wrote:
    > Hi All,
    >
    > Under windows (XP Pro) is it possible to link the COM1 port to a file
    > to capture output set to the port? A customer site has an ancient
    > label printer attached to COM1 and I want to capture the label markup
    > language being sent to it. If I can redirect the port to a file I
    > could just print a label, have the data go to a file and then examine
    > it with a text editor.
    >
    > Possible?
    >
    > TIA,
    > JohnO


    BTW: the application is not accessing the port as a printer; it is
    simply opening the serial port and sending ascii data. I cannot simply
    change the printer port from COM1 to FILE.
    JohnO, Feb 16, 2010
    #2
    1. Advertising

  3. On Tue, 16 Feb 2010 14:34:48 -0800 (PST), JohnO <>
    wrote:

    >On Feb 17, 11:32 am, JohnO <> wrote:
    >> Hi All,
    >>
    >> Under windows (XP Pro) is it possible to link the COM1 port to a file
    >> to capture output set to the port? A customer site has an ancient
    >> label printer attached to COM1 and I want to capture the label markup
    >> language being sent to it. If I can redirect the port to a file I
    >> could just print a label, have the data go to a file and then examine
    >> it with a text editor.
    >>
    >> Possible?
    >>
    >> TIA,
    >> JohnO

    >
    >BTW: the application is not accessing the port as a printer; it is
    >simply opening the serial port and sending ascii data. I cannot simply
    >change the printer port from COM1 to FILE.


    If you have a crossover RS-232 cable and a second COM port, just
    connect them and use some software like Putty to capture the data.
    Stephen Worthington, Feb 17, 2010
    #3
  4. JohnO

    JohnO Guest

    On Feb 17, 12:01 pm, Allistar <> wrote:
    > JohnO wrote:
    > > On Feb 17, 11:32 am, JohnO <> wrote:
    > >> Hi All,

    >
    > >> Under windows (XP Pro) is it possible to link the COM1 port to a file
    > >> to capture output set to the port? A customer site has an ancient
    > >> label printer attached to COM1 and I want to capture the label markup
    > >> language being sent to it. If I can redirect the port to a file I
    > >> could just print a label, have the data go to a file and then examine
    > >> it with a text editor.

    >
    > >> Possible?

    >
    > >> TIA,
    > >> JohnO

    >
    > > BTW: the application is not accessing the port as a printer; it is
    > > simply opening the serial port and sending ascii data. I cannot simply
    > > change the printer port from COM1 to FILE.

    >
    > You may find some answers here:
    >
    > http://www.google.co.nz/search?hl=en&source=hp&q=windows XP COM port ...
    > --
    > A.


    Hi,

    The top few hits all seem to allow COMx - COMy type mapping, but none
    seem to allow CCOMx - FILE mapping.

    I'm starting to think serial crossover cable and a second PC running

    COPY COM1: c:\com_capture.txt

    Cheers,
    JohnO
    JohnO, Feb 17, 2010
    #4
  5. In message <b7c288fc-060a-499a-
    >, JohnO wrote:

    > BTW: the application is not accessing the port as a printer; it is
    > simply opening the serial port and sending ascii data.


    Is it opening it as a file name? If so, you could patch in a different file
    name.
    Lawrence D'Oliveiro, Feb 17, 2010
    #5
  6. JohnO

    JohnO Guest

    On Feb 17, 1:29 pm, Stephen Worthington
    <34.nz56.remove_numbers> wrote:
    > On Tue, 16 Feb 2010 14:34:48 -0800 (PST), JohnO <>
    > wrote:
    >
    >
    >
    >
    >
    > >On Feb 17, 11:32 am, JohnO <> wrote:
    > >> Hi All,

    >
    > >> Under windows (XP Pro) is it possible to link the COM1 port to a file
    > >> to capture output set to the port? A customer site has an ancient
    > >> label printer attached to COM1 and I want to capture the label markup
    > >> language being sent to it. If I can redirect the port to a file I
    > >> could just print a label, have the data go to a file and then examine
    > >> it with a text editor.

    >
    > >> Possible?

    >
    > >> TIA,
    > >> JohnO

    >
    > >BTW: the application is not accessing the port as a printer; it is
    > >simply opening the serial port and sending ascii data. I cannot simply
    > >change the printer port from COM1 to FILE.

    >
    > If you have a crossover RS-232 cable and a second COM port, just
    > connect them and use some software like Putty to capture the data.


    Snap!
    JohnO, Feb 17, 2010
    #6
  7. JohnO

    JohnO Guest

    On Feb 17, 1:35 pm, Lawrence D'Oliveiro <l...@geek-
    central.gen.new_zealand> wrote:
    > In message <b7c288fc-060a-499a-
    >
    > >, JohnO wrote:
    > > BTW: the application is not accessing the port as a printer; it is
    > > simply opening the serial port and sending ascii data.

    >
    > Is it opening it as a file name? If so, you could patch in a different file
    > name.


    Good idea. I could only guess so - that it is opening it as "COM1:".
    We are talking a DOS console application here.

    Administratively awkward to mess with it though - the company is
    Japanese owned and managed, the PC is in a timber mill in Gisborne and
    in production use, and "supported" by the Japs, and I don't think they
    have a backup one to play with.

    The good news is they are replacing this hokey setup - I just have to
    print identical bar-code labels from the new application and wanted to
    reverse engineer them rather than re-draft them from scratch.
    JohnO, Feb 17, 2010
    #7
  8. JohnO

    JohnO Guest

    On Feb 17, 1:53 pm, Frank Williams <> wrote:
    > On Tue, 16 Feb 2010 16:33:04 -0800 (PST), JohnO <> wrote:
    > >On Feb 17, 12:01 pm, Allistar <> wrote:
    > >> JohnO wrote:
    > >> > On Feb 17, 11:32 am, JohnO <> wrote:
    > >> >> Hi All,

    >
    > >> >> Under windows (XP Pro) is it possible to link the COM1 port to a file
    > >> >> to capture output set to the port? A customer site has an ancient
    > >> >> label printer attached to COM1 and I want to capture the label markup
    > >> >> language being sent to it. If I can redirect the port to a file I
    > >> >> could just print a label, have the data go to a file and then examine
    > >> >> it with a text editor.

    >
    > >> >> Possible?

    >
    > >> >> TIA,
    > >> >> JohnO

    >
    > >> > BTW: the application is not accessing the port as a printer; it is
    > >> > simply opening the serial port and sending ascii data. I cannot simply
    > >> > change the printer port from COM1 to FILE.

    >
    > >> You may find some answers here:

    >
    > >>http://www.google.co.nz/search?hl=en&source=hp&q=windows XP COM port ...
    > >> --
    > >> A.

    >
    > >Hi,

    >
    > >The top few hits all seem to allow COMx - COMy type mapping, but none
    > >seem to allow CCOMx - FILE mapping.

    >
    > >I'm starting to think serial crossover cable and a second PC running

    >
    > >COPY COM1: c:\com_capture.txt

    >
    > >Cheers,
    > >JohnO

    >
    > COM Ports are output ports so no way to loop the data back in.
    >
    > You need a simple comm's analyzer.
    >
    > Plus you cant file  the Data as it needs to handshake with the printer you
    > will need some software to monitor the port data, same as you would do with a
    > modem.


    Hi Frank.

    It would be possible to file the data if the OS provided a facility to
    do so.

    No handshake necessarily - that's configurable for hardware, x-on/x-
    off etc.
    JohnO, Feb 17, 2010
    #8
  9. On Tue, 16 Feb 2010 16:33:04 -0800 (PST), JohnO <> wrote:

    >On Feb 17, 12:01 pm, Allistar <> wrote:
    >> JohnO wrote:
    >> > On Feb 17, 11:32 am, JohnO <> wrote:
    >> >> Hi All,

    >>

    You need a simple comm's analyzer.

    Plus you cant file the Data as it needs to handshake with the printer you
    will need some software to monitor the port data, same as you would do with a
    modem.

    Here you go


    http://www.serial-port-monitor.com/

    http://www.kmint21.com/serial-port-monitor/

    http://www.topshareware.com/Free-Serial-Port-Monitor-download-36824.htm

    http://www.windmill.co.uk/monitor32.html
    Frank Williams, Feb 17, 2010
    #9
  10. JohnO

    JohnO Guest

    On Feb 17, 2:37 pm, Frank Williams <> wrote:
    > On Tue, 16 Feb 2010 16:33:04 -0800 (PST), JohnO <> wrote:
    > >On Feb 17, 12:01 pm, Allistar <> wrote:
    > >> JohnO wrote:
    > >> > On Feb 17, 11:32 am, JohnO <> wrote:
    > >> >> Hi All,

    >
    > You need a simple comm's analyzer.
    >
    > Plus you cant file  the Data as it needs to handshake with the printer you
    > will need some software to monitor the port data, same as you would do with a
    > modem.
    >
    > Here you go
    >
    > http://www.serial-port-monitor.com/
    >
    > http://www.kmint21.com/serial-port-monitor/
    >
    > http://www.topshareware.com/Free-Serial-Port-Monitor-download-36824.htm
    >
    > http://www.windmill.co.uk/monitor32.html


    Cheers - will try 'em out and see.....
    JohnO, Feb 17, 2010
    #10
  11. JohnO

    Brocker Guest

    On Feb 17, 11:32 am, JohnO <> wrote:
    > Hi All,
    >
    > Under windows (XP Pro) is it possible to link the COM1 port to a file
    > to capture output set to the port? A customer site has an ancient
    > label printer attached to COM1 and I want to capture the label markup
    > language being sent to it. If I can redirect the port to a file I
    > could just print a label, have the data go to a file and then examine
    > it with a text editor.
    >
    > Possible?
    >
    > TIA,
    > JohnO


    Why not feed it into another PC/Laptop that has a serial port?
    Brocker, Feb 17, 2010
    #11
  12. JohnO

    Richard Guest

    JohnO wrote:
    > Hi All,
    >
    > Under windows (XP Pro) is it possible to link the COM1 port to a file
    > to capture output set to the port? A customer site has an ancient
    > label printer attached to COM1 and I want to capture the label markup
    > language being sent to it. If I can redirect the port to a file I
    > could just print a label, have the data go to a file and then examine
    > it with a text editor.


    What type of printer? When I had a look the dymo and brother protocols
    were well documented from reverse engeneering and there was some GPL
    code for the dymo to turn a PBM file into what the printer wanted.
    Richard, Feb 17, 2010
    #12
  13. In message <>, Frank Williams
    wrote:

    > COM Ports are output ports so no way to loop the data back in.


    They are bidirectional.
    Lawrence D'Oliveiro, Feb 17, 2010
    #13
  14. JohnO

    JohnO Guest

    On Feb 17, 6:12 pm, Richard <> wrote:
    > JohnO wrote:
    > > Hi All,

    >
    > > Under windows (XP Pro) is it possible to link the COM1 port to a file
    > > to capture output set to the port? A customer site has an ancient
    > > label printer attached to COM1 and I want to capture the label markup
    > > language being sent to it. If I can redirect the port to a file I
    > > could just print a label, have the data go to a file and then examine
    > > it with a text editor.

    >
    > What type of printer? When I had a look the dymo and brother protocols
    > were well documented from reverse engeneering and there was some GPL
    > code for the dymo to turn a PBM file into what the printer wanted.


    It's a Sato and their markup language is fugly.
    JohnO, Feb 17, 2010
    #14
  15. JohnO

    JohnO Guest

    On Feb 17, 5:56 pm, Brocker <> wrote:
    > On Feb 17, 11:32 am, JohnO <> wrote:
    >
    > > Hi All,

    >
    > > Under windows (XP Pro) is it possible to link the COM1 port to a file
    > > to capture output set to the port? A customer site has an ancient
    > > label printer attached to COM1 and I want to capture the label markup
    > > language being sent to it. If I can redirect the port to a file I
    > > could just print a label, have the data go to a file and then examine
    > > it with a text editor.

    >
    > > Possible?

    >
    > > TIA,
    > > JohnO

    >
    > Why not feed it into another PC/Laptop that has a serial port?


    Yeah maybe. I'll have to get down to Gisborne to do this which is a
    PITA though.
    JohnO, Feb 17, 2010
    #15
  16. JohnO

    EMB Guest

    On 17/02/2010 7:47 p.m., JohnO wrote:

    > It's a Sato and their markup language is fugly.


    It's not that bad - I've written a lot of apps to drive them over the years.
    EMB, Feb 17, 2010
    #16
  17. On Tue, 16 Feb 2010 22:47:56 -0800 (PST), JohnO <> wrote:

    >On Feb 17, 6:12 pm, Richard <> wrote:
    >> JohnO wrote:
    >> > Hi All,

    >>
    >> > Under windows (XP Pro) is it possible to link the COM1 port to a file
    >> > to capture output set to the port? A customer site has an ancient
    >> > label printer attached to COM1 and I want to capture the label markup
    >> > language being sent to it. If I can redirect the port to a file I
    >> > could just print a label, have the data go to a file and then examine
    >> > it with a text editor.

    >>
    >> What type of printer? When I had a look the dymo and brother protocols
    >> were well documented from reverse engeneering and there was some GPL
    >> code for the dymo to turn a PBM file into what the printer wanted.

    >
    >It's a Sato and their markup language is fugly.



    Just remembered that I've used Hyperterminal to print to a file, when the
    person did not have a RS323 Printer.
    You can down load a updated version in what is installed in Windows

    http://www.hilgraeve.com/hyperterminal.html
    Frank Williams, Feb 18, 2010
    #17
  18. JohnO

    Guest

    , Mar 1, 2010
    #18
  19. JohnO

    helleng

    Joined:
    Dec 1, 2010
    Messages:
    2
    If you need constantly capture data from the serial port, then here's a pretty good option: AGG Software's RS232 logger, because allows to start data capturing automatically and can work as a Windows service.

    --
    Helleng
    helleng, Dec 1, 2010
    #19
    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. Andrew Albert

    Redirect Port for a particular IP

    Andrew Albert, Dec 6, 2003, in forum: Cisco
    Replies:
    1
    Views:
    3,659
  2. Peter H
    Replies:
    43
    Views:
    1,117
    Bill M
    Dec 4, 2003
  3. Otto Pylot
    Replies:
    1
    Views:
    3,503
    LASERandDVDfan
    Apr 18, 2004
  4. thomas
    Replies:
    6
    Views:
    777
    thomas
    Sep 2, 2006
  5. Chris
    Replies:
    4
    Views:
    417
    andre
    Sep 25, 2004
Loading...

Share This Page