host_printer_plain_text#
Overview#
The host printer example demonstrates how to get the status of the printer device and how to print a certain test string. Currently, it supports the virtual printer (see device_printer_virtual_plain_text applicatioin) and the real printer, which supports the PJL and postscript (for example, HP LaserJet P2055dn). PJL is one printer control protocol (PCP) from HP, postscript is one page description language (PDL) from Adobe. For the virtual printer, the test string is shown on the virtual printer side so that it is easy for the customer to verify the basic function of the printer. For the real printer, it has to be installed correctly to make sure that the content can be printed from the printer. Installing the printer is beyond the scope of this document. For more information, see the appropriate manuals.
System Requirement#
Hardware requirements#
Mini/micro USB cable
USB A to micro AB cable
Hardware (Tower module/base board, and so on) for a specific device
Personal Computer(PC)
Software requirements#
The project path is:
<MCUXpresso_SDK_Install>/boards//usb_examples/usb_host_printer_plain_text/ / .
The
is Bare Metal or FreeRTOS OS.
Getting Started#
Hardware Settings#
Set the hardware jumpers (Tower system/base module) to default settings.
Prepare the example#
Download the program to the target board.
Power off the target board and power on again.
Connect devices to the board.
For detailed instructions, see the appropriate board User’s Guide.
Run the example#
Connect the board UART to the PC and open the COM port in a terminal tool.
Make sure to use a USB HUB or an adapter with OTG functionality firstly. Plug in the printer device to the board. The attached information prints out in the terminal.
Two types of printer devices are supported: device_printer_virtual_plain_text demo device and the real printer that support PJL and postscript.
The terminal log is as follows:

If the device is a real printer which supports both PJL and postscript, The “NXP host printer test” string is printed.
If the device is a real printer which does not support PJL and postscript,
the “unsupported printer language” is output in the terminal log.
If the device is device_printer_virtual_plain_text virtual printer, the following is output in the device’s debug console
terminal.
file name NXP host printer test
## Supported Boards
````{container} board-selector
```{container} board-setup
:name: board-frdmk22f
##### FRDM-K22F
##### Getting Started
###### Hardware Settings
- The Jumper settings:\n J22 1-2.
LPCXpresso55S69
Getting Started
Hardware Settings
The Jumper settings:\n J6 1-2 and J7 open for high speed mode, J6 2-3 and J7 shunt for full speed mode.
The external +5V power only port shoud be connected with a power USB cable to provide USB VBUS.
LPCXpresso55S16
Getting Started
Hardware Settings
The Jumper settings:\n JP20 1-2, JP21 1-2 and JP22 1-2 for chip power. JP2 1-2 and JS2 shunt for full speed mode, JP2 2-3 and JS2 open for high speed mode.
The external +5V power only port shoud be connected with a power USB cable to provide USB VBUS.
LPCXpresso55S28
Getting Started
Hardware Settings
The Jumper settings:\n J6 1-2 and J7 open for high speed mode, J6 2-3 and J7 shunt for full speed mode.
The external +5V power only port shoud be connected with a power USB cable to provide USB VBUS.
MCX-N5XX-EVK
Getting Started
Hardware Settings
The Jumper settings:\n J21 1-2.
MCX-N9XX-EVK
Getting Started
Hardware Settings
The Jumper settings:\n J21 1-2.