Electronic information storage medium, IC chip, IC card, data transmission / reception method, and program

By using an IC chip or IC card that determines data length based on initial command bytes, data transmission and reception can occur efficiently in a single command, addressing the inefficiencies of existing methods.

JP2025049870AActive Publication Date: 2025-04-04DAI NIPPON PRINTING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023158340
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2025-04-04
Estimated Expiration
2043-09-22

AI Technical Summary

Technical Problem

Existing methods for data transmission and reception between external terminals and IC cards, such as chaining, result in increased communication overhead and processing time, making it desirable to transmit and receive larger amounts of data in a single command.

Method used

The solution involves a digital information storage medium, such as an IC chip or IC card, that can receive a command with a header and body section, determine if the initial bytes of the body section represent '00', and use this determination to specify the data length for data transmission or reception in a single command.

Benefits of technology

This approach allows for the transmission and reception of a larger amount of data with just one command, reducing communication overhead and processing time, thereby enhancing communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025049870000001_ABST
    Figure 2025049870000001_ABST
Patent Text Reader

Abstract

To provide an electronic information storage medium, an IC chip, an IC card, a data transmission / reception method, and a program which allow data larger than conventional volume to be transmitted / received by one command.SOLUTION: In response to receiving a command APDU from an external terminal 2, an IC chip 1 determines whether all bytes from a head byte to an n-th byte (n is an integer value equal to or larger than 3) in a body part of the command APDU represent "0x00" or not. When it is determined that all bytes from the head byte to the n-th byte represent "0x00", a value represented by bytes from an (n + 1)th byte to an (n + n)th byte is specified as a data length of data represented by bytes following the (n + n)th byte or a data length of data to be included in a response APDU to the command APDU.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical field of IC (Integrated Circuit) cards and the like that are capable of transmitting and receiving larger amounts of data. [Background technology]

[0002] In recent years, the use of IC cards has expanded, and cases in which IC cards are made to execute complex processes are increasing, and the amount of data sent and received between external terminals and IC cards is on the rise. ISO / IEC 7816-3, which is an international standard for IC cards, allows a 3-byte extended Lc to be specified in the body of a command (case 3) (standard Lc is 1 byte), which allows a maximum of 65,535 bytes of data to be sent from an external terminal to an IC card with one command. The same standard also allows a 3-byte extended Le to be specified in the body of a command (case 2), which allows a maximum of 65,536 bytes of data to be sent from an IC card to an external terminal in response to one command. Meanwhile, in order to send a large amount of data from an external terminal to an IC card, a technique called chaining is known, in which the data is divided into multiple parts and sent sequentially by multiple commands, as disclosed in Patent Document 1, for example. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent No. 5106456 Summary of the Invention [Problem to be solved by the invention]

[0004] However, chaining, which transmits data using multiple commands, increases communication overhead and lengthens processing time, so it is preferable to send and receive data using a single command without dividing the data.

[0005] Therefore, the present invention has been made in consideration of these points and the like, and one example of an objective of the present invention is to provide an electronic information storage medium, an IC chip, an IC card, a data transmission and reception method, and a program that are capable of transmitting and receiving larger amounts of data than conventional methods with a single command. [Means for solving the problem]

[0006] In order to solve the above problem, the invention described in claim 1 is an electronic information storage medium capable of receiving a command consisting of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal, characterized in that it comprises: a determination means for determining, in response to receiving the command, whether all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in the body portion of the command represent 00 (hexadecimal), and an identification means for identifying, when the determination means determines that the bytes represent 00, the value represented by the n+1th byte to the n+nth byte as the data length of data represented by the byte following the n+nth byte and thereafter, or the data length of data to be included in a response to the command.

[0007] The invention described in claim 2 is characterized in that, in the electronic information storage medium described in claim 1, it further comprises a processing means for acquiring data of the data length identified by the identification means from the body portion, using the acquired data to execute processing according to the command, and transmitting the response to the external terminal.

[0008] The invention described in claim 3 is characterized in that, in the electronic information storage medium described in claim 1, it further comprises a processing means for executing processing according to the command, acquiring data of the data length identified by the identification means in the processing, and transmitting the response including the acquired data to the external terminal.

