Forced device reinitialization without mandatory restart

Various embodiments herein each include at least one of systems, devices, methods, and software for forced device reinitialization without mandatory restart. One method embodiment includes receiving, by a first device, a first data communication and responding, by the first device, to the first data communication with a second data communication identifying a state of the first device as a reset state. This embodiment further includes receiving, by the first device in response to the second data communication, a third data communication including data to alter the state of the first device from the reset state to a programmed state. Such embodiments may then implement the data of the third data communication to place the first device in the programmed state.

BACKGROUND INFORMATION

Before the advent of plug and play, systems would initialize devices once during startup. At this point the device is assumed stable and there is no mechanism to convey the need for reconfiguration if the device requires it, such as following a device reset or a device fault. If a device did require reconfiguration the entire system would need to be restarted to do so. With plug and play, systems can detect device hot plug events and initialize the device is added to the system. Unexpected device resets trigger a re-enumeration and at that point they can be reinitialized without significant impact to the overall system function. The host in such systems operate to identify the hot plug events. However, serial devices are still used in some contexts and device hosts to which these devices couple and the devices themselves do not support hot plug events and still require entire system resets, host and device, to come back online.

SUMMARY

Various embodiments herein each include at least one of systems, devices, methods, and software for forced device reinitialization without mandatory restart. Such embodiments are applicable to devices that are not supportive of plug and play or other hot pluggable enabled services. As such, some embodiments are relevant to serial devices, such as universal asynchronous receiver-transmitter-type devices, among others.

One method embodiment includes receiving, by a first device, a first data communication and responding, by the first device, to the first data communication with a second data communication identifying a state of the first device as a reset state. This embodiment further includes receiving, by the first device in response to the second data communication, a third data communication including data to alter the state of the first device from the reset state to a programmed state. Such embodiments may then implement the data of the third data communication to place the first device in the programmed state.

Another method embodiment includes responding, by a first device, to a first data communication with a second data communication identifying a current state of the first device. The first device of this method may then receive, in response to the second data communication, a third data communication including data to alter the state of the first device from the current state to a new programmed state. Subsequently, the first device continues by implementing the data of the third data communication to place the first device in the new programmed state.

A further embodiment is in the form of a couplable device. The couplable device includes an output device, a data communication device, a processor, and a memory. The memory stores instructions executable by the process to perform data processing activities. The data processing activities may include responding, via the data communication device, to a first data communication received via the data communication device with a second data communication identifying a current state of the couplable device. The data processing activities may also include receiving, via the data communication device in response to the second data communication, a third data communication including data to alter the state of the couplable device from the current state to a new programmed state. The data processing activities may further include implementing the data of the third data communication to place the couplable device in the new programmed state.

DETAILED DESCRIPTION

Various embodiments herein each include at least one of systems, devices, methods, and software for forced device reinitialization without mandatory restart. Such embodiments are applicable to devices that are not supportive of plug and play or other hot pluggable enabled services. As such, some embodiments are relevant to serial devices, such as universal asynchronous receiver-transmitter-type devices, among others.

In some embodiments, a device can implement a communication policy by which it can force the delivery of state change information to a host system. This allows the host to react to those changes. Consider a scenario where an unexpected device reset has occurred. With this policy, the host in some embodiments is notified of the reset and can reconfigure the device. This notice may occur when the host first attempts to communicate with the device following the device reset or occurrence of a fault condition. Simply, when an important device state change occurs, the device may respond to all incoming host requests with a special message indicating that the state information of the device must be read before further processing can occur. However, the device typically either does not have a copy of the correct state information or when it does have the proper state information, it is but one set of state information of a plurality of sets. As such, the host needs to send the state information to the device or inform the device which set of state information to utilize. Once the device reads the proper state information, the device will return to regular function.

Through the use of the communication policy of such embodiments, devices can accomplish a similar functional effect without the need for any supporting hardware. A simple communication strategy is employed to force the delivery of the state information to a host. When an important device state change occurs, the device responds to all incoming host requests with a special message indicating that it's state information must be queried before further processing can occur. Once the state information has been read, the device will begin servicing all other requests.

These and other embodiments are described herein with reference to the figures.

The functions or algorithms described herein are implemented in hardware, software or a combination of software and hardware in one embodiment. The software comprises computer executable instructions stored on computer readable media such as memory or other type of storage devices. Further, described functions may correspond to modules, which may be software, hardware, firmware, or any combination thereof. Multiple functions are performed in one or more modules as desired, and the embodiments described are merely examples. The software is executed on a digital signal processor, ASIC, microprocessor, or other type of processor operating on a system, such as a personal computer, server, a router, or other device capable of processing data including network interconnection devices.

FIG. 1is a logical block diagram of a system100, according to an example embodiment. The system100includes, among other things, a host102that is coupled to a device106via a connection104. The host102may be a controller, such as a microcontroller or other device of the larger system100, such as a serial device host that communicates asynchronously with the device106. The device106may be a serial device, such as universal asynchronous receiver-transmitter (UART) device and the like. In some embodiments, the device106is but one or two or more such devices coupled to the host102.

