Electronic apparatus and program

The printer device employs a combination of user operations and internal units to switch device classes, addressing compatibility issues and ensuring communication with host devices, enhancing user convenience.

JP2025122996APending Publication Date: 2025-08-22TOSHIBA TEC KK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024018798
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-09
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

Printer devices with minimal operation interfaces face difficulties in easily switching device classes due to host device driver compatibility issues, leading to communication failures.

Method used

The printer device incorporates a connection unit, an operation reception unit, a detection unit, a memory unit, a processing unit, and a switching unit to facilitate switching device classes through user operations, such as combining the feed button press with cover opening/closing, allowing it to adapt to the host device's specifications.

Benefits of technology

Enables easy and convenient switching of device classes, ensuring successful communication with host devices by adapting the printer's device class to match the host device's specifications, even with limited operation interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025122996000001_ABST
    Figure 2025122996000001_ABST
Patent Text Reader

Abstract

To provide an electronic apparatus and a program that make it more convenient to switch device classes.SOLUTION: An electronic apparatus according to an embodiment includes a connection unit connectable to a host device, an operation reception unit that receives operations from a user, a detection unit that detects another operation on the own-device other than the operations performed via the operation reception unit, a storage unit that stores multiple types of device classes indicating specifications for establishing communication, a processing unit that executes processing to establish communication with the host device connected to the connection unit using one of the device classes stored in the storage unit, and a switching unit that switches the device class used by the processing unit for the processing in response to a predetermined operation that combines an operation performed via the operation reception unit and the other operation detected by the detection unit.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] FIELD An embodiment of the present invention relates to an electronic device and a program. [Background technology]

[0002] Various electronic devices (USB devices) are connected to host devices such as PCs (Personal Computers) and POS terminals via Universal Serial Bus (USB) connectors. For example, a printer device such as a thermal printer is connected to a POS terminal.

[0003] By installing a device driver that corresponds to the device class of the USB device in the host device, the connected USB device can be used as a peripheral device. Specifically, a process called enumeration is performed between the host device and the USB device to establish communication, which allows the host device to use the USB device. Meanwhile, printer devices such as thermal printers have been released with simpler configurations that minimize the number of operation buttons and other operating interfaces in order to make them more compact and reduce costs.

[0004] However, host devices may have restrictions on the device drivers that can be installed for various reasons. If the device driver for the host device does not support the device class, which is the type of USB device to be connected, the host device cannot use the USB device.

[0005] Conventionally, there are USB devices that can be configured to operate in a desired device class by manually selecting one of multiple device classes. However, the printer device with the above-mentioned simple configuration cannot easily switch device classes, which is a problem that lacks convenience. Summary of the Invention [Problem to be solved by the invention]

[0006] The problem to be solved by the present invention is to provide an electronic device and a program that can improve the convenience of switching device classes. [Means for solving the problem]

[0007] The electronic device of the embodiment includes a connection unit that can be connected to a host device, an operation reception unit that receives operations from a user, a detection unit that detects operations on the device other than operations performed via the operation reception unit, a memory unit that stores multiple types of device classes that indicate specifications for establishing communication, a processing unit that executes processing to establish communication with the host device connected to the connection unit using one of the device classes stored in the memory unit, and a switching unit that switches the device class that the processing unit uses for the processing in response to a predetermined operation that combines an operation performed via the operation reception unit and another operation detected by the detection unit. [Brief explanation of the drawings]

