Epic 880
TM
Extended Printer Control
100-88002 Rev B Page 235
USB Recovery Watch Dog
The USB link can be susceptible to various errors that can cause it to stop
functioning. This typically happens when noise is introduced into the cable resulting
in a buffer overrun at the host. This can cause a hub or a USB driver to suspend
interaction with whatever device appeared to be the source of the problem. When this
happens, the only way to recover the link is to disconnect from the device and then
reconnect. This is typically done in the host. In some cases, for various reasons, the
host driver is not able to generate a disconnect. (The Transact TVS driver provides
recovery but the Windows USB printer services driver does not.)
It is possible to have the printer force a disconnect, however, the host application
must start the service and then continue to extend the disconnect watch dog.
There is one command and two status indicators to help the application keep track of
the watch dog.
When activated the printer will schedule a USB disconnect/reconnect after the
specified time unless the command is sent again to either extend the timer or to
disable the timer before the timer expires.
[ESC][CAN] <n> Activate USB Watch Dog
ASCII [ESC][CAN] <n>
Hexadecimal 1BH 18H
Decimal <27> <24>
Function The [ESC][CAN]<n> command schedules a USB disconnect reconnect
cycle after n seconds. The scheduled disconnect can be canceled by issuing
[ESC][CAN]<0>.
Where
n = 0 disable any scheduled disconnect.
n = 1-255 Scheduled a disconnect/reconnect after n seconds from when the
command is received.
If the disconnect occurs as a result of this command. The printer will reset the USB
controller which appears to the host as a disconnect. (Effectively, the host will think
the printer is off) The USB controller will be held in reset for 250 milliseconds. When
the reset is removed, the USB controller will restart and a normal enumeration
process will start. The printer will report not ready and not accept data for another
500 milliseconds. This will allow time for the USB driver to reload and initialize. The
printer will then report ready and allow normal data flow.
NOTE: This process does not actually affect the state of the print process. Any print
commands previously sent to the printer will still be active.
To keep track of the watch dog status, the fact that a watch dog occurred is reported
as part of the ENQ 20 status command. The total number of disconnects will be
reported and reset by the ENQ 35 enquire command.