[0009] The invention recited in claim 4 is characterized in that in the electronic information storage medium recited in claims 1 to 3, n is set according to the capabilities of the electronic information storage medium.

[0010] The invention described in claim 5 is an IC chip capable of receiving a command consisting of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal, characterized in that it comprises: a determination means for determining, in response to receiving the command, whether all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in the body portion of the command represent 00 (hexadecimal), and an identification means for identifying, when the determination means determines that the bytes represent 00, the value represented by the n+1th byte to the n+nth byte as the data length of data represented by the byte following the n+nth byte and thereafter, or the data length of data to be included in a response to the command.

[0011] The invention described in claim 6 is an IC card capable of receiving a command consisting of a header section and a body section from an external terminal and transmitting a response to the command to the external terminal, characterized in that it comprises: a determination means for determining, in response to receiving the command, whether all bytes from the first byte to the nth byte (n is any integer value greater than or equal to 3) in the body section of the command represent 00 (hexadecimal), and an identification means for identifying, when the determination means determines that the bytes represent 00, the value represented by the n+1th byte to the n+nth byte as the data length of data represented by the byte following the n+nth byte and thereafter, or the data length of data to be included in a response to the command.

[0012] The invention described in claim 7 is a data transmission and reception method executed by an electronic information storage medium capable of receiving a command consisting of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal, characterized in that it includes the steps of: determining, upon receiving the command, whether all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in the body portion of the command represent 00 (hexadecimal); and, if it is determined that all bytes from the first byte to the nth byte represent 00, identifying the value represented by the n+1th byte to the n+nth byte as the data length of data represented by the byte following the n+nth byte and thereafter, or the data length of data to be included in the response to the command.

[0013] The invention described in claim 8 is characterized in that a computer included in an electronic information storage medium capable of receiving a command consisting of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal executes, in response to receiving the command, a step of determining whether all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in the body portion of the command represent 00 (hexadecimal) or not, and if it is determined that all bytes from the first byte to the nth byte represent 00, a step of identifying the value represented by the n+1th byte to the n+nth byte as the data length of data represented by the byte following the n+nth byte and thereafter, or the data length of data to be included in a response to the command. Effect of the Invention

[0014] According to the present invention, it is possible to transmit and receive a larger amount of data with a single command than before. [Brief description of the drawings]

[0015] [Figure 1] 2 is a diagram illustrating an example of a hardware configuration of an IC chip 1. FIG. [Diagram 2]FIG. 13 is a diagram illustrating an example of a format of a command APDU. [Diagram 3] 13 is a flowchart showing an example of processing executed by the CPU 15 of the IC chip 1 when a command APDU of case 3 is received from the external terminal 2. [Figure 4] 13 is a flowchart showing an example of processing executed by the CPU 15 of the IC chip 1 when a command APDU of case 2 is received from the external terminal 2. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.

[0017] [1. Configuration and Functions of IC Chip 1] First, the configuration and functions of an IC chip 1 according to this embodiment will be described with reference to Fig. 1. The IC chip 1 is an example of an electronic information storage medium of the present invention. The IC chip 1 is mounted on, for example, an IC card such as a credit card, a cash card, or a My Number card, an employee card, or a mobile device such as a smartphone. In the case of a mobile device such as a smartphone, the IC chip 1 may be mounted on a small IC card that is detachable from the mobile device, or may be mounted on an embedded board as an eUICC (Embedded Universal Integrated Circuit Card) so that it cannot be easily removed or replaced from the mobile device.

[0018] FIG. 1 is a diagram showing an example of a hardware configuration of an IC chip 1. As shown in FIG. 1, the IC chip 1 includes an I / O circuit 11, a random access memory (RAM) 12, a nonvolatile memory (NVM) 13, a read only memory (ROM) 14, and a central processing unit (CPU) 15 (an example of a computer). The I / O circuit 11 serves as an interface with an external terminal 2. Note that communication between the IC chip 1 and the external terminal 2 may be non-contact communication or contact communication. In the case of non-contact communication, communication between the IC chip 1 and the external terminal 2 is performed via an antenna (not shown) mounted on, for example, an IC card or a mobile device. Note that examples of the external terminal 2 include a payment terminal, a communication terminal, and a door opening / closing control terminal.

