cupsBackChannelRead fails on Ubuntu 18.04

Asked by José Luis on 2020-03-25


I have a thermal printer connected to the USB port. And I have the following code (trying to get the status of the printer):

const int MAX_READ_BYTES = 1024;
char buffer[MAX_READ_BYTES] = { 0 };

bytes = cupsBackChannelRead(buffer, MAX_READ_BYTES, 10.0);

  if (bytes == -1)
    std::cerr << "ERROR: There was an error trying to read printer response: " << std::to_string(errno) <<std::endl;

For that code, the log shows:
[Job 322] There was an error trying to read printer response: 11

(EAGAIN errno).

I am using:

Ubuntu 18.04
Cups: 2.2.7

Note that This is related to the bug Bug #961207 which is marked as solved in Ubuntu 12.04 beta. But this error is present for me in the 18.04 version of Ubuntu.

Thanks in advance.

Question information

English Edit question
Ubuntu cups Edit question
No assignee Edit question
Last query:
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask José Luis for more information if necessary.

To post a message you must log in.