Menu

Dump serial communication using ScriptCommunicator

Anonymous
2019-02-15
2019-02-15
  • Anonymous

    Anonymous - 2019-02-15

    Hello everyone. I have 2 virtual communication bridged to each other.. Let say com5 and com6.

    I instruct my Point of Sale to use com5 as thermal receipt printer port and then listen to com6 using ScriptCommunicator.

    When my POS start, I can see bellow hex in com6.

    1b 40 1b 3d 01 1b 74 13

    Which is

    1b 40 = ESC @ (Reset the printer)

    1b 3d 01 = ESC = 1 (Select peripheral device, where n=1)

    1b 74 13= ESC J 13 (Select print direction left to right)

    Which means the pair of virtual port is working right?

    But if I print to the receipt printer, I got nothing on the com6.

    What can be wrong here? As far as I am concerned, the printer is using xon xof flow control.

    But, I never write any xof, so the printer should just print fine!

    What do you guys thin?

    Thanks in advance!

     
  • haris

    haris - 2019-02-15

    Hello everyone, sorry about the anonymous post. I thought I logged in already.

    Just to update that my suspicion is correct about needing to do some handshake for the communication to happened. Is just that I don't know what needed to be done!

    How did I test that? I installed a program called Com Port Data Emulator that is supposed to be emulating a comport device (DCE if I am not mistaken), Configure the program to just listen instead of sending random data. Print the receipt from my POS software and voila! It just works!

    But I dont know how to make ScriptCommunicator to reach that it just works stage!

    So sharing my finding and hopefully someone can share back with me how to implement the handshake using ScriptCommunicator functionality!

    Thanks in Advance!

     
  • haris

    haris - 2019-02-15

    And just to share the "it just works" part.

    I know it works, because the underlined parts is actually visible in a printed receipt.

     
  • Stefan Zieker

    Stefan Zieker - 2019-02-15

    Hi,

    Just to clarify your use case:
    - ScriptCommunicator is connected to COM6
    - your printer is connected to COM5
    - your printer uses flow control (XON/XOFF)
    - COM5 and COM6 are connected
    - ScriptCommunicator shall receive data from your printer

    I that correct? If so you need to configure ScriptCommunicator to use XON/XOFF too (see attachment).

     

    Last edit: Stefan Zieker 2019-02-15

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.