printer
The printer's USB port and communication control unit manage power and data roles using USB-PD standard to ensure reliable power and data transmission, addressing inconsistencies in conventional printers.
Patent Information
- Application Number
- PCT/JP2026/015920
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-22
- Filing Date
- 2026-04-21
- Publication Date
- 2026-11-26
AI Technical Summary
Conventional printers operating under the USB-PD standard may fail to reliably supply power to external devices when the USB port's role is set as a sink, and may not receive data when its role is set as a host, leading to inconsistent power and data transmission.
The printer includes a USB port that can be set to either source or sink for power and host or device for data, with a communication control unit that manages role swaps and negotiations using the USB-PD standard to ensure reliable power and data transmission.
Ensures consistent and reliable power supply to external devices by managing power and data role swaps, preventing unwanted role changes, and notifying users of transmission issues.
Smart Images

Figure JP2026015920_26112026_PF_FP_ABST
Abstract
Description
Printer
[0001] The present invention relates to a printer.
[0002] The printer of Patent Document 1 includes a USB interface having a connector and a current detection unit, and supplies power to an external device via the USB interface. When the printer receives an instruction to perform image processing while supplying power to an external device, and the difference between the minimum value and the maximum value of the current value detected by the interface within a certain period exceeds a threshold value, the printer instructs the USB interface to limit power supply to the external device. When the difference between the minimum value and the maximum value detected by the current detection unit when power is supplied to the external device does not exceed the threshold value, the printer does not instruct the USB interface to limit power supply to the external device. In the USB-PD standard, the printer performs negotiation with an external device connected via a connector. The printer sets the power supply direction and the amount of power to be supplied based on the negotiation result.
[0003] Japanese Patent Laid-Open No. 2018-144301
[0004] In the above-mentioned conventional printer, as a result of negotiation with an external device connected via the USB port, the USB port of the printer may be set as a sink. A printer that operates in accordance with the USB-PD standard does not supply power to the external device under the condition that the power role of the printer's USB port with respect to the external device is a sink.
[0005] An object of the present invention is to provide a printer that contributes to more reliably supplying power to an external device connected to a USB port than in the related art.
[0006] A printer according to one aspect of the present invention comprises a USB port to which the power roll can be set to either source or sink, and a communication control unit that communicates using the USB-PD standard. When the power roll of the USB port to which an external device is connected is set to sink, the communication control unit sends a first power roll swap request to the external device. The first power roll swap request is a request to switch the power roll of the USB port from sink to source. By sending the first power roll swap request to the external device, the printer contributes to supplying power to the external device connected to the USB port. In other words, the printer contributes to supplying power to the external device connected to the USB port more reliably than before.
[0007] The USB port of the printer according to this embodiment may be set to either host or device as the data role. The communication control unit may send a first data role swap request to the external device when the data role of the USB port to which the external device is connected is host. The first data role swap request is a request to switch the data role of the USB port from host to device. A printer operating in accordance with the USB-PD standard will not receive data transmitted from an external device when the printer's data role to the external device is host. By sending a first data role swap request to the external device, the printer contributes to receiving data from the external device. In other words, the printer contributes to setting up the printer to receive data from an external device connected to the USB port more reliably than before.
[0008] The communication control unit of the printer according to this embodiment may accept the first data role swap request based on having received the first data role swap request from the external device. The communication control unit may reject the second data role swap request based on having received the second data role swap request from the external device. The second data role swap request may be a request to switch the data role of the USB port from the device to the host. The printer contributes to avoiding the data role of the USB port being switched to the host based on a request sent from the external device.
[0009] The communication control unit of the printer according to this embodiment may reject the second power roll swap request, which changes the power roll of the USB port, based on the receipt of the second power roll swap request from the external device. The printer contributes to avoiding the power roll of the USB port being switched based on a request transmitted from the external device.
[0010] The transmission of the first power roll swap request of the printer according to this embodiment to the external device does not have to be performed when the printer's power is OFF. The transmission of the first data roll swap request to the external device may be performed when the printer's power is ON. The printer contributes to preventing the printer's power roll from being set to source when the printer's power is OFF.
[0011] The transmission of the first data roll swap request of the printer according to this embodiment to the external device does not have to be performed when the printer is powered off. The transmission of the first data roll swap request to the external device may be performed when the printer is powered on. The printer contributes to preventing the printer's data roll from being set to the device when the printer is powered off.
[0012] The communication control unit of the printer according to this embodiment may transmit the first power roll swap request or the first data roll swap request to the external device based on the external device being reconnected to the USB port, renegotiation with the external device connected to the USB port, a change in the printer's power state, or detection of a change in the external device's power state. The printer contributes to more reliably setting the power roll of the USB port to the source. The printer contributes to more reliably setting the data roll of the USB port to the device.
[0013] The communication control unit of the printer according to this embodiment may resend the first power roll swap request to the external device based on the fact that the first power roll swap request sent to the external device has been rejected by the external device. By resending the first power roll swap request to the external device, the printer contributes to increasing the likelihood that the power roll of the USB port will be set as the source.
[0014] The communication control unit of the printer according to this embodiment may notify the external device that the printer is unable to supply power to the external device based on the fact that the first power role swap request transmitted to the external device has been rejected by the external device a predetermined number of times. The printer contributes to informing the printer user that the printer is unable to supply power to the external device.
[0015] The communication control unit of the printer according to this embodiment may resend the first data role swap request to the external device based on the fact that the first data role swap request sent to the external device has been rejected by the external device. By resending the first data role swap request to the external device, the printer contributes to increasing the likelihood that the data role of the USB port will be set on the device.
[0016] The communication control unit of the printer according to this embodiment may notify the external device that the printer is unable to receive data from the external device via the USB port, based on the fact that the first data role swap request transmitted to the external device has been rejected by the external device a predetermined number of times. The printer contributes to informing the printer user that the printer is unable to receive data from the external device via the USB port.
[0017] The communication control unit of the printer according to this embodiment may transmit the first power roll swap request to the external device after responding to the second power roll swap request received from the external device. The printer contributes to increasing the likelihood that the power roll of the USB port will be set as the source.
[0018] The communication control unit of the printer according to this embodiment may transmit the first data role swap request to the external device after responding to the second data role swap request received from the external device. The printer contributes to increasing the likelihood that the data role of the USB port is set to the device.
[0019] This is a perspective view of the printer 1 with the cover 22 closed, viewed from the upper right front. This is a partial cross-sectional view in the direction of the arrow 2-2 in Figure 1. This is a block diagram showing the electrical configuration of the printer 1. This is a flowchart of the print control process. This is a flowchart of the roll setting process. This is Table 4 showing the roll combinations for the USB port 82.
[0020] Hereinafter, one embodiment of the present invention will be described with reference to the drawings. The drawings are used to illustrate the technical features that the present invention may adopt. In other words, the configurations etc. shown in the drawings are not intended to limit the invention to those shown, but are merely illustrative examples.
[0021] The physical configuration of printer 1 will be described with reference to Figures 1 and 2. In the following, the upper left, lower right, lower left, upper right, upper, and lower parts of Figure 1 will be referred to as the front, rear, right, left, upper, and lower parts of printer 1, respectively. In this embodiment, for example, the up and down directions are used for convenience in explanation and are not limited to the vertical direction.
[0022] As shown in Figures 1 and 2, the printer 1 is a thermal printer that prints on a medium P. In this embodiment, the medium P is a long printing tape in which the length in the transport direction is longer than the length in the width direction. The width direction is the left-right direction, and the transport direction is the forward direction. The printer 1 comprises a housing 20 and an input unit 25. The housing 20 comprises a main body 21 and a cover 22.
[0023] The main body 21 is a roughly rectangular box shape extending in the front-to-back direction and forms the lower part of the housing 20. The main body 21 opens upward. The cover 22 is a roughly rectangular box shape extending in the front-to-back direction and forms the upper part of the housing 20. The cover 22 is rotatable around an axis extending in the left-to-right direction at the rear upper end of the main body 21.
[0024] Figure 1 shows the cover 22 in the closed position, where the cover 22 covers the opening of the main body 21 from above. When the cover 22 is open relative to the main body 21, it opens the opening of the main body 21 upwards.
[0025] As shown in Figure 2, an outlet 24 is formed at the front end of the housing 20. The outlet 24 is the gap between the front wall of the main body 21 and the front wall of the cover 22, and extends in the left-right direction. The printed medium P is discharged from the housing 20 through the outlet 24.
[0026] As shown in Figure 1, the input unit 25 is located at the upper end of the cover 22. The input unit 25 is a switch that receives various information and type instructions and outputs them to the CPU 30, which will be described later. The input unit 25 includes a power button.
[0027] As shown in Figure 2, the printer 1 includes a transport unit 5 and a print head 6 inside the housing 20. The transport unit 5 is located at the front upper end of the main body 21. The transport unit 5 is located between the front end of the main body 21 and the front end of the support mechanism 10 in the front-rear direction. The transport unit 5 is a cylinder having an axis extending in the left-right direction and is rotatably mounted on the main body 21 around its axis.
[0028] The print head 6 prints onto the medium P. The print head 6 is plate-shaped and extends in the left-right direction, and is mounted on the cover 22 from below. The print head 6 in this embodiment is a thermal head having multiple heating elements. The printer 1 prints onto the medium P by selectively heating the multiple heating elements of the print head 6.
[0029] A cutter unit 50 is detachably mounted on the front end of the housing 20. The cutter unit 50 comprises a unit housing 51, a cutting blade 54, a fixed blade 55, and a cutter motor 57 as shown in Figure 3. The unit housing 51 is a rectangular parallelepiped box shape. A passage opening 56 is formed in the unit housing 51 that penetrates the unit housing 51 in the front-to-back direction. The rear end of the passage opening 56 is located in front of the discharge opening 24.
[0030] The cutting blade 54 and the fixed blade 55 are housed in the unit housing 51 and positioned at the rear end of the unit housing 51. The fixed blade 55 is positioned above the passage opening 56 and is fixed to the unit housing 51. The cutting edge at the lower end of the fixed blade 55 extends in the left-right direction. The cutting edge of the fixed blade 55 is exposed to the passage opening 56 from below.
[0031] The cutting blade 54 is positioned below the passage opening 56 and extends in the left-right direction. A blade is positioned at the upper end of the cutting blade 54. The cutting blade 54 is supported by the unit housing 51 so as to be movable between a retracted position where it is retracted below the passage opening 56 and an entry position where it enters the passage opening 56.
[0032] The cutter motor 57 is housed in the unit housing 51 and moves the cutting blade 54 between a retracted position and an entry position. The printer 1 moves the cutting blade 54 from the retracted position to the entry position. The printer 1 cuts the medium P discharged from the discharge port 24 between the cutting blade 54 and the fixed blade 55.
[0033] Referring to Figure 3, the electrical configuration of printer 1 will be described. Printer 1 comprises a mounting unit 88, a logic DC-DC converter 86, a USB power supply DC-DC converter 81, an FET 83, a USB port 82, a communication control unit 84, and a drive unit 80. Hereinafter, the logic DC-DC converter 86 will be referred to as "logic DC-DC 86". Hereinafter, the USB power supply DC-DC converter 81 will be referred to as "power supply DC-DC 81". Printer 1 is capable of printing on media P based on power from the AC adapter 101 mounted on the mounting unit 88.
[0034] The DCDC86 for logic converts the input voltage from the AC adapter 101 into an output voltage, for example, 3.3V, for driving the drive unit 80 and the communication control unit 84.
[0035] The DC-DC converter 81 for power supply converts the input voltage from the AC adapter 101 to an output voltage suitable for powering the external device 100, for example, 9V or 5V. The power converted by the DC-DC converter 81 is supplied to the external device 100.
[0036] An external device 100 is connected to USB port 82. USB port 82 is a connection port for connecting to the external device 100 via a cable 98 that conforms to the USB-PD (USB Power Delivery) standard. The external device 100 is a USB device. USB port 82 can be set to either source or sink power roles.
[0037] USB port 82 can be configured to have either a host or device data role. When USB port 82 has a host data role, it is a Downstream Facing Port (DFP) that has control over the USB bus. When USB port 82 has a device data role, it is an Upstream Facing Port (UFP) that operates according to the control of the DFP.
[0038] The communication control unit 84 is configured to perform communication with an external device 100 connected to the USB port 82 in accordance with the USB-PD standard. The communication control unit 84 has a microcontroller and flash memory. The microcontroller of the communication control unit 84 starts a program stored in the flash memory and performs various processes according to the program. These processes include PD communication, power switching, VCONN control (one of the power supply lines in the USB Type-C standard), and role swap control.
[0039] The communication control unit 84 can communicate with the CPU 30. The communication control unit 84 can control the output voltage value from the power supply DC-DC converter 81. The communication control unit 84 performs negotiation with the external device 100 in accordance with the USB-PD standard via the USB port 82.
[0040] The communication control unit 84 controls the power supply from the DC-DC converter 81 to the external device 100 by controlling the on / off state of the FET 83. For example, when the FET 83 is turned on, power is supplied to the external device 100 via the USB port 82 and cable 98. In other words, the communication control unit 84 can supply power to the external device 100 based on the power supplied by the AC adapter 101.
[0041] The drive unit 80 includes a CPU 30, ROM 31, RAM 32, storage device 33, and input / output interface (I / O) 34. The CPU 30, ROM 31, RAM 32, and storage device 33 are electrically connected to the I / O 34. The CPU 30 is a processor that controls the printer 1. The ROM 31 stores various setting information. The RAM 32 temporarily stores various information. The storage device 33 is non-volatile.
[0042] Connected to the I / O 34 are drive circuits 37, 40, and 41, a motor driver 38, an input unit 25, and a wireless communication interface (hereinafter referred to as a wireless communication IF) 17. The drive circuit 37 controls driving of the print head 6 in accordance with an instruction input from the CPU 30. The drive circuit 40 controls driving of the cutter motor 57 in accordance with an instruction input from the CPU 30. The drive circuit 41 controls driving of the display 42 in accordance with an instruction input from the CPU 30. The display 42 is configured to display an image. The display 42 is, for example, a liquid crystal display.
[0043] The motor driver 38 controls driving of the transport motor 53 in accordance with an instruction input from the CPU 30. The input unit 25 inputs the detection result to the I / O 34. The wireless communication IF 17 is, for example, a communication interface capable of executing short-range wireless communication conforming to the Bluetooth (registered trademark) standard. The communication standard of the wireless communication IF 17 is not limited to the Bluetooth (registered trademark) standard, and may be another short-range wireless communication standard such as NFC.
[0044] With reference to FIG. 4, a print control process performed by the printer 1 will be described. Hereinafter, the step is abbreviated as S. After the power is turned on, the CPU 30 reads a program for executing the print control process stored in the ROM 31 into the RAM 32. The CPU 30 executes a print control process including the following steps in accordance with instructions included in the program read into the RAM 32. Various data obtained in the course of the print control process are stored in the RAM 32 as appropriate.
[0045] As shown in FIG. 4, the CPU 30 determines whether or not a print instruction instructing execution of printing has been detected (S51). The user operates the input unit 25 to input a print instruction to the printer 1. The print instruction may be input from an external device via the wireless communication IF 17. The print instruction includes print data and cutting information indicating whether or not to cut the medium P after printing. Based on determining that the print instruction has not been detected via the input unit 25 or the wireless communication IF 17 (S51: NO), the CPU 30 returns the process to S51.
[0046] Based on determining that a print instruction has been detected (S51: YES), the CPU 30 performs the process of S52. The CPU 30 drives the print head 6 and the transport unit 5 to execute a print process for printing on the medium P (S52).
[0047] Specifically, the CPU 30 outputs a control signal to the motor driver 38. The motor driver 38 outputs a drive current corresponding to the control signal received from the CPU 30, thereby driving the transport motor 53 and rotating the transport unit 5. The medium P is pulled out from the roll by the rotation of the transport unit 5.
[0048] The printer 1 outputs a control signal to the drive circuit 37. The drive circuit 37 controls the print head 6 to selectively heat a plurality of heating elements. The portion of the medium P heated by the heating elements develops color. The printer 1 performs printing on the medium P by repeatedly transporting a predetermined amount of the medium P via the transport unit 5 and selectively generating heat via the print head 6. The printed medium P is discharged to the outside of the housing 20 through the discharge port 24. The medium P is inserted through the passage port 56.
[0049] The CPU 30 determines whether to cut the medium P based on cutting information included in the print instruction (S53). Based on determining that the medium P is to be cut (S53: YES), the CPU 30 performs the process of S54. After the print process, the CPU 30 executes a cutting process for cutting the medium P by driving the cutting blade 54 while the transport unit 5 is stopped (S54).
[0050] Specifically, the CPU 30 stops the transport unit 5 at the timing when the medium P is transported to the cutting position, and outputs a control signal to the drive circuit 40. The drive circuit 40 outputs a drive current corresponding to the control signal received from the CPU 30, thereby driving the cutter motor 57. As the cutter motor 57 is driven, the cutting blade 54 moves in the vertical direction. The medium P discharged from the discharge port 24 is cut between the cutting blade 54 and the fixed blade 55.
[0051] Based on its determination not to disconnect the medium P (S53: NO), the CPU 30 determines whether or not it has detected an instruction to turn off the power (S55). Based on its detection that the power button has been pressed, the CPU 30 determines that it has detected an instruction to turn off the power. Based on its determination that it has detected an instruction to turn off the power (S55: NO), the CPU 30 returns to processing S51. Based on its determination that it has not detected an instruction to turn off the power (S55: YES), the print control process ends here.
[0052] Referring to Figures 5 and 6, the roll setting process performed by the printer 1 will be described. Hereinafter, steps will be abbreviated as S. After the power is turned ON, the communication control unit 84 detects that a start command has been detected and, based on this, executes the following roll setting process according to the instructions contained in the program for executing the roll setting process stored in the flash memory of the communication control unit 84. The communication control unit 84 determines that a start command has been detected based on the detection that the external device 100 is reconnected to the USB port 82, that renegotiation is performed with the external device 100 connected to the USB port 82, that the power state of the printer 1 changes, or that the power state of the external device 100 changes. Various data obtained during the roll setting process are stored in the communication control unit 84.
[0053] The communication control unit 84 performs negotiation with the external device 100 via the USB port 82 in accordance with the USB-PD standard (S1). As a result of the negotiation with the external device 100, the power role and data role of the USB port 82 are set.
[0054] As shown in Table 4 of Figure 6, the role combinations for USB port 82 can be classified into four types: conditions C1 to C4. Table 4 shows the role combinations as "power role / data role". Condition C1 is the condition where the power role of USB port 82 is source and the data role is host. Condition C2 is the condition where the power role of USB port 82 is sink and the data role is device.
[0055] Condition C3 is the condition that the power role of USB port 82 is sink and the data role is host. Condition C4 is the condition that the power role of USB port 82 is source and the data role is device. Typically, USB port 82 is assigned the role of condition C1 or condition C2.
[0056] The communication control unit 84 determines whether the printer 1 is powered on or off (S2). Based on the fact that it is receiving a predetermined voltage from the logic DCDC 86, the communication control unit 84 determines that the printer 1 is powered on. The predetermined voltage is, for example, 3.3V. Based on the determination that the printer 1 is powered off (S2: NO), the communication control unit 84 terminates the roll setting process.
[0057] Based on its determination that the printer 1 is powered on (S2: YES), the communication control unit 84 performs the process in S3. The communication control unit 84 determines whether or not it has received a first data role swap request from the external device 100 connected to the USB port 82 (S3). The first data role swap request is a request to switch the data role of the USB port 82 from the host to the device.
[0058] Based on its determination that it has received a first data role swap request from the external device 100 (S3: YES), the communication control unit 84 performs the process in S4. The communication control unit 84 accepts the first data role swap request and sends "Accept" to the external device 100 (S4). As a result of S4, the data role of USB port 82 is set to the device. The communication control unit 84 then performs the process in S5.
[0059] Based on its determination that it has not received a first data role swap request from the external device 100 (S3: NO), the communication control unit 84 performs the process in S5. The communication control unit 84 determines whether or not it has received a second data role swap request from the external device 100 connected to the USB port 82 (S5). The second data role swap request is a request to switch the data role of the USB port 82 from the device to the host.
[0060] Based on its determination that it has received a second data role swap request from the external device 100 (S5: YES), the communication control unit 84 performs the process in S6. The communication control unit 84 rejects the second data role swap request and sends "Reject" to the external device 100 (S6). As a result of S6, the data role of USB port 82 is not changed. The communication control unit 84 then performs the process in S7.
[0061] Based on its determination that it has not received a second data role swap request from the external device 100 (S5: NO), the communication control unit 84 performs the process in S7. The communication control unit 84 determines whether or not it has received a second power role swap request from the external device 100 (S7). The second power role swap request is a request to change the power role of the USB port 82 from the current setting to a different setting. The second power role swap request is a request to change the power role from source to sink, provided that the current setting is source. The second power role swap request is a request to change the power role from sink to source, provided that the current setting is sink.
[0062] Based on its determination that it has received a second power role swap request from the external device 100 (S7: YES), the communication control unit 84 performs the process in S8. The communication control unit 84 rejects the second power role swap request and sends "Reject" to the external device 100 (S8). As a result of S6, the power role of USB port 82 is not changed. The communication control unit 84 performs the process in S9.
[0063] Based on its determination that it has not received a second power role swap request from the external device 100 (S5: NO), the communication control unit 84 performs the process in S9. The communication control unit 84 obtains the power role and data role settings for the USB port 82 (S9).
[0064] The communication control unit 84 determines in S9 whether the power role of USB port 82 is the source and the data role is the host (S10). The state in which the power role of USB port 82 is the source and the data role is the host is the state in which the roles shown in condition C1 in Figure 6 are set for USB port 82. Based on the determination that the power role of USB port 82 is the source and the data role is the host (S10: YES), the communication control unit 84 performs the process in S11. The communication control unit 84 sends a first data role swap request to the external device 100 (S11). Based on the determination that the conditions for the power role of USB port 82 being the source and the data role being the host are not met (S10: NO), the communication control unit 84 performs the process in S12.
[0065] The communication control unit 84 determines whether the power role of USB port 82 acquired in S9 is a sink and the data role is a device (S12). The state in which the power role of USB port 82 is a sink and the data role is a device is the state in which the role shown in condition C2 in Figure 6 is set for USB port 82. Based on the determination that the power role of USB port 82 is a sink and the data role is a device (S12: YES), the communication control unit 84 performs the process in S13. The communication control unit 84 sends a first power role swap request to the external device 100 (S13). Based on the determination that the condition in which the power role of USB port 82 is a sink and the data role is a device is not met (S12: NO), the communication control unit 84 terminates the role setting process.
[0066] The state in which the conditions of S10 and S12 are not met (S12: NO) is when the USB port 82 is assigned the role of condition C3 or condition C4 in Table 4 of Figure 6. Normally, the USB port 82 is not assigned the role of condition C3. When the USB port 82 is assigned the role of condition C4, there is no need to perform a role swap, so the communication control unit 84 does not send a role swap request to the external device 100.
[0067] Following the processing in S11 or S13, the communication control unit 84 determines whether it has received "Accept" from the external device 100 in response to the role swap request sent to the external device 100 in S11 or S13 (S14). Receiving "Accept" from the external device 100 indicates that the role swap request sent to the external device 100 in S11 or S13 has been accepted by the external device 100. Based on its determination that it has received "Accept" from the external device 100 (S14: YES), the communication control unit 84 terminates the role setting process.
[0068] Based on receiving "Reject" from the external device 100, the communication control unit 84 determines that it has not received "Accept" from the external device 100. The communication control unit 84 may further determine that it has not received "Accept" from the external device 100 based on the determination that no response has been detected from the external device 100 for a predetermined period of time since sending the role swap request to the external device 100 in S11 or S13. Based on the determination that it has not received "Accept" from the external device 100 (S14: NO), the communication control unit 84 performs the process in S15. The communication control unit 84 resends the role swap request that it sent to the external device 100 in S11 or S13 to the external device 100 (S15).
[0069] In detail, the communication control unit 84 performs the process in S15 based on the fact that the first power role swap request it sent to the external device 100 was rejected by the external device 100 (S14: NO). The communication control unit 84 sends the first power role swap request to the external device 100 again (S15).
[0070] Based on the fact that the first data role swap request sent to the external device 100 was rejected by the external device 100 (S14: NO), the communication control unit 84 performs the process in S15. The communication control unit 84 resends the first data role swap request to the external device 100 (S15).
[0071] The communication control unit 84 determines whether it has received "Accept" from the external device 100 in response to the role swap request sent to the external device 100 in S15 (S16). Based on its determination that it has received "Accept" from the external device 100 (S16: YES), the communication control unit 84 terminates the role setting process. When "Accept" has been received from the external device 100 in the process of S14 or S16, the role of condition C4 in Table 4 of Figure 6 is set for the USB port 82. In other words, the USB port 82 is set as source for the power role and as device for the data role. When the role of condition C4 is set for the USB port 82, the printer 1 can supply power to the external device 100. When the role of condition C4 is set for the USB port 82, the printer 1 can receive data from the external device 100 via the USB port 82.
[0072] Based on the fact that the first data role swap request sent to the external device 100 has been rejected by the external device 100 a predetermined number of times (S16: NO), the communication control unit 84 performs the process in S17. The communication control unit 84 inputs a first notification instruction to the CPU 30 to notify that the printer 1 cannot receive data from the external device 100 via the USB port 82 (S17). Based on the CPU 30's determination that it has detected the first notification instruction output from the communication control unit 84, it displays a message on the display 42. The message can be set as appropriate, for example, "Data cannot be received via the USB port."
[0073] Based on the fact that the first power role swap request sent to the external device 100 was rejected by the external device 100 a predetermined number of times (S16: NO), the communication control unit 84 notifies that the printer 1 cannot supply power to the external device 100 (S17). The communication control unit 84 inputs a second notification instruction to the CPU 30 informing that the printer 1 cannot supply power to the external device 100 (S17). Based on the CPU 30's determination that it has detected the second notification instruction output from the communication control unit 84, it displays a message on the display 42. The message can be set as appropriate, for example, "Power cannot be supplied via the USB port." The communication control unit 84 then terminates the role setting process.
[0074] In the above embodiment, printer 1 is an example of the printer of the present invention. USB port 82 is an example of the USB port of the present invention. Communication control unit 84 is an example of the communication control unit 84 of the present invention. External device 100 is an example of the external device of the present invention.
[0075] The printer 1 in the above embodiment includes a USB port 82 to which the power roll can be set to either source or sink, and a communication control unit 84 that communicates using the USB-PD standard. When the power roll of the USB port 82 to which the external device 100 is connected is set to sink (S12: YES), the communication control unit 84 performs S13. The communication control unit 84 sends a first power roll swap request to the external device 100 (S13). The first power roll swap request is a request to switch the power roll of the USB port 82 from sink to source. By switching the power roll of the USB port 82 from sink to source, the printer 1 contributes to supplying power to the external device 100 connected to the USB port 82. In other words, the printer 1 contributes to supplying power to the external device 100 connected to the USB port 82 more reliably than before.
[0076] USB port 82 can be configured to either host or device as its data role. When the data role of USB port 82 to which external device 100 is connected is host (S10: YES), the communication control unit 84 performs the process in S11. The communication control unit 84 sends a first data role swap request to external device 100 (S11). The first data role swap request is a request to switch the data role of USB port 82 from host to device.
[0077] Printer 1 operates in accordance with the USB-PD standard. When Printer 1's data role to external device 100 is set to host, Printer 1 will not receive data transmitted from external device 100. Printer 1 contributes to receiving data from external device 100 by switching its data role from host to device. In other words, Printer 1 contributes to setting up the system to receive data more reliably from external device 100 connected to USB port 82 than before.
[0078] Based on receiving the first data role swap request from the external device 100 (S3: YES), the communication control unit 84 accepts the first data role swap request (S4). Based on receiving the second data role swap request from the external device 100 (S5: YES), the communication control unit 84 rejects the second data role swap request (S6). The second data role swap request is a request to switch the data role of USB port 82 from the device to the host. The printer 1 contributes to preventing the data role of USB port 82 from being switched to the host based on the request sent from the external device 100.
[0079] The communication control unit 84 rejects the second power role swap request (S8) based on the fact that it has received the second power role swap request from the external device 100 (S7: YES). The second power role swap request is a request to change the power role of USB port 82. The printer 1 contributes to preventing the power role of USB port 82 from being switched based on the request sent from the external device 100.
[0080] Sending the first power roll swap request to the external device 100 (S13) is not performed when the printer 1 is powered off (S2: NO). Sending the first power roll swap request to the external device 100 is performed when the printer 1 is powered on (S2: YES, S13). The printer 1 contributes to preventing the printer 1's power roll from being set to source when the printer 1 is powered off.
[0081] Sending the first data role swap request to the external device 100 (S11) is not performed when the printer 1 is powered off (S2: NO). Sending the first data role swap request to the external device 100 (S11) is performed when the printer 1 is powered on (S2: YES, S11). The printer 1 contributes to preventing the printer 1's data role from being set to the device when the printer 1 is powered off.
[0082] The communication control unit 84 sends a first power roll swap request or a first data roll swap request to the external device 100 (S11, S13) based on the detection of the external device 100 being reconnected to the USB port 82, renegotiation with the external device 100 connected to the USB port 82, a change in the power state of the printer 1, or a change in the power state of the external device 100. The printer 1 sends a first power roll swap request to the external device 100 after detecting an operation in which the power roll of the USB port 82 is set through negotiation with the external device 100. The printer 1 contributes to more reliably setting the power roll of the USB port 82 to the source. The printer 1 sends a first data roll swap request to the external device 100 after detecting an operation in which the data roll of the USB port 82 is set through negotiation with the external device 100. The printer 1 contributes to more reliably setting the data roll of the USB port 82 to the device.
[0083] Based on the fact that the first power roll swap request sent to the external device 100 was rejected by the external device 100 (S14: NO), the communication control unit 84 performs the process in S15. The communication control unit 84 resends the first power roll swap request to the external device 100 (S15). By resending the first power roll swap request to the external device 100, the printer 1 contributes to increasing the likelihood that the power roll of the USB port 82 will be set as the source.
[0084] Based on the fact that the first power role swap request transmitted to the external device 100 has been rejected by the external device 100 a predetermined number of times (S16: NO), the communication control unit 84 notifies the external device 100 that the printer 1 cannot supply power to the external device 100 (S17). The printer 1 contributes to informing the user of the printer 1 that the printer 1 cannot supply power to the external device 100.
[0085] Based on the fact that the first data role swap request sent to the external device 100 was rejected by the external device 100 (S14: NO), the communication control unit 84 performs the process in S15. The communication control unit 84 resends the first data role swap request to the external device 100 (S15). Even under the condition that the first data role swap request was rejected, the printer 1 contributes to increasing the likelihood that the data role of the USB port 82 will be set to the device by resending the first data role swap request to the external device 100.
[0086] Based on the fact that the first data role swap request sent to the external device 100 has been rejected by the external device 100 a predetermined number of times (S16: NO), the communication control unit 84 performs the processing in S17. The communication control unit 84 notifies the printer 1 that it is unable to receive data from the external device 100 via the USB port 82 (S17). The printer 1 contributes to informing the user of the printer 1 that it is unable to receive data from the external device 100 via the USB port 82.
[0087] The communication control unit 84 sends a first power roll swap request to the external device 100 (S13) after responding to a second power roll swap request received from the external device 100 (S8). The printer 1 contributes to increasing the likelihood that the power roll of the USB port 82 will be set as the source.
[0088] The communication control unit 84 sends a first data role swap request to the external device 100 (S11) after responding to a second data role swap request received from the external device 100 (S5). The printer 1 contributes to increasing the likelihood that the data role of the USB port 82 will be set to the device.
[0089] The printer of the present invention is not limited to the embodiments described above, and various modifications may be made without departing from the spirit of the invention. The present invention can be implemented in various forms. For example, the present invention may be implemented in the form of a printing program executed by the processor of the printer 1, a non-temporary computer-readable storage medium storing the printing program, and a control method for the printer 1.
[0090] As the recording medium storing the program or the storage device of the communication control unit 84, a "non-temporary tangible medium" such as ROM, as well as tape, disk, card, semiconductor memory, and programmable logic circuitry can be used. The recording medium may also be RAM for expanding the program. The program may be supplied to a computer that executes the program via any transmission medium capable of transmitting the program, such as a communication network and broadcast waves. One aspect of this disclosure can also be realized in the form of data signals embedded in a carrier wave, in which the program is embodied by electronic transmission.
[0091] The configuration of printer 1 may be changed as appropriate. Printer 1 may or may not be equipped with a cutter unit 50 for cutting the medium P. The cutter unit 50 may be permanently attached to printer 1. The type of printer 1 may be changed as appropriate; for example, it may be an inkjet printer or a label printer.
[0092] The arrangement of the transport unit 5 may be appropriately changed according to the configuration of the print head 6, and it does not have to be located opposite the print head 6. The transport unit 5 may be a transport roller or a transport belt. There may be multiple transport units 5. The medium P may be appropriately changed, for example, it may be tape that is not wound in a roll, or fanfold paper. The number of USB ports 82 may be two or more.
[0093] The display 42 only needs to be capable of displaying images. The display 42 may be, for example, an organic EL display, a plasma display, a plasma tube array display, or an electronic paper display using electrophoresis or the like. The display 42 may be omitted as appropriate.
[0094] The program containing the instructions for executing the role setting process only needs to be stored in the communication control unit 84's storage device before the communication control unit 84 executes the program. Therefore, the method of acquiring the program, the acquisition path, and the device that stores the program can each be changed as appropriate.
[0095] Each step of the role setting process is not limited to being performed by a single communication control unit 84; some or all of the steps may be distributed and processed by multiple communication control units 84. In other words, the communication control unit 84 of the printer 1 may be multiple electronic devices. Each step of the role setting process can be rearranged, omitted, or added as needed. The following modifications may be made to the role setting process as appropriate.
[0096] The communication control unit 84 may omit the processing in S12. The communication control unit 84 may execute S13 without determining whether the power role of the USB port 82 to which the external device 100 is connected is a sink. The communication control unit 84 may omit S10. The communication control unit 84 may execute S11 without determining whether the data role of the USB port 82 to which the external device 100 is connected is a host. The communication control unit 84 may omit the processing in S10 and S11.
[0097] The communication control unit 84 may reject the first data role swap request based on having received the first data role swap request from the external device 100 (S3: YES). The communication control unit 84 may accept the second data role swap request based on having received the second data role swap request from the external device 100 (S5: YES). The communication control unit 84 may accept the second power role swap request based on having received the second power role swap request from the external device 100 (S7: YES). The communication control unit 84 may omit some or all of the processing from S2 to S7.
[0098] Sending the first power roll swap request to the external device 100 may be performed under the condition that the printer 1 is powered off. Sending the first data roll swap request to the external device 100 may be performed under the condition that the printer 1 is powered off.
[0099] The conditions for initiating the role setting process may be set as appropriate. The communication control unit 84 may execute a first power role swap request based on the detection of a user instruction. The communication control unit 84 may also execute a first data role swap request to the external device 100 based on the detection of a user instruction.
[0100] The communication control unit 84 does not have to perform the S11 or S13 process based on the detection that the external device 100 is being reconnected to the USB port 82. The communication control unit 84 does not have to perform the S11 or S13 process based on the detection that renegotiation with the external device 100 connected to the USB port 82 is to be performed. The communication control unit 84 does not have to perform the S11 or S13 process based on the detection that the power state of the printer 1 is changing. The communication control unit 84 does not have to perform the S11 or S13 process based on the detection that the power state of the external device 100 is changing.
[0101] The communication control unit 84 may omit some or all of the processing in S14 to S17. The communication control unit 84 may not resend the first power role swap request to the external device 100. The communication control unit 84 may notify that the printer 1 is unable to supply power to the external device 100.
[0102] The communication control unit 84 does not need to resend the first data role swap request to the external device 100. The communication control unit 84 does not need to notify that the printer 1 cannot receive data from the external device 100 via the USB port 82. The predetermined number of times the role swap request is sent to the external device 100 in S15 may be three or more, or it may be a number set by the user. The notification method in S17 may be changed as appropriate; for example, in a printer 1 equipped with a speaker, the message may be notified by voice. The printer 1 may perform the notification in S17 by lighting or flashing a display device such as an LED.
[0103] The communication control unit 84 does not have to execute the process in S13 after S8. The communication control unit 84 does not have to execute the process in S11 after S5.
[0104] The above modifications may be combined as appropriate, provided they are not contradictory. In addition to the combinations exemplified in the claims, the applicant intends to obtain patent rights for embodiments that combine each other in a manner that does not depart from the spirit of the present invention and is not contradictory.
[0105] 1: Printer, 82: USB port, 84: Communication control unit, 100: External device
Claims
1. A printer comprising: a USB port capable of setting a power roll to either source or sink; and a communication control unit that communicates using the USB-PD standard, wherein the communication control unit, when the power roll of the USB port to which an external device is connected is set to the sink, transmits a first power roll swap request to the external device to switch the power roll of the USB port from the sink to the source.
2. The printer according to claim 1, wherein the USB port is capable of setting the data role to either host or device, and the communication control unit sends a first data role swap request to the external device to switch the data role of the USB port from host to device when the data role of the USB port to which the external device is connected is host.
3. The printer according to claim 2, characterized in that the communication control unit accepts the first data role swap request based on receiving the first data role swap request from the external device, and rejects the second data role swap request based on receiving the second data role swap request from the external device to switch the data role of the USB port from the device to the host.
4. The printer according to claim 2, characterized in that the communication control unit rejects the second power role swap request based on the receipt of the second power role swap request for the USB port from the external device.
5. The printer according to claim 1, characterized in that the transmission of the first power role swap request to the external device is not performed when the printer's power is OFF, but is performed when the printer's power is ON.
6. The printer according to claim 2, characterized in that the transmission of the first data role swap request to the external device is not performed when the printer's power is OFF, but is performed when the printer's power is ON.
7. The printer according to claim 2, characterized in that the communication control unit transmits the first power role swap request or the first data role swap request to the external device based on the detection of the external device being reconnected to the USB port, renegotiating with the external device connected to the USB port, a change in the power state of the printer, or a change in the power state of the external device.
8. The printer according to claim 1, characterized in that the communication control unit resends the first power roll swap request to the external device based on the fact that the first power roll swap request transmitted to the external device has been rejected by the external device.
9. The printer according to claim 8, characterized in that the communication control unit notifies the external device that the printer is unable to supply power to the external device based on the fact that the first power role swap request transmitted to the external device has been rejected by the external device a predetermined number of times.
10. The printer according to claim 2, characterized in that the communication control unit resends the first data role swap request to the external device based on the fact that the first data role swap request sent to the external device has been rejected by the external device.
11. The printer according to claim 10, characterized in that the communication control unit notifies the external device that the printer cannot receive data from the external device via the USB port, based on the fact that the first data role swap request transmitted to the external device has been rejected by the external device a predetermined number of times.
12. The printer according to claim 4, characterized in that the communication control unit transmits the first power role swap request to the external device after responding to the second power role swap request received from the external device.
13. The printer according to claim 3, characterized in that the communication control unit transmits the first data role swap request to the external device after responding to the second data role swap request received from the external device.
