Monitoring and recovery for a USB interface
AssigneeSquare, Inc.
InventorsMatthew H. Maibach, Benjamin Ridder, Jeremy Wade
Life of this patent
Estimating the term…
Abstract
A first device and a second device enter a USB monitoring mode. The second device transmits monitoring messages on a periodic basis, while the first device has a monitoring timer that it resets each time a monitoring message is received. If a monitoring message is not received before the monitoring timer expires, the first device starts a reconnect timer. After a certain number of failed attempts to receive monitoring messages, the first device takes corrective action to restore USB communications.
Claims31
A method for maintaining a Universal Serial Bus (USB) connection between a payment reader and a merchant device running a point-of-sale application, the method comprising:
- initializing communication over the USB connection between the merchant device and the payment reader;
- entering, at the merchant device, a monitoring mode based on an input to the point-of-sale application;
- sending a plurality of monitoring messages from the merchant device to the payment reader over the USB connection, wherein each monitoring message is sent at a first interval after a previous monitoring message while the merchant device is in the monitoring mode;
- receiving, at the payment reader, a first monitoring message of the plurality of monitoring messages;
- entering, at the payment reader, the monitoring mode in response to receiving the first monitoring message;
- starting, at the payment reader, a monitoring timer in response to receiving the first monitoring message, wherein the monitoring timer expires after a second interval;
- restarting, at the payment reader, the monitoring timer each time one of the monitoring messages is received at the payment reader;
- sending, from the payment reader to the merchant device over the USB connection, a reconnect message when the monitoring timer is expired;
- starting, at the payment reader, a first reconnect timer in response to sending the reconnect message, wherein the first reconnect timer expires if one of the monitoring messages is not received within a third interval;
- performing a first corrective action at a USB interface of the payment reader in response to the expiration of the first reconnect timer;
- starting, at the payment reader, a second reconnect timer after the expiration of the first reconnect timer, wherein the second reconnect timer expires if one of the monitoring messages is not received within a fourth interval;
- and
- performing a second corrective action at the USB interface of the payment reader in response to the expiration of the second reconnect timer.
A method for maintaining a Universal Serial Bus (USB) connection between a first device and a second device, the method comprising:
- receiving, via a USB interface of the first device, a first monitoring message of a plurality of monitoring messages;
- entering, at the first device, a monitoring mode in response to receiving the first monitoring message;
- starting, at the first device, a monitoring timer in response to entering the monitoring mode, wherein the monitoring timer expires after a transmit interval;
- restarting the monitoring timer each time one of the plurality of monitoring messages is received at the first device;
- starting, at the first device, a first reconnect timer when the monitoring timer is expired, wherein the first reconnect timer expires if one of the plurality of monitoring messages is not received within a second interval;
- and
- performing a first corrective action at the USB interface in response to the expiration of the first reconnect timer.
A first device, comprising:
- a Universal Serial Bus (USB) interface;
- one or more processing elements coupled to the USB interface, wherein the one or more processing elements are configured to execute USB monitoring instructions;
- and
- one or more memories configured to store the USB monitoring instructions, wherein the USB monitoring instructions cause the one or more processing elements to:
- receive a first monitoring message of a plurality of monitoring messages via the USB interface,
- enter a monitoring mode at the first device in response to receiving the first monitoring message, and
- start a monitoring timer at the first device in response to entering the monitoring mode, wherein the monitoring timer expires after a first interval,
- wherein the USB monitoring instructions further cause the one or more processing elements to:
- restart the monitoring timer each time one of the plurality of monitoring messages is received at the first device,
- start a first reconnect timer at the first device when the monitoring timer is expired, wherein the first reconnect timer expires if one of the plurality of monitoring messages is not received within a second interval, and
- wherein the USB monitoring instructions further cause the one or more processing elements to perform a first corrective action at the USB interface of the first device in response to the expiration of the first reconnect timer.
A non-transitory computer-readable storage medium comprising instructions stored therein, which when executed by one or more processors, cause the one or more processors to perform operations comprising:
- receiving, via a Universal Serial Bus (USB) interface, a first monitoring message of a plurality of monitoring messages;
- entering a monitoring mode in response to receiving the first monitoring message;
- starting a monitoring timer in response to entering the monitoring mode, wherein the monitoring timer expires after a first interval;
- restarting the monitoring timer each time one of the plurality of monitoring messages is received;
- starting a first reconnect timer when the monitoring timer is expired, wherein the first reconnect timer expires if one of the plurality of monitoring messages is not received within a second interval;
- and
- performing a first corrective action at the USB interface in response to the expiration of the first reconnect timer.
Dependencies are inferred from the claim text.