0

i was trying to send data to a citizen pos printer trough usb serial but when i plug or unplug the device i don't see any difference on the /dev directory. No file is created corresponding to the printer. Does anyone knows what is the problem? In windows i install a virtual com driver and send data in hexadecima to the printer. I can print in linux, via cups, sending a file in hexadecimal, but i would like to do it via the port directly as in windows. I'm working on a raspberry pi. Thanks

Ricardo Araújo
  • 191
  • 1
  • 2
  • 10

1 Answers1

1

If you can use CUPS, then the printer is accesible in Linux. If you want to manipulate the port directly, you can do it. You can check the dmesg | tail after plugging in usb serial adapter to identify which port device it uses. Or try to ls /dev/tty* and look which device will appear. After that you can manupulate the port directly, regardless to what is connected to it.

  • I've done he "ls /dev/tty*" command and nothing changes when i plug or unplug the printer. My problem was that the printer wouldn't start printing via cups on reboot. Now i'm shuting down and starting again the raspeberry usb hub on reboot and now the printer is accepting printing jobs. So, no more virtual COM needed for now. Thank you – Ricardo Araújo Jul 01 '20 at 14:20
  • 1
    This `ls` statement only tells you which port is yours, if you do this with unplugged and repeat with plugged usb serial. But you can just read last messages from `dmesg`, as this info should be there. – Andrej Zacharevicz Jul 01 '20 at 18:58