[0019] For example, a flash memory is applied to the NVM 13. The NVM 13 may be an "Electrically Erasable Programmable Read-Only Memory". The NVM 13 or the ROM 14 stores various programs such as an OS (Operating System) and applications (including the program of the present invention). The NVM 13 has a storage area for writing data. Such data is data that is logically stored in a file (for example, an EF (Elementary File)) used by the application. Examples of data include setting data that determines the operation of the application, personal information, key data required for encryption and decryption operations, and certificate data.

[0020] The CPU 15 (an example of a computer) executes a program stored in the NVM 13 to function as a determining means, a specifying means, a processing means, and the like in the present invention. The CPU 15 receives a command transmitted from the external terminal 2 via the I / O circuit 11, and transmits a response to the command to the external terminal 2 via the I / O circuit 11. Here, the command and the response are, for example, a command APDU (Application Protocol Data Unit) and a response APDU defined in ISO / IEC 7816-3. In this embodiment, among case 1 to case 4 defined as command formats in ISO / IEC 7816-3, case 2 and case 3 are targeted. Examples of the command APDU in case 3 include a WRITE BINARY command, a WRITE RECORD command, and a VERIFY command. On the other hand, examples of the command APDU in case 2 include a READ BINARY command, a READ RECORD command, and a GET DATA command.

[0021] The command APDU of case 3 is composed of a header section having CLA, INS, P1, and P2, and a body section having Lc and data. The command APDU of case 2 is composed of a header section having CLA, INS, P1, and P2, and a body section having Le. The response APDU of case 2 is composed of a body section having DATA, and a subsequent section having SW1 and SW2. Here, CLA indicates a command class, and INS indicates a command code. P1 and P2 indicate command parameters. Lc indicates the data length (number of bytes) of data included in the body section of the command APDU. Le indicates the data length (number of bytes) of DATA included in the body section of the response APDU. SW1 and SW2 indicate status words.

[0022] FIG. 2 is a diagram showing an example of the format of a command APDU. FIG. 2(A) shows an example of the format of a command APDU (case 3) having a conventional extended Lc, and FIG. 2(B) shows an example of the format of a command APDU (case 2) having a conventional extended Le. In FIG. 2(A), a 3-byte extended Lc is set in the body part of the command APDU. In FIG. 2(B), a 3-byte extended Le is set in the body part of the command APDU. For both the extended Lc and the extended Le, the leading byte C(5) represents "0x00" (here, 0x indicates that it is a hexadecimal number, and 00 indicates that it is an extension), and the subsequent bytes C(6), C(7) represent "0xXXXX" (0000 < XXXX ≦ FFFF). That is, the data length of data (or DATA) is represented by the two bytes of bytes C(6), C(7).

[0023] On the other hand, FIG. 2(C) shows an example of the format of a command APDU (case 3) having a new extended Lc, and FIG. 2(D) shows an example of the format of a command APDU (case 2) having a new extended Le. In FIG. 2(C), a 6-byte new extended Lc is set in the body part of the command APDU. In FIG. 2(D), a 6-byte new extended Le is set in the body part of the command APDU. For both the new extended Lc and the new extended Le, from the leading byte C(5) to byte C(7) (that is, up to the third byte from the leading byte) represents "0x00", and the subsequent bytes C(8) to C(10) represent "0xXXXXXX" (000000 < XXXXXX ≦ FFFFFFFF). That is, the data length (1 to 16,777,215 in decimal) of data (or DATA) is represented by the three bytes of bytes C(8) to C(10).

[0024] Here, by setting the first three bytes from the first byte of the new extended Lc or the new extended Le to "0x00", it is possible to distinguish them from the conventional extended Lc or extended Le. Note that the minimum value of the conventional extended Lc or extended Le is "0x0000001", and in the conventional IC chip, when it was "0x0000000", it was treated as an error. That is, by setting at least the first three bytes from the first byte of the new extended Lc or the new extended Le to "0x00", it is possible to distinguish them from the conventional extended Lc or extended Le. In other words, by setting the first n (where n is any integer value of 3 or more) bytes from the first byte of the new extended Lc or the new extended Le to "0x00", it is possible to distinguish them from the conventional extended Lc or extended Le. Also, when the first n bytes from the first byte are set to "0x00", from the (n + 1)-th byte to the (n + n)-th byte (when n = 3, from the 4th byte to the 6th byte), the data length of data, or the data length of DATA included in the response APDU for the command APDU, is represented by the bytes following the (n + n)-th byte.