[0008] [Figure 1] FIG. 1 is a diagram illustrating an example of the configuration of an information processing system according to an embodiment. [Figure 2] FIG. 2 is a perspective view schematically illustrating the appearance of the printer apparatus according to the embodiment. [Figure 3] FIG. 3 is a diagram illustrating an example of the hardware configuration of the host device and the printer device according to the embodiment. [Figure 4] FIG. 4 is a diagram illustrating an example of a data configuration of a device class storage unit according to the embodiment. [Figure 5] FIG. 5 is a diagram illustrating an example of the functional configuration of the printer device according to the embodiment. [Figure 6] FIG. 6 is a flowchart illustrating an example of processing performed by the printer device according to the embodiment. [Figure 7] FIG. 7 is a sequence diagram illustrating an example of an operation performed between the host device and the printer device according to the embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0009] Hereinafter, an electronic device and a program according to an embodiment will be described with reference to the drawings. In the embodiment described below, an example in which the electronic device is applied to a printer device will be described. Note that the present invention is not limited to the embodiment described below.

[0010] 1 is a diagram showing an example of the configuration of an information processing system according to this embodiment. As shown in FIG. 1, the information processing system 1 includes a host device 10 and a printer device 20.

[0011] The host device 10 is an information processing device such as a PC (Personal Computer) or a POS (Point of Sale System) terminal.

[0012] On the other hand, the printer device 20 is an example of an electronic device, and is one of various USB devices that comply with the USB (Universal Serial Bus) standard. The printer device 20 is, for example, a thermal printer.

[0013] Fig. 2 is a perspective view that schematically shows the appearance of the printer device 20. In Fig. 2, the width direction, depth direction, and height direction of the printer device 20 are represented using three mutually orthogonal axes (X, Y, Z).

[0014] As shown in Fig. 2, the printer device 20 has a box-shaped main body housing 21. A cover 22 is provided on the top of the main body housing 21. The cover 22 is provided so as to be rotatable upward about a hinge 23 provided on the rear side (+Y direction side) of the main body housing 21. By rotating the cover 22 upward, the interior of the main body housing 21 is opened. In addition, a USB connector 208 (see Fig. 3), which will be described later, and the like are provided on the rear side of the main body housing 21.

[0015] The interior of the main body housing 21 contains roll paper R, which serves as the printing medium and is wound into a roll. Also provided inside the main body housing 21 are a transport mechanism for transporting the roll paper R to an outlet 24 (described below), a printing mechanism for printing on the roll paper R, and a control mechanism for driving and controlling each part of the printer device 20 (all of which are not shown). The printing mechanism has a platen and a thermal head, and by generating heat in the thermal head, prints characters and the like on the roll paper R that passes between the platen and the thermal head.

[0016] An outlet 24 is formed on the front surface (-Y direction side) of the main body housing 21. The roll paper R printed by the printing mechanism is discharged from the outlet 24. A feed button 25 is also provided on the front surface of the main body housing 21.

[0017] The feed button 25 is an example of an operation reception unit provided in the printer device 20 for receiving user operations. The feed button 25 is mainly used to instruct the printer device 20 to feed the roll paper R in the transport direction. When the printer device 20 receives a press of the feed button 25 with the cover 22 closed, it controls the transport mechanism to transport the roll paper R toward the discharge port 24 by a distance corresponding to the length of time the button was pressed.

[0018] As described above, the printer device 20 according to this embodiment has a simple configuration in which the operation interface (operation receiving unit) other than the feed button 25 is omitted for the purpose of compactness and cost reduction.

[0019] The printer device 20 is connected to the host device 10 via a USB cable W (see FIG. 1). When the printer device 20 is connected to the host device 10, a process called enumeration is executed to establish communication with the printer device 20. When the enumeration is completed successfully, the host device 10 is ready to use the printer device 20.

[0020] The configuration of the printer device 20 is not limited to that shown in Fig. 2. For example, the printer device 20 may include a display such as an indicator lamp for notifying the operating state of the printer device 20.

[0021] Next, a description will be given of the hardware configuration of the host device 10 and the printer device 20. FIG.

[0022] 3, the host device 10 includes a CPU 11, a ROM 12, and a RAM 13. The CPU 11 is an example of a processor and controls the overall operation of the host device 10. The ROM 12 stores various programs. The RAM 13 is used as a working memory for expanding various data.

