Dot matrix usb printer in imx6ull

How can i interface Dot matrix usb printer with aster carrier board. what will be the steps to interface and test it

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

To interface a Dot matrix USB printer with an Aster Carrier Board using a Colibri iMX6ULL module, you can follow these general steps. This process involves ensuring the printer is recognized by the system and setting it up for printing.

  1. Connect the Printer: Plug the Dot matrix USB printer into one of the USB ports on the Aster Carrier Board.

  2. Check Printer Recognition:

    • Access the terminal on the Colibri iMX6ULL module via SSH or a serial connection.
    • Use the command lsusb to list USB devices connected to the system. You should see your printer listed, which confirms that the USB connection is recognized.
  3. Install Printer Drivers:

    • Depending on the specific Dot matrix printer model, you might need to install drivers. Many Dot matrix printers use generic drivers available in Linux, but check the printer documentation for specific requirements.
    • If specific drivers are needed and available, you can use the Yocto Project to include these drivers in your custom Linux image for the Colibri iMX6ULL.
  4. Configure the Printer:

    • You can use the CUPS (Common UNIX Printing System) for printer configuration and management. If not already included in your Linux image, you can add CUPS through the Yocto Project or install it using package management if your system is configured to support it.
    • Once CUPS is installed, access its web interface by navigating to http://localhost:631 from the web browser on the Colibri iMX6ULL module or by forwarding the port to your development machine.
    • Follow the CUPS interface to add a new printer, selecting the appropriate driver for your Dot matrix printer.
  5. Test Printing:

    • After configuring the printer, you can test it by printing a test page from the CUPS web interface or by using command-line tools like lp or lpr to send a print job to the printer.
  6. Troubleshooting:

    • If the printer does not work as expected, check the connections and ensure the printer is powered on.
    • Review the CUPS error logs (/var/log/cups/error_log) for any issues related to driver compatibility or communication errors.
    • Ensure that any required printer drivers are correctly installed and configured.

Remember, the specific steps might vary based on the Dot matrix printer model and the version of the Linux image on your Colibri iMX6ULL. Always refer to the printer’s documentation

Please, also check if these links can help you solve your problem:

How to Run a Hello World on the Cortex-M | Toradex Developer Center.

What will be the steps to configure CUPS in yocto image?

Hi @Prial ,
You can check the recipe here.

Below is the syntax to be used in local.conf
IMAGE_INSTALL_append = " recipe-name" (dunfell)
IMAGE_INSTALL:append = " recipe-name" (kirkstone)

I tried these steps.
i successfully added printer(TVS MSP 270 classic Plus dot matrix) in aster carrier board via lpadmin command but when i try to print data of text file via lp -d <printer_name> test.txt it retrun successfully without error but here printer is not printing anything. Hardware connections and USB control is perfect.

here are the logs of dmesg | grep usb:

[ 1892.750728] usblp0: removed
[ 1892.784039] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101
[ 1897.862643] usblp0: removed
[ 1897.900101] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101
[ 1902.975303] usblp0: removed
[ 1903.008319] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101
[ 1908.074442] usblp0: removed
[ 1908.110133] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101
[ 1913.180044] usblp0: removed
[ 1913.214122] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101
[ 1918.287110] usblp0: removed
[ 1918.315784] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101
[ 1923.387090] usblp0: removed
[ 1923.422148] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101
[ 1928.504236] usblp0: removed
[ 1928.541709] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101
[ 1933.604756] usblp0: removed
[ 1933.640094] usblp 1-1:1.0: usblp0: USB Unidirectional printer dev 3 if 0 alt 0 proto 1 vid 0x0E75 pid 0x1101

tail -f /var/log/cups/error_log:

E [18/Sep/2024:12:18:32 +0000] Filter \"gstoraster\" not found.
E [18/Sep/2024:12:18:32 +0000] Filter \"gstoraster\" not found.
E [18/Sep/2024:12:18:45 +0000] [Client 5] Returning HTTP Forbidden for CUPS-Add-Modify-Printer (ipp://localhost:631/printers/TVS) from localhost
W [18/Sep/2024:12:19:31 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'TVS-Gray..\' already exists
E [18/Sep/2024:12:26:35 +0000] Filter \"gstopdf\" not found.
E [18/Sep/2024:12:26:35 +0000] Filter \"gstoraster\" not found.
E [18/Sep/2024:12:26:35 +0000] Filter \"gstoraster\" not found.
E [18/Sep/2024:12:26:35 +0000] Filter \"gstoraster\" not found.
W [18/Sep/2024:12:26:35 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
W [18/Sep/2024:12:35:11 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'TVS-Gray..\' already exists

Hi @Prial ,
Unfortunately, we can not debug application specific issues.
However, some time back we tested a USB printer HP_Laser_Jet_Pro_MFP_M126nw on BSP 5.4.
Below are the packages we added
IMAGE_INSTALL_append = " cups cups-doc cups-lib cups-libimage cups-filters hplip hplip-ppd hplip-cups hplip-backend hplip-filter vsftpd "

Below are the steps to print

  1. Check the available printer drivers
    lpinfo -m
  2. add the printer name
    lpadmin -p HP_Laser_Jet_Pro_MFP_M126nw
  3. Now add the printer as the default printer
    lpoptions -d HP_Laser_Jet_Pro_MFP_M126nw
  4. Check the default printer
    lpstat -d
  5. Now print a file/pdf
    lp -d HP_Laser_Jet_Pro_MFP_M126nw test.pdf

Let us know if this could be of any help