Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Working with serial ports in Lianja 9.7

  1. #1
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,199
    Blog Entries
    22

    Working with serial ports in Lianja 9.7

    In Lianja 9.7 we have added support for working with serial ports. This is cross platform; windows, linux and macOS.

    See https://www.lianja.com/doc/index.php/Serialport
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  2. #2
    Senior Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    103
    Fantastic

  3. #3
    Junior Member
    Join Date
    May 2024
    Posts
    18
    Please share a sample of the Lianja script code for the printer connected via cable in our app using the port number.

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,199
    Blog Entries
    22
    I'm not sure what you are wanting to achieve.

    You can generate text or html files and print them on a printer using Lianja.printFile() and Lianja.printHtml().
    https://www.lianja.com/doc/index.php...hods#printFile
    https://www.lianja.com/doc/index.php/Lianja_Methods

    If you are wanting to merely write text to a printer port the doc for serialport is quiet explanatory.

    open the port
    write the data
    close the port

    I'm not sure what printer it is you have attached to a serial port, but thats how to use it.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Senior Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    103
    Use full name to port.
    On windows com1, com2...
    On Linux /dev/tty1..

  6. #6
    Junior Member
    Join Date
    May 2024
    Posts
    18
    Thanks for replay,

    My printer is Epson TM-M30 Thermal Receipt Printer.

    Please provide a script for printing "Hello world" on printing paper.

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,199
    Blog Entries
    22
    What COM port is your printer attached to?
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Junior Member
    Join Date
    May 2024
    Posts
    18
    Port : ESDPRT001

    Please find attached file "printerPort"
    Name:  printerPort.png
Views: 34
Size:  25.9 KB

  9. #9
    Junior Member
    Join Date
    May 2024
    Posts
    18
    Please suggest

    Please find attached file for printer port log.

    Name:  Screenshot 2024-05-28 125122.jpg
Views: 28
Size:  21.5 KB

  10. #10
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,199
    Blog Entries
    22
    You need to verify that you can print from the command line first using the PRINT command.

    https://learn.microsoft.com/en-us/wi...commands/print
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us