[0023] The CPU 11, ROM 12, and RAM 13 are connected via a bus or the like to form a control unit 100. The control unit 100 executes various processes as the CPU 11 operates in accordance with programs stored in the ROM 12 and a storage unit 14 (described later).

[0024] The control unit 100 is connected to a storage unit 14 via a bus or the like. The storage unit 14 is configured with a non-volatile memory such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive) that retains stored information even when the power is turned off.

[0025] The storage unit 14 stores an OS (Operating System), various programs, setting information, etc. The storage unit 14 also stores a device driver 141. The device driver 141 is software (a program) for controlling a USB device corresponding to a specific device class. The device class will be described later.

[0026] The device driver 141 may be a device driver provided in a state that it is incorporated into the OS (hereinafter also referred to as a standard driver), or may be a vendor-specific device driver provided by a USB device vendor (hereinafter also referred to as a vendor driver).

[0027] Furthermore, the device class that the device driver 141 supports is not particularly limited. For example, the device class may be MSC (Mass Storage Class), image (scanner), printer, or a vendor-specific device class. Even if the USB device is the same device, both a standard driver and a vendor driver may be installed as the device driver 141 for that device. In this case, the standard driver and the vendor driver are assigned different device classes (class codes), and control is exercised so that one of them (for example, the vendor driver) is used preferentially.

[0028] An I / O controller 15 equipped with a USB controller is also connected to the control unit 100 via a bus or the like. A USB connector 16 is connected to the I / O controller 15. The I / O controller 15 controls the transmission and reception of signals via the USB connector 16.

[0029] 3, the printer device 20 includes a CPU 201, a ROM 202, and a RAM 203. The CPU 201 is an example of a processor, and controls the overall operation of the printer device 20. The ROM 202 stores various programs. The RAM 203 is used as a working memory for expanding various data.

[0030] The CPU 201, ROM 202, and RAM 203 are connected via a bus or the like to form a control unit 200. The control unit 200 is an example of a processing unit. The control unit 200 executes various processes, such as enumeration with the host device 10, by the CPU 201 operating in accordance with programs stored in the ROM 202 and a storage unit 204 (described later).

[0031] The control unit 200 is connected to a memory unit 204, a sensor unit 205, a function realization unit 206, etc. via a bus, etc. The memory unit 204 is an example of a memory unit, and is configured with a non-volatile memory such as a flash memory that retains stored information even when the power is turned off.

[0032] The storage unit 204 stores an embedded OS, various programs, setting information, etc. For example, the storage unit 204 stores setting information that sets a device class to be read from a device class storage unit 2041 (described later) when the printer device 20 is started up. The storage unit 204 also has a device class storage unit 2041 that stores multiple types of device classes that can be used by the device itself.

[0033] 4 is a diagram schematically illustrating an example of the data configuration of the device class storage unit 2041. As shown in FIG. 4, the device class storage unit 2041 stores multiple types of device classes that can be used by the device itself. Here, a device class refers to the type or function of a USB device that has similar characteristics and performs a common function. More specifically, a device class is a program such as firmware or a device driver that defines the USB device specifications defined for each type of USB device and the protocols used when establishing communication with the host device 10.

[0034] 4 stores two types of device classes, class C1 and class C2. Here, class C1 is a device class corresponding to a vendor driver of a vendor that manufactures the printer device 20, for example, and class C2 is a device class corresponding to a standard driver.

[0035] The number of device classes stored in the device class storage unit 2041 is not limited to the example in Fig. 4, and may be 3 or more. The device class storage unit 2041 may store device classes used in the initial state or currently used device classes in association with an identifier such as a flag, or may store each device class in association with a priority.

[0036] Returning to FIG. 3, the sensor unit 205 is an example of a detection unit. The sensor unit 205 is one of various sensor devices provided in the printer device 20. Specifically, the sensor unit 205 has an open / close sensor that senses the open / close state of the cover 22. The open / close sensor senses the open state and / or closed state of the cover 22 and outputs the sensing result to the CPU 201. In other words, the open / close sensor detects operations on the printer device 20 other than operations via the feed button 25.

