#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2017
    Posts
    29
    Rep Power
    0

    Unhappy setup epson lq350 dot matrix printer by python-printer-escpos


    hello
    i want to setup epson lq350 dot matrix printer...
    i used python-printer-escpos module
    my program is:
    Code:
    [from escpos.connections import getUSBPrinter
    
    
    printer = getUSBPrinter()(idVendor=0x1504,
                              idProduct=0x0006,
                              inputEndPoint=0x82,
                              outputEndPoint=0x01) # Create the printer object with the connection params
    
    printer.text("Hello World")
    printer.lf()
    ]
    [/CODE]

    i got this error

    Code:
    [Traceback (most recent call last):
      File "/home/pi/start/printerr/lq350/test.py", line 7, in <module>
        outputEndPoint=0x01) # Create the printer object with the connection params
      File "/usr/local/lib/python3.4/dist-packages/escpos/connections.py", line 87, in __init__
        self.__open()
      File "/usr/local/lib/python3.4/dist-packages/escpos/connections.py", line 104, in __open
        raise RuntimeError("Cable isn't plugged in")
    RuntimeError: Cable isn't plugged in]
    [/CODE]

    why?????????
    please help.....
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Posts
    5,838
    Rep Power
    509

    RuntimeError: Cable isn't plugged in


    Maybe the cable isn't plugged in.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2009
    Posts
    652
    Rep Power
    39
    I would suggest that you use the print spooler, as you just send whatever to lpr with the "-P printer_to_use" option. The print spooler already knows how to format for each printer. The man page for lpr
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2017
    Posts
    29
    Rep Power
    0
    Originally Posted by dwblas
    I would suggest that you use the print spooler, as you just send whatever to lpr with the "-P printer_to_use" option. The print spooler already knows how to format for each printer. The man page for lpr
    it probably doesn't work for me..because my printer's driver is not installed..i want to setup it without driver and just by python code
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2009
    Posts
    652
    Rep Power
    39
    To bypass the driver, you will have to learn the command language for that printer and send data to it in the form it expects. An old reference manual, as I haven't done this since before drivers were supplied https://files.support.epson.com/pdf/...l/escp2ref.pdf
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2017
    Posts
    29
    Rep Power
    0
    Originally Posted by dwblas
    To bypass the driver, you will have to learn the command language for that printer and send data to it in the form it expects. An old reference manual, as I haven't done this since before drivers were supplied https://files.support.epson.com/pdf/...l/escp2ref.pdf
    you mean if i use this language, i will not need the driver....am i right???
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2009
    Posts
    652
    Rep Power
    39
    I do not know as I haven't done anything like this since the early 90's. Some printers were also Postscript compatible. If yours is, and Postscript is easier for you, then you can also send a Postscript file to the printer.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2017
    Posts
    29
    Rep Power
    0
    Originally Posted by dwblas
    I do not know as I haven't done anything like this since the early 90's. Some printers were also Postscript compatible. If yours is, and Postscript is easier for you, then you can also send a Postscript file to the printer.
    how can i understand my printer support postscript or not???
    its datasheet didn't say it...

IMN logo majestic logo threadwatch logo seochat tools logo