[0025] Figure 2(E) shows an example format of a command APDU (case3) having a new extended Lc, and Figure 2(F) shows an example format of a command APDU (case2) having a new extended Le. In Figure 2(E), 8 bytes of the new extended Lc are set in the body part of the command APDU, and in Figure 2(F), 8 bytes of the new extended Le are set in the body part of the command APDU. For both the new extended Lc and the new extended Le, from the first byte C(5) to the byte C(8) (that is, from the first byte to the 4th byte) represent "0x00", and the subsequent bytes C(9) to C(12) represent "0xXXXXXXXX" (00000000 < XXXXXXXX ≤ FFFFFFFF). That is, the data length (1 to 2,147,483,647 in decimal) of data (or DATA) is represented by the 4 bytes of bytes C(9) to C(12).

[0026] As described above, examples of n are shown for "3" (FIGS. 2(C) and (D)) and "4" (FIGS. 2(E) and (F)), but n may be 5 or more. For example, it is practical to set n to any integer value between 3 and 5. Also, n may be set according to the capabilities of the IC chip 1 (for example, the processing capability of the CPU 15, the memory capacity of the RAM 12 or the NVM 13). In this case, for example, in an initialization sequence (including reset reception and initial response transmission) when communication is started between the IC chip 1 and the external terminal 2, n (i.e., an integer value of 3 or more) previously set according to the capabilities of the IC chip 1 may be notified from the IC chip 1 to the external terminal 2. This allows the external terminal 2 to set new extensions Lc, Le according to the notified n. Also, n may be set according to the purpose for which the command APDU is used, and in this case, it is preferable to agree on this in advance between the external terminal 2 and the IC chip 1. The IC chip 1 according to this embodiment is pre-installed with a program that can also handle the case where n is set to an integer value of 3 or more (that is, can handle a command APDU having the new extension Lc or new extension Le).

[0027] In response to receiving the command APDU of case 3 or the command APDU of case 2 via the I / O circuit 11, the CPU 15 judges whether all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in the body of the command APDU indicate "0x00". In the case where the command APDU of case 3 is received, if the CPU 15 judges that all bytes from the first byte to the nth byte indicate "0x00", it specifies the value represented by the n+1th byte to the n+nth byte as the data length of data represented by the byte following the n+nth byte, acquires data of the specified data length from the body of the command APDU, executes processing according to the command APDU using the acquired data (for example, writes the data to the NVM 13), and transmits a response APDU to the command APDU to the external terminal 2 via the I / O circuit 11.

[0028] Alternatively, when a command APDU of case 2 is received, if the CPU 15 determines that all bytes from the first byte to the nth byte represent "0x00", it specifies the value represented by the n+1th byte to the n+nth byte as the data length of DATA to be included in a response APDU to the command APDU, executes processing according to the command APDU, acquires DATA of the specified data length in the processing (for example, reads it from NVM 13), and transmits the response APDU including the acquired DATA to the external terminal 2 via the I / O circuit 11.

[0029] [2. Operation of IC chip 1] Next, the operation of the IC chip 1 according to this embodiment will be described with reference to Fig. 3 and Fig. 4. Fig. 3 is a flowchart showing an example of processing executed by the CPU 15 of the IC chip 1 when a command APDU of case 3 is received from the external terminal 2. Fig. 4 is a flowchart showing an example of processing executed by the CPU 15 of the IC chip 1 when a command APDU of case 2 is received from the external terminal 2. Note that the processing shown in Figs. 3 and 4 shows processing when n=3 is taken as an example.