[0037] If the open / close sensor detects that the cover 22 is open, it is not possible to transport or print on the roll paper R. In other words, the open / close sensor detects a structural change in the printer device 20 (the open state of the cover 22) that interferes with the transport process of the roll paper R that is executed when the feed button 25 is operated. There is no particular restriction on the method for detecting whether the cover 22 is open or closed, and for example, a microswitch, a magnetic sensor, or the like can be used.

[0038] Furthermore, the sensor unit 205 is not limited to an open / close sensor and may include other sensor devices. For example, the sensor unit 205 may include a sensor device that senses whether the roll paper R is attached to or detached from the main body housing 21, or a sensor device that identifies the type of roll paper R. The sensor unit 205 may also include a near-end sensor that senses the end or near-end state of the roll paper R, or a temperature sensor that detects the temperature of the thermal head.

[0039] The function realization unit 206 is a hardware configuration for realizing the operation and functions of the printer device 20. For example, if the printer device 20 is a thermal printer, the function realization unit 206 corresponds to a thermal head, a printing mechanism related to drive control of the thermal head, a transport mechanism related to transporting paper, etc.

[0040] Furthermore, an I / O controller 207 equipped with a USB controller, as well as the above-mentioned feed button 25, is connected to the control unit 200 via a bus or the like. A USB connector 208, which is an example of a connection unit, is connected to the I / O controller 207. The I / O controller 207 controls the transmission and reception of signals via the USB connector 208.

[0041] 3, the host device 10 and the printer device 20 are electrically connected by connecting the USB connector 16 to the USB connector 208 of the printer device 20 with a USB cable W. When the printer device 20 is electrically connected via the USB cable W, the host device 10 starts enumeration to establish communication with the printer device 20.

[0042] Specifically, when the printer device 20 is connected, the control unit 100 of the host device 10 obtains a class code indicating the device class from the printer device 20 via the I / O controller 15, thereby determining the device class of the connected printer device 20. If the device class of the printer device 20 corresponds to the device class of the device driver 141 installed in the host device 10, the control unit 100 determines that it has recognized the printer device 20. In this case, the control unit 100 cooperates with the device driver 141 to send to the printer device 20 messages such as commands that are compatible with the device class of the printer device 20, thereby establishing communication with the printer device 20. This allows the host device 10 to use the printer device 20 connected to the USB connector 16 as a peripheral device.

[0043] On the other hand, if the device class of the printer device 20 does not correspond to the device class of the device driver 141, the control unit 100 determines that it cannot recognize the printer device 20 and interrupts (ends) the enumeration. If the enumeration is interrupted, that is, if the enumeration fails, the host device 10 cannot control the printer device 20, and therefore it cannot be used as a peripheral device.

[0044] If communication with the host device 10 cannot be established due to a device class mismatch, it is conceivable to operate the printer device 20 in the desired device class by switching the device class to be used from among the multiple device classes possessed by the printer device 20. However, in a printer device with a simple configuration that has a minimal operation interface, it is not easy to switch the device class. Specifically, in a printer device with a simple configuration, it is necessary to connect a computer for changing settings to the printer device and send a command from the computer to change the device class.

[0045] Therefore, the printer device 20 of this embodiment is provided with a function for easily switching device classes to address the above-mentioned problem. The functional configuration of the printer device 20 will be described below with reference to FIG.

[0046] Fig. 5 is a diagram showing an example of the functional configuration of the printer device 20. As shown in Fig. 5, the printer device 20 includes a setting switching unit 211 as a functional unit.

[0047] The setting switching unit 211 may be a software configuration realized by cooperation between a processor (e.g., CPU 201) of the printer device 20 and a program stored in a memory (e.g., ROM 202, storage unit 204). Alternatively, the setting switching unit 211 may be a hardware configuration realized by a dedicated circuit or the like mounted on the printer device 20.

