Connection Timeout

Connection timeout in CloudPRNT Version HTTP

Clients choose their interval, but this may vary between differently configured clients.
Clients are permitted to send requests more frequently in the case that their status has changed several times quickly, or in response to a server “clientAction” request.
However, it is never expected that the client will poll significantly more slowly than requested.
Therefore, a long delay between polls can be considered as a warning that the printer has been powered off, or the network connection is lost.
The server may then report this and take appropriate action (anything from displaying “offline/disconnected” to emailing a technician, this is server dependent).
The precise timeout is not always easy to calculate.
Especially while printing a job, which may take several seconds, or event minutes.
Therefore, it is recommended that a server calculate two timeouts for a particular job queue.

Poll timeout recommended to be 2 * <poll interval> + 5s

This specified the time between polls before the server assumes that a device has gone offline or lost its connection.
Therefore it is recommended that a server considers its own usage scenario and adjusts this timeout accordingly.

Print timeout recommended to be around 60s

This is the time allowed for a printer to accept and print a job before completing with a jobstate “restart”/”delete” before the server can assume that the printer has gone offline.
The real time to print a document can vary significantly depending on the printer performance, job length and type of data.
Therefore it is recommended that a server considers its own usage scenario and adjusts this timeout accordingly.
Some devices will continue to send status poll requests during job printing, to verify that they are still online.
In this case the Print Timeout is not essential, but not all clients can be guaranteed to do this. With firmware versions up to 1.3 the HI01X and HI02X interfaces will not issue POST requests after requesting a print job, until the job is complete or has failed, however version 1.4 and later will issue POST requests while printing is in progress.

Note

Depending on the server or router configuration, the connection may be forced to release after the server issues a FIN packet. After that, when a printer request is issued, communication is temporarily unavailable, which may delay the issuing of the request.

In this case, changing the tcp_fin_timeout setting of the server or router to 70 seconds or higher may solve the problem. Please note that the default value of tcp_fin_timeout setting of some routers is 5 seconds for some manufacturers.

Connection timeout in CloudPRNT Version MQTT

For Trigger POST

Clients do not poll periodically by default.
If the client is configured to poll periodically, timeout judgment is the same as connection timeout in CloudPRNT Version HTTP .
If a client is connected to the network, it polls when it receives request-post message published by a CloudPRNT server.
The CloudPRNT server can determine that a client is disconnected from the network by not responding to request-post messages.

For Full MQTT / Pass URL

Clients do not publish client-status message periodically by default.
If the client is configured to publish client-status message periodically, timeout judgment is the same as connection timeout in CloudPRNT Version HTTP .
If a client is connected to the network, it publishes client-status message when it receives request-client-status message published by a CloudPRNT server.
The CloudPRNT server can determine that a client is disconnected from the network by not responding to request-client-status messages.
Clients also register client-will messages as Will messages when connecting to a MQTT broker.
The CloudPRNT server can determine that a client is disconnected from the network by receiving this message.