[0030] First, the process shown in FIG. 3 is started when the command APDU of case 3 is received via the I / O circuit 11. Whether or not the command APDU is case 3 can be determined by INS or the like included in the header of the command APDU. When the process shown in FIG. 3 is started, the CPU 15 (for example, the OS) determines whether or not the first byte C(5) in the body of the received command APDU represents "0x00" (step S1). If it is determined that the first byte C(5) does not represent "0x00" (that is, in the case of standard Lc, step S1: NO), the process proceeds to step S2. On the other hand, if it is determined that the first byte C(5) represents "0x00" (step S1: YES), the process proceeds to step S3.

[0031] In step S2, the CPU 15 specifies the value represented by the first byte C(5) as the data length of data represented by the bytes following the first byte C(5) and onwards, and proceeds to step S6. In step S3, the CPU 15 judges whether the bytes C(6) and C(7) following the first byte C(5) in the body of the received command APDU each represent "0x00". If it is judged that the bytes C(6) and C(7) do not each represent "0x00" (i.e., in the case of the conventional extended Lc, step S3: NO), the process proceeds to step S4. On the other hand, if it is judged that the bytes C(6) and C(7) each represent "0x00" (i.e., in the case of the new extended Lc, step S3: YES), the process proceeds to step S5.

[0032] In step S4, CPU 15 determines the value represented by bytes C(6) and C(7) following the first byte C(5) as the data length of data represented by the bytes following byte C(7) and onwards, and proceeds to step S6. Meanwhile, in step S5, CPU 15 determines the value represented by bytes C(8) to C(10) following byte C(7) as the data length of data represented by the bytes following byte C(10) and onwards, and proceeds to step S6.

[0033] In step S6, the CPU 15 obtains data of the data length specified in step S2, step S4, or step S5 from the body of the command APDU. Next, the CPU 15 executes processing according to the command APDU using the data obtained in step S6 (step S7). Next, the CPU 15 transmits a response APDU to the command APDU to the external terminal 2 via the I / O circuit 11 (step S8).

[0034] Next, the process shown in FIG. 4 is started when the command APDU of case 2 is received via the I / O circuit 11. Whether or not the command APDU is case 2 can be determined by INS or the like included in the header of the command APDU. When the process shown in FIG. 4 is started, similarly to step S1, the CPU 15 determines whether or not the first byte C(5) in the body of the received command APDU represents "0x00" (step S11). If it is determined that the first byte C(5) does not represent "0x00" (that is, in the case of standard Le, step S11: NO), the process proceeds to step S12. On the other hand, if it is determined that the first byte C(5) represents "0x00" (step S11: YES), the process proceeds to step S13.

[0035] In step S12, the CPU 15 specifies the value represented by the first byte C(5) as the data length of the DATA to be included in the response APDU to the command APDU, and proceeds to step S16. In step S13, the CPU 15 judges whether the bytes C(6) and C(7) following the first byte C(5) in the body of the received command APDU each represent "0x00". If it is judged that the bytes C(6) and C(7) do not each represent "0x00" (i.e., in the case of the conventional extended Le, step S13: NO), the process proceeds to step S14. On the other hand, if it is judged that the bytes C(6) and C(7) each represent "0x00" (i.e., in the case of the new extended Le, step S13: YES), the process proceeds to step S15.

[0036] In step S14, the CPU 15 specifies the value represented by bytes C(6) and C(7) following the first byte C(5) as the data length of the DATA to be included in the response APDU to the command APDU, and proceeds to step S16. On the other hand, in step S15, the CPU 15 specifies the value represented by bytes C(8) to C(10) following byte C(7) as the data length of the DATA to be included in the response APDU to the command APDU, and proceeds to step S16.

[0037] In step S16, the CPU 15 executes processing according to the command APDU and acquires DATA of the data length specified in step S12, step S14, or step S15. Next, the CPU 15 transmits a response APDU including the DATA acquired in step S16 to the external terminal 2 via the I / O circuit 11 (step S17).

[0038] As described above, according to the above embodiment, in response to receiving a command APDU from the external terminal 2, the IC chip 1 determines whether all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in the body portion of the command APDU represent "0x00", and if it determines that all bytes from the first byte to the nth byte represent "0x00", it is configured to specify the value represented by the n+1th byte to the n+nth byte as the data represented by the byte following the n+nth byte and thereafter, or the data length of DATA to be included in a response APDU to the command APDU.Therefore, it is possible to send and receive a larger amount of data with a single command APDU than before, and as a result, it is possible to realize high-speed and efficient communication.