[0048] The setting switching unit 211 is an example of a switching unit, an output unit, and a restart unit. The setting switching unit 211 performs processing to switch the currently used device class to another device class in response to a user operation. Specifically, by working together with the sensor unit 205 and the like, when detecting that a predetermined operation combining the operation of the feed button 25 with another operation other than the feed button 25 (hereinafter also referred to as a combined operation) has been performed, the setting switching unit 211 performs processing to switch the currently used device class to another device class.

[0049] For example, when the setting switching unit 211 detects that the feed button 25 has been pressed for a predetermined time (e.g., three seconds) or more after the cover 22 is opened, it determines that a command to switch the device class has been issued. In this case, the setting switching unit 211 switches the setting so that a device class other than the device class currently in use among the device classes stored in the device class storage unit 2041 will be used the next time the device is started up.

[0050] Here, if there are multiple device classes other than the device class currently in use, the setting switching unit 211 changes the setting so that one of the other device classes is used at the next startup. For example, the setting switching unit 211 may randomly determine the device class to be used at the next startup. Furthermore, if priorities are set for the device classes, the setting switching unit 211 may determine the device class to be used at the next startup based on the priorities.

[0051] Furthermore, after switching the device class to be used, when the setting switching unit 211 detects that the cover 22 is closed, it controls the transport mechanism and the printing mechanism to print out the settings after the switch. For example, the setting switching unit 211 prints information (such as the device class name) that can identify the device class after the switch on the roll paper R, and discharges it from the discharge port 24.

[0052] This allows the user to check the device class after switching by looking at the print result discharged from the discharge port 24. Therefore, even if the printer device 20 has a simple configuration without a display device, the user can easily check the device class after the setting change, thereby improving convenience.

[0053] If the cover 22 is opened again and the feed button 25 is pressed for a predetermined period of time or more after the settings after the switch are printed out, the setting switching unit 211 switches the device class again. Also, if the feed button 25 is released from the open state of the cover 22 and then pressed again for a predetermined period of time or more while the cover 22 is open, the setting switching unit 211 switches the device class again.

[0054] Furthermore, the content that the setting switching unit 211 prints out after switching the device class is not limited to the device class after switching. For example, the setting switching unit 211 may print out in a state that allows comparison between the device class after switching and the device class before switching. This allows the user to check the device class before and after switching by looking at the printout discharged from the discharge port 24, thereby further improving convenience.

[0055] After switching the device class, the setting switching unit 211 restarts the printer device 20, thereby operating the printer device 20 using the device class after switching. For example, the setting switching unit 211 restarts the printer device 20 after printing out the setting contents after switching.

[0056] This enables the printer device 20 to use the device class after the switch. Specifically, the control unit 200 of the printer device 20 performs enumeration with the host device 10 connected to the USB connector 208 using the device class after the switch. During enumeration, the control unit 200 transmits a class code indicating the selected device class to the host device 10 in response to a request from the host device 10. Then, when a message conforming to the selected device class is transmitted from the host device 10, the setting switching unit 211 establishes communication with the host device 10 based on the protocol defined for the device class. Thereafter, the printer device 20 operates as a peripheral device of the host device 10.

[0057] The setting switching unit 211 may be configured not to perform print output after switching. In this case, the setting switching unit 211 may restart the printer device 20 at the timing when it detects that the cover 22 is closed.

[0058] The following describes the operation of the printer device 20. Fig. 6 is a flowchart showing an example of processing executed by the printer device 20. Fig. 6 shows an example of processing related to a change in device class.

[0059] First, the setting switching unit 211 determines whether or not the cover 22 is in the open state based on the sensing result of the sensor unit 205 (step S11). If it detects that the cover 22 is in the open state (step S11; Yes), the setting switching unit 211 determines whether or not the feed button 25 has been pressed for a predetermined time or longer (step S12).

