Is there a way to interpret a usb port as a serial port?

Discussão em 'Angular' iniciado por Seb, Setembro 16, 2025.

  1. Seb

    Seb Guest

    It's quite an unusual scenario so i'll try to make it as clear as possible with as much context as possible, so forgive me if the problem is on the bulkier side also, sorry if my english is bad.

    I'm an intern in a company that creates apps for businesses, we needed an interface for checkout handling, with different paying methods like by card or by cash, a way to print receipts etc.

    We aleready have a receipt printer connected to the checkout drawer wich opens every time something is printed.

    As printing is the only way to open the drawer, i got stuck when i needed to open it when the cash option was selected, I cannot open it with the current printing method since it opens an interface that would be impractical for that purpose.

    My idea was to connect to the printer with a serial port to directly send a command to either fake a print or directly open the drawer. But i cannot find a way to connect the printer as serial.

    The app is made using typeScript Angular and will run with Elecrton and we aleready use the web serial api for other purposes

    Here is what i aleready looked up/ tried :

    I found that the printer aleready had a rs-232 port but we can't use it since computers dont use this anymore and i would prefer not having to use a physical usb/rs-232 converter.

    I tried to see if i could change the printer's installation to make it work but i couldn't and i don't have a lot of knowledge with it.

    i tried searching for software that could help but i didn't find any/didn't understand how to make them work

    And finally i tried using the web usb API but couldn't make it work and it would be a pain since it will cause some problems we aleready had with serial api

    Continue reading...

Compartilhe esta Página