[0039] 3 and 4 are also applicable to cases where n is equal to or greater than 4. For example, in the case of n=4, in step S3 in FIG. 3, it is determined whether or not bytes C(6) through C(8) following the first byte C(5) in the body of the command APDU each represent "0x00", and if it is determined that bytes C(6) through C(8) each represent "0x00", then in step S5 the value represented by bytes C(9) through C(12) following byte C(8) is identified as the data length of data represented by the bytes following byte C(12) and onwards. On the other hand, when n=4, in FIG. 4, in step S13, it is determined whether or not the bytes C(6) to C(8) following the first byte C(5) in the body of the command APDU each represent “0x00”, and the value represented by the bytes C(9) to C(12) following byte C(8) is identified as the data length of the DATA to be included in the response APDU for the command APDU. [Explanation of symbols]

[0040] 1 IC chip 2 External terminal 11 I / O circuit 12 RAM ( 13 NVM 14 ROM 15 CPU

Claims

1. An electronic information storage medium capable of receiving a command composed of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal, a determination means for determining whether or not all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in a body portion of the command represent 00 (hexadecimal number) in response to the command being received; a specifying means for specifying, when the determining means has determined that the byte represents 00, a value represented by the (n+1)th byte to the (n+n)th byte as a data length of data represented by the bytes following the (n+n)th byte, or a data length of data to be included in a response to the command; An electronic information storage medium comprising:

2. The electronic information storage medium according to claim 1, further comprising a processing means for acquiring data of the data length identified by the identification means from the body portion, executing processing corresponding to the command using the acquired data, and transmitting the response to the external terminal.

3. The electronic information storage medium according to claim 1, further comprising a processing means for executing processing in response to the command, acquiring data of the data length identified by the identification means in the processing, and transmitting the response including the acquired data to the external terminal.

4. 4. The electronic information storage medium according to claim 1, wherein said n is set according to the capacity of the electronic information storage medium.

5. An IC chip capable of receiving a command composed of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal, a determination means for determining whether or not all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in a body portion of the command represent 00 (hexadecimal number) in response to the command being received; a specifying means for specifying, when the determining means has determined that the byte represents 00, a value represented by the (n+1)th byte to the (n+n)th byte as a data length of data represented by the bytes following the (n+n)th byte, or a data length of data to be included in a response to the command; An IC chip comprising:

6. An IC card capable of receiving a command composed of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal, a determination means for determining whether or not all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in a body portion of the command represent 00 (hexadecimal number) in response to the command being received; a specifying means for specifying, when the determining means has determined that the byte represents 00, a value represented by the (n+1)th byte to the (n+n)th byte as a data length of data represented by the bytes following the (n+n)th byte, or a data length of data to be included in a response to the command; An IC card comprising:

7. A data transmission / reception method executed by an electronic information storage medium capable of receiving a command composed of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal, comprising: In response to receiving the command, determining whether all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in the body portion of the command indicate 00 (hexadecimal number); specifying a value represented by the (n+1)th byte to the (n+n)th byte as a data length of data represented by the byte following the (n+n)th byte and thereafter, or a data length of data to be included in a response to the command, when it is determined that all of the bytes from the first byte to the nth byte represent 00; 13. A data transmission and reception method comprising:

8. A computer included in an electronic information storage medium capable of receiving a command composed of a header portion and a body portion from an external terminal and transmitting a response to the command to the external terminal, In response to receiving the command, determining whether all bytes from the first byte to the nth byte (n is any integer value equal to or greater than 3) in the body portion of the command indicate 00 (hexadecimal number); specifying a value represented by the (n+1)th byte to the (n+n)th byte as a data length of data represented by the byte following the (n+n)th byte and thereafter, or a data length of data to be included in a response to the command, when it is determined that all of the bytes from the first byte to the nth byte represent 00; A program characterized by executing the above.

Citation Information

Patent Citations

  • FM benbetsuki

    JP1976006456A