[0060] Here, if the setting switching unit 211 does not detect that the feed button 25 has been pressed for a predetermined time or longer (step S12; No), the setting switching unit 211 returns the process to step S11. On the other hand, if the setting switching unit 211 detects that the feed button 25 has been pressed for a predetermined time or longer (step S12; Yes), the setting switching unit 211 switches the setting so that a device class other than the device class currently in use will be used at the next startup (step S13), and returns the process to step S11. Note that the setting switching unit 211 may store flag information indicating that the device class has been switched (hereinafter also referred to as a setting change flag) in the RAM 203 or the like in order to record that the device class has been switched.

[0061] On the other hand, in step S11, if the setting switching unit 211 detects that the cover 22 is in the closed state (step S11; No), the process proceeds to step S14.

[0062] In step S14, the setting switching unit 211 determines whether or not the device class has been switched, that is, whether or not the processing of step S13 has been performed. For example, the setting switching unit 211 determines whether or not the processing of switching the device class has been performed based on the presence or absence of a setting change flag.

[0063] If the device class has not been switched (step S14; No), the setting switching unit 211 returns the process to step S11. If the feed button 25 is pressed during the loop process of step S11; No → step S14; No, the control unit 200 carries out a process to transport the roll paper R in the transport direction. Also, during the loop process of step S11; No → step S14; No, printing is carried out on the roll paper R.

[0064] If the setting switching unit 211 determines that the device class has been switched (step S14; Yes), it prints out the setting contents after the switch (step S15).Then, the setting switching unit 211 restarts the printer device 20 (step S16) and ends this process.

[0065] Through the above process, the printer device 20 switches the device class used by itself in response to a user operation. Then, the printer device 20 performs enumeration with the host device 10 using the device class after the switch.

[0066] Next, an example of the operation between the host device 10 and the printer device 20 will be described with reference to Fig. 7. Fig. 7 is a sequence diagram showing an example of the operation performed between the host device 10 and the printer device 20.

[0067] 7, it is assumed that the printer device 20 corresponds to the device classes "Class C1" and "Class C2" shown in FIG. 4, and is initially in a state where Class C1 can be used. It is also assumed that the host device 10 has installed a device driver 141 that corresponds to "Class C2."

[0068] When the host device 10 and the printer device 20 are connected, the control unit 200 of the printer device 20 starts enumeration by performing a process such as sending a class code indicating "Class C1" to the host device 10 in response to a request from the host device 10 (step S21).

[0069] In this case, the host device 10 determines that the device is an unknown device that cannot be handled by itself because the class code "Class C1" acquired from the printer device 20 does not correspond to the device driver 141 installed in the host device 10. Therefore, the host device 10 ends the enumeration without sending a message conforming to "Class C1" to the printer device 20.

[0070] On the other hand, after enumeration is started in step S21, the control unit 200 of the printer device 20 waits for a message from the host device 10, but is unable to establish communication with the host device 10 because the host device 10 determines that the device is an unknown device. In other words, the control unit 200 of the printer device 20 determines that enumeration has failed (step S22).

[0071] If the enumeration fails, the control unit 200 may control the transport mechanism and the printing mechanism to print out a message informing the user of the enumeration failure. If the printer device 20 is equipped with a display such as an indicator lamp, the control unit 200 may notify the user of the enumeration failure via the display.

[0072] In such a case, in order to switch the device class of the printer device 20, the user opens the cover 22 and presses the feed button 25 for a predetermined period of time or longer.

[0073] The setting switching unit 211 of the printer device 20 detects that the cover 22 has been opened (step S23), and when it detects that the feed button 25 has been pressed for a predetermined period of time or longer (step S24), it switches the current device class "Class C1" to "Class C2" (step S25).