The connection104between the host102and the device106may be a wired or wireless connection in various embodiments. The wireless connection may be radio-based or infrared in differing embodiments.

In some embodiments, the device106may be one or more of a line display, a multi-line display, a scale, a printer, a pointing device, or other input and output devices108. Regardless, each of these devices106generally includes a microcontroller and a memory that stores instructions to implement at least a default process to inform the host102when the device106has not been initialized or has encountered a fault or other condition that requires the device106to be reinitialized. However, the device106generally doesn't have information regarding how to initialize itself to enable the device106to communicate with the host. Thus, when the device106is in such a state, upon receipt of a request from the host102, the device106responds to the request with a message requesting the host102provide initialization data, The initialization data may specify a protocol for use in communicating. This may be actual instructions or codes to use or may instead be a reference to instructions or codes for used that are already stored on the device106. After implementing the initialization data, the device106then proceeds to respond to subsequent host102requests accordingly.

FIG. 2is a block flow diagram of a method200, according to an example embodiment. The method200is an example of a method that may be performed by the device106ofFIG. 1.

The method200includes receiving202, by a first device, a first data communication and responding204, by the first device, to the first data communication with a second data communication identifying a state of the first device as a reset state. This response204occurs of course only when the first device is in a reset state or a fault state, or some other such state for which the device should be reinitialized to proceed, in some additional embodiments.

The method200further includes receiving206, by the first device in response to the second data communication, a third data communication including data to alter the state of the first device from the reset state to a programmed state. The method200then implements208the data of the third data communication to place the first device in the programmed state.

In a further embodiment, the method200also includes receiving, by the first device, a fourth data communication including a request and performing data processing to fulfill the request. in some such embodiments, the first device is a printer and the request of the fourth communication is a request to print a document. In such embodiments, the data processing performed to fulfill the request includes instructing the printer to print the document.

In some embodiments of the method200, the first device includes a microcontroller that defaults to the reset state when the first device is reset, the reset state causing the first device to respond to any communication with response of the second data communication identifying the state of the first device as the reset state.

In some of these and other embodiments, data communications are received by he first device from a host device to which the first device is communicatively coupled. The communicative coupling of the first device to the host in some embodiments is a physical coupling, such as by a wire or a socket holding a card of the device.

FIG. 3is a block diagram of a computing device, according to an example embodiment. In one embodiment, multiple such computer systems are utilized in a distributed network to implement multiple components in a transaction-based environment. An object-oriented, service-oriented, or other architecture may be used to implement such functions and communicate between the multiple systems and components. One example computing device in the form of a computer310, may include a processing unit302, memory304, removable storage312, and non-removable storage314. Although the example computing device is illustrated and described as computer310, the computing device may be in different forms in different embodiments. For example, the computing device may instead be a smartphone, a tablet, smartwatch, or other computing device including the same or similar elements as illustrated and described with regard toFIG. 3. Devices such as smartphones, tablets, and smartwatches are generally collectively referred to as mobile devices. Further, although the various data storage elements are illustrated as part of the computer310, the storage may also or alternatively include cloud-based storage accessible via a network, such as the Internet.

Returning to the computer310, memory304may include volatile memory306and non-volatile memory308. Computer310may include—or have access to a computing environment that includes a variety of computer-readable media, such as volatile memory306and non-volatile memory308, removable storage312and non-removable storage314. Computer storage includes random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM) and electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD ROM), Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium capable of storing computer-readable instructions.

Computer310may include or have access to a computing environment that includes input316, output318, and a communication connection320. The input316may include one or more of a touchscreen, touchpad, mouse, keyboard, camera, one or more device-specific buttons, a weight measuring device such as one or more sensors of a scale, one or more sensors integrated within or coupled via wired or wireless data connections to the computer310, and other input devices. The output318may include a line display, a multi-line display, one or more indicator lights, a printer, a display device such as a monitor, and other output devices.

The computer310may operate in a networked environment using a communication connection320to connect to one or more remote computers, such as database servers, web servers, and other computing device. An example remote computer may include a personal computer (PC), server, router, network PC, a peer device or other common network node, or the like. The communication connection320may be a network interface device such as one or both of an Ethernet card and a wireless card or circuit that may be connected to a network. The network may include one or more of a Local Area Network (LAN), a Wide Area Network (WAN), the Internet, and other networks. In some embodiments, the communication connection320may also or alternatively include a transceiver device, such as a BLUETOOTH® device that enables the computer310to wirelessly receive data from and transmit data to other BLUETOOTH® devices.

Computer-readable instructions stored on a computer-readable medium are executable by the processing unit302of the computer310. A hard drive (magnetic disk or solid state), CD-ROM, and. RAM are some examples of articles including a non-transitory computer-readable medium. For example, various computer programs325or apps, such as one or more applications and modules implementing one or more of the methods illustrated and described herein or an app or application that executes on a mobile device or is accessible via a web browser, may be stored on a non-transitory computer-readable medium.