[0074] Next, when the setting switching unit 211 of the printer device 20 detects that the cover 22 has been closed (step S26), it prints out the changed setting contents (step S27) and then restarts the printer device 20 (step S28).

[0075] When the printer device 20 is restarted, the host device 10 and the printer device 20 are reconnected. After the reconnection of the host device 10, the control unit 200 of the printer device 20 transmits a class code indicating the switched "Class C2" to the host device 10 in response to a request from the host device 10, and starts enumeration (step S29).

[0076] In this case, the host device 10 determines that the class code "Class C2" acquired from the printer device 20 corresponds to the device driver 141 installed in the host device 10, and therefore sends a message conforming to "Class C2" to the printer device 20 (step S30).

[0077] After enumeration is started in step S28, the control unit 200 of the printer device 20 waits for a message from the host device 10. If a message is received within the waiting time, the control unit 200 of the printer device 20 determines that the enumeration was successful (step S31). In this case, communication between the host device 10 and the printer device 20 is established, and the host device 10 becomes able to print using the printer device 20.

[0078] As a result, even if the device class currently in use does not conform to the specifications (device driver 141) of the host device 10, the printer device 20 can switch the device class to be used, thereby making it conform to the specifications of the host device 10.

[0079] As described above, the printer device 20 of this embodiment includes a USB connector 208 connectable to the host device 10, a feed button 25 that accepts operations from a user, a sensor unit 205 that detects operations on the printer device other than operations via the feed button 25, a device class storage unit 2041 that stores multiple types of device classes that indicate specifications for establishing communication, a control unit 200 that executes processing to establish communication with the host device 10 connected to the USB connector 208 using one of the device classes stored in the device class storage unit 2041, and a setting switching unit 211 that switches the device class that the control unit 200 uses for processing in response to a predetermined operation that combines an operation via the feed button 25 and another operation detected by the sensor unit 205.

[0080] As a result, in the printer device 20, the device class can be switched by a combination of the operation of the feed button 25 and the opening and closing of the cover 22. Therefore, even with the printer device 20 having a simple configuration in which the operation interface is limited to only the feed button 25, the user can easily switch the device class, thereby improving the convenience of switching device classes.

[0081] The above-described embodiment can be modified as needed by changing some of the configurations or functions of the printer device 20. Therefore, several modifications of the above-described embodiment will be described below as other embodiments. The following mainly focuses on differences from the above-described embodiment, and detailed descriptions of commonalities with the content already described will be omitted. The modifications described below may be implemented individually or in appropriate combinations.

[0082] (Variation 1) In the above embodiment, the printer device 20 has been used for explanation, but the electronic device to be described is not limited to this. For example, the electronic device may be a scanner device, a cash drawer, an automatic change dispenser, etc.

[0083] (Variation 2) In the above embodiment, a configuration has been described in which the device class is switched by a combination of opening the cover 22 and pressing the feed button 25 for a predetermined period of time or longer. However, the combination of operations for switching the device class is not limited to this.

[0084] For example, the setting switching unit 211 may switch the device class when it detects that the roll paper R has been removed from the main body housing 21 based on the sensing results of a sensor device that detects the attachment / detachment state of the roll paper R, and when the feed button 25 is pressed for a predetermined period of time or longer. In this case, after switching the device class, the setting switching unit 211 prints out the post-switching settings and restarts the printer device 20, provided that the roll paper R is attached to the main body housing 21 and the cover 22 is closed.

[0085] The contents of the combination operation can be changed as appropriate depending on the type and configuration of the electronic device. For example, in a printer device that prints on leaf-shaped paper, the opening and closing operation of a tray that stores paper may be part of the combination operation.

[0086] (Variation 3) In the above embodiment, the setting switching unit 211 is configured to switch the device class in response to a user operation, but the present invention is not limited to this, and the device class may be automatically switched.

[0087] When the device class is automatically switched, for example, the setting switching unit 211 may automatically switch the device class if, when enumeration with the host device 10 is performed, a message is not sent from the host device 10 within a predetermined time. In this case, the setting switching unit 211 may print out the setting contents after switching, or may restart the printer device 20 without printing out the contents.

[0088] As a result, the printer device 20 can attempt enumeration with the host device 10 while automatically switching the device class until it conforms to the specifications (device driver 141) of the host device 10. Therefore, the printer device 20 can automatically switch the device class in accordance with the specifications of the host device 10.

[0089] Furthermore, the printer device 20 (setting switching unit 211) may be configured to manually / automatically switch the device class depending on whether or not the host device 10 is connected. Specifically, when the host device 10 is connected, the setting switching unit 211 automatically switches the device class based on the state of a message sent during enumeration with the host device 10. On the other hand, when the host device 10 is not connected, the setting switching unit 211 switches the device class depending on the combined operation of the above-described embodiment.

[0090] This allows the printer device 20 to switch between automatic and manual device class switching methods depending on the connection state with the host device 10, thereby improving user convenience.

[0091] The programs executed by each device in the above-described embodiments are provided in advance in a ROM, etc. The programs executed by each device in the above-described embodiments may be provided by being recorded in an installable or executable file format on a computer-readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, or a DVD (Digital Versatile Disk).

[0092] Furthermore, the programs executed by each device of the above-described embodiments may be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network.Furthermore, the programs executed by each device of the above-described embodiments may be provided or distributed via a network such as the Internet.

[0093] Although several embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be embodied in various other forms, and various omissions, substitutions, modifications, and combinations can be made without departing from the spirit of the invention. These embodiments and their modifications are included within the scope and spirit of the invention, and are also included in the scope of the invention and its equivalents as defined in the claims. [Explanation of symbols]

[0094] 1. Information Processing Systems 10 Host Device 20 Electronic equipment 200 control section 211 Setting switch [Prior art documents] [Patent documents]

[0095] [Patent Document 1] Japanese Patent Application Laid-Open No. 2006-180356

Claims

1. a connection section connectable to a host device; an operation receiving unit that receives an operation from a user; a detection unit that detects other operations on the device other than the operation via the operation reception unit; a storage unit that stores a plurality of types of device classes that indicate specifications for establishing communication; a processing unit that executes a process for establishing communication with the host device connected to the connection unit, using one of the device classes stored in the storage unit; a switching unit that switches the device class used by the processing unit for the processing in response to a predetermined operation that is a combination of an operation via the operation receiving unit and another operation detected by the detection unit; An electronic device comprising:

2. the detection unit detects a structural change in the device that interferes with a process that is executed when the operation reception unit is operated; The electronic device according to claim 1 .

3. the electronic device is a printer device, the switching unit switches the device class when detecting that the operation accepting unit for accepting a print medium transport instruction has been operated continuously for a predetermined time in a state in which the other operation of opening the housing of the printer device has been detected by the detection unit.

3. The electronic device according to claim 1 or 2.

4. 4. The electronic device according to claim 3, further comprising an output unit that, when the detection unit detects the other operation of closing a housing of the printer device after the switching unit has switched the device class, prints and outputs information indicating the device class after the switching.

5. The electronic device according to claim 1 , further comprising a restart unit that restarts the electronic device itself after the switching unit switches the device class.

6. a computer of an electronic device including a connection unit connectable to a host device, an operation reception unit that receives an operation from a user, and a detection unit that detects an operation on the device other than an operation via the operation reception unit, a processing unit that executes a process for establishing communication with the host device connected to the connection unit, using one of a plurality of types of device classes that indicate specifications for establishing communication; a switching unit that switches the device class used by the processing unit for the processing in response to a predetermined operation that is a combination of an operation via the operation receiving unit and another operation detected by the detection unit; A program to function as a

Citation Information

Patent Citations

  • USB connection device

    JP2007004628A

  • printer

    JP2022011935A

  • USB peripheral device and selection method of its device class

    JP2006180356A