Abstract:
A non-transitory computer readable medium storing a communication program causes a computer to perform a process including: receiving first information transmitted at a time when an external communication device communicates with a target communication device; generating second information which is to be transmitted to the target communication device by an own device; and correcting the second information which is to be transmitted to the target communication device at a time when the own device communicates with the target communication device, based on a difference between the first information and the second information.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
       [0001]    This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2016-057020 filed on Mar. 22, 2016. 
       BACKGROUND 
     (i) Technical Field 
       [0002]    The present inventions relates to a non-transitory computer readable medium storing a communication program, a communication device, and a communication method. 
       SUMMARY 
       [0003]    According to one aspect of the present invention, a non-transitory computer readable medium storing a communication program causes a computer to perform a process including: receiving first information transmitted at a time when an external communication device communicates with a target communication device; generating second information which is to be transmitted to the target communication device by an own device; and correcting the second information which is to be transmitted to the target communication device at a time when the own device communicates with the target communication device, based on a difference between the first information and the second information. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0004]    The foregoing and additional features and characteristics of this disclosure will become more apparent from the following detailed descriptions considered with the reference to the accompanying drawings, wherein: 
           [0005]      FIG. 1  is a schematic diagram illustrating an example of a configuration of a communication system according to an exemplary embodiment; 
           [0006]      FIG. 2  is a block diagram illustrating a configuration example of a communication device according to the exemplary embodiment; 
           [0007]      FIG. 3  is a schematic diagram illustrating an example of a configuration of a received packet; 
           [0008]      FIG. 4  is a schematic diagram illustrating an example of a configuration of a generated packet; 
           [0009]      FIG. 5  is a flowchart illustrating an example of an operation of a communication device; 
           [0010]      FIG. 6  is a schematic diagram illustrating another example of the configuration of the received packet; 
           [0011]      FIG. 7  is a schematic diagram illustrating another example of the configuration of the generated packet; 
           [0012]      FIG. 8  is a schematic diagram illustrating an example of a configuration of a response packet; 
           [0013]      FIG. 9  is a schematic diagram illustrating another example of the configuration of the received packet; and 
           [0014]      FIG. 10  is a schematic diagram illustrating another example of the configuration of the generated packet. 
       
    
    
     DETAILED DESCRIPTION 
     Exemplary Embodiment 
     Configuration of Communication System 
       [0015]      FIG. 1  is a schematic diagram illustrating an example of a configuration of a communication system according to an exemplary embodiment. 
         [0016]    A communication system  5  has a configuration in which a communication device  1 , a communication device  2 , and a target communication device  3  are connected to each other through a network  4 , so as to enable communication with each other. 
         [0017]    As an example, the communication device  1  may be a multifunction machine which has functions of printing, scanning, FAX, and the like, and be a communication device communicating with the target communication device  3  in order to perform the functions. The communication device  1  includes an electronic component such as a central processing unit (CPU) and a flash memory having a function of processing information, in a main body. 
         [0018]    Similarly to the communication device  1 , as an example, the communication device  2  is a multifunction machine which has functions of printing, scanning, FAX, and the like, and is a communication device communicating with the target communication device  3  in order to perform the functions. It is not necessary that the communication device  2  has completely the same configuration as the communication device  1 . In the exemplary embodiment, the communication device  2  is assumed to be a product different from the communication device  1 . 
         [0019]    The target communication device  3  is a device such as a server, which has a communication function. The target communication device  3  includes an electronic component such as a central processing unit (CPU) and a flash memory having a function of processing information, in the main body. 
         [0020]    The network  4  is a communication network which allows high-speed communication. For example, the network  4  is a wired or wireless communication network such as an intranet and a local area network (LAN). 
         [0021]    The communication device  1  and the communication device  2  are set to generate image information by scanning an original document using so-called “Scan to SMB”, and to transmit the generated image information to a shared folder which is formed in a memory of the target communication device  3 , through the network  4 . It is assumed that errors such as authentication failure or character corruption occur between the communication device  1  and the target communication device  3  and errors do not occur between the communication device  2  and the target communication device  3 . On the above assumption, the communication device  1  refers to communication between the communication device  2  and the target communication device  3  and attempts to address an error occurring between the communication device  1  and the target communication device  3 . 
         [0022]    A above term “communication setting” indicates not a setting item, which is automatically set by transmission and reception between the communication device  1  and the target communication device  3 , on a communication protocol, but an item which is not automatically set. 
       Configuration of Communication Device 
       [0023]      FIG. 2  is a block diagram illustrating a configuration example of the communication device  1  according to the exemplary embodiment. 
         [0024]    The communication device  1  includes a controller  10 , a memory  11 , a communication unit  12 , a display  13 , an operation unit  14 , and a function unit  15 . The controller  10  is configured from a CPU, etc., like and controls the units and executes various programs. The memory  11  is configured from a recording medium such as a flash memory, and stores information. The communication unit  12  performs communication with an external device through a network. The display  13  is configured from a liquid crystal display (LCD) and the like, and displays a letter or an image. The operation unit  14  is configured from a button, a touchpad, and the like, and receives an input operation. The function unit  15  performs functions of printing, scanning, FAX, and the like. 
         [0025]    The controller  10  executes a communication program  110  (which will be described later) so as to perform functions as a function performing unit  100 , an examination receiving unit  101 , a packet reception unit  102 , a packet generation unit  103 , a packet-difference extraction unit  104 , a packet correction unit  105 , and a packet response unit  106 . 
         [0026]    The function performing unit  100  causes the function unit  15  to perform a function of printing, scanning, FAX, or the like. “Scan to SMB” as an example of the function is performed by the function performing unit  100 , and communication is performed through the communication unit  12 . 
         [0027]    In a case where the function unit  15  performs the function of “Scan to SMB”, and an error occurs, the examination receiving unit  101  displays an image or characters for confirming whether or not examination is performed, in the display  13 . The examination receiving unit  101  receives an examination request of a user through the operation unit  14 . When the examination receiving unit  101  receives the examination request, the examination receiving unit  101  causes the communication device  1  to be switched to an examination mode. The examination receiving unit  101  causes the function unit  15  to activate a SMB server mode, in addition to an SMB client mode which is being activated. Thus, the examination receiving unit  101  sets the packet reception unit  102  (which will be described below) to allow reception of a packet from the communication device  2  through the network  4 . 
         [0028]    The packet reception unit  102  receives a packet from the communication device  2  through the network  4 , and stores the received packet as a received packet  111  in the memory  11 . A user performs a connection from the communication device  2  to the communication device  1  on an SMB protocol, and thus the received packet  111  is received. In a case where an address of the target communication device  3  as an SMB server is preset in the communication device  2 , an address is changed from the address of the communication device  3  to the address of the communication device  1 , and then the packet reception is performed. 
         [0029]    The packet generation unit  103  generates a packet which is to be transmitted when the communication device  1  is connected to the target communication device  3  which is an SMB server. The packet generation unit  103  stores the generated packet as a generated packet  112  in the memory  11 . At this time, loopback communication may be performed in such a manner that the generated packet  112  is transmitted to the communication device  1  itself, the packet reception unit  102  receives the generated packet  112 , and the generated packet  112  is stored. 
         [0030]    The packet-difference extraction unit  104  compares the received packet  111  and the generated packet  112 , and extracts a difference between the received packet  111  and the generated packet  112 . The packet-difference extraction unit  104  forms, based on the extracted difference, a packet correction filter to be used for correcting the generated packet  112  which is generated by the packet generation unit  103 , so as to have the same details as those of the received packet  111 , and the packet-difference extraction unit  104  stores the formed packet correction filter as packet correction information  113  in the memory  11 . 
         [0031]    The packet correction unit  105  corrects a packet which is generated for communication with the target communication device  3  by the function performing unit  100 , based on the packet correction information  113 , and the packet correction unit  105  transmits the corrected packet to the target communication device  3  through the communication unit  12 . 
         [0032]    In a case where extraction of the difference from a received packet  111 , which is received by the packet-difference extraction unit  104  for the first time, and a generated packet  112 , which is generated for the first time, is not possible, the packet response unit  106  performs a response by generating a response packet as a response to the received packet  111  and transmits the generated response packet to the communication device  2 . 
         [0033]    Then, the packet reception unit  102  receives a packet as a response to the response packet, from the communication device  2  and stores the received packet as a new received packet  111 , in the memory  11 . The packet generation unit  103  generates a packet as a response to the response packet and stores the generated packet as a new generated packet  112 , in the memory  11 . 
         [0034]    The memory  11  stores: the communication program  110  for operating the controller  10  to function the above-described units  100  to  106 ; the received packet  111 ; the generated packet  112 ; the packet correction information  113 , and the like. 
         [0035]    Operation of Communication Device 
         [0036]    Next, an action of the exemplary embodiment will be described. 
         [0037]    Firstly, if the operation unit  14  receives an operation, the function performing unit  100  causes the function unit  15  to perform “Scan to SMB”. The function unit  15  scans an original document so as to generate image information. The function unit  15  communicates with the target communication device  3  in order to transmit the generated image information to the shared folder of the target communication device  3 . 
         [0038]    The function unit  15  performs communication with the target communication device  3 . However, it is assumed that an error in the communication may occur. It is assumed that an error does not occur between the communication device  2  and the target communication device  3 . 
         [0039]      FIG. 5  is a flowchart illustrating an example of an operation of the communication device  1 . 
         [0040]    Firstly, in a case where the function unit  15  performs the function of “Scan to SMB” and then an error occurs, the examination receiving unit  10  control the display  13  to display an image or characters for confirming whether or not examination is performed and receives an examination request of a user through the operation unit  14  (S 1 ). 
         [0041]    Then, in a case where the examination receiving unit  101  receives the examination request (S 1 , Yes), the examination receiving unit  101  causes the communication device  1  to be switched to the examination mode and causes the function unit  15  to activate the SMB server mode, in addition to the SMB client mode which is being activated (S 2 ). As activating the SMB server mode, the packet reception unit  102  becomes a state of enabling reception of a packet from the communication device  2  through the network  4 . 
         [0042]    Then, a user performs a connection from the communication device  2  to the communication device  1  on the SMB protocol. In a case where an address of the target communication device  3  as an SMB server is preset in the communication device  2 , an address is changed from the address of the communication device  3  to the address of the communication device  1 , and then the packet reception is performed. 
         [0043]    The packet reception unit  102  receives a packet from the communication device  2  through the network  4 , and stores the received packet as a received packet  111  in the memory  11  (S 3 ). 
         [0044]      FIG. 3  is a schematic diagram illustrating an example of a configuration of the received packet  111 . 
         [0045]    A received packet  111   a  is an example of the received packet  111 . In the received packet  111   a , “Extended security” is set to “ . . . 0 . . . ”, and one of flags is not raised. 
         [0046]    The packet generation unit  103  generates a packet which is to be transmitted when the communication device  1  is connected to the target communication device  3  being an SMB server, and stores the generated packet as a generated packet  112  in the memory  11  (S 4 ). 
         [0047]      FIG. 4  is a schematic diagram illustrating an example of a configuration of the generated packet  112 . 
         [0048]    A generated packet  112   a  is an example of the generated packet  112 . In the generated packet  112   a , “Extended security” is set to “ . . . 1 . . . ”, and one of the flags is raised. 
         [0049]    The packet-difference extraction unit  104  compares the received packet  111   a  and the generated packet  112   a , and extracts a difference between the received packet  111   a  and the generated packet  112   a  (S 5 ). That is, the difference corresponds whether or not one of the flags of “Extended security” is raised. 
         [0050]    In a case where the difference is extracted in Step S 5  (S 5 , Yes), the packet-difference extraction unit  104  forms, based on the extracted difference, a packet correction filter for correcting the generated packet  112   a  which is generated by the packet generation unit  103 , so as to have the same details as those of the received packet  111   a  (S 6 ), and then the formed packet correction filter as packet correction information  113  is stored, in association with the address of the target communication device  3  in the memory  11 . That is, a packet correction filter for changing one of the flags so as to cause “ . . . 1 . . . ” of “Extended security” in the generated packet  112  to be changed to “ . . . 0 . . . ” is made as the packet correction information  113 . 
         [0051]    Then, the packet correction unit  105  corrects (recompiles) a packet which is generated for communication with the target communication device  3  by the function performing unit  100 , based on the packet correction information  113 , transmits the corrected packet to the target communication device  3  through the communication unit  12 . If an error in communication does not occur, the packet correction unit  105  determines that the examination result is a success (S 7 , Yes), and applies the packet correction information  113  in the subsequent communication (S 8 ). Information regarding the extracted difference or information of the generated correction filter may be reported to a administrator. 
         [0052]    In a case where an error in communication occurs, the packet correction unit  105  determines that the examination result is a failure in Step S 7 , the packet correction unit  105  reports a message indicating the occurrence of a communication error, to an external terminal used by a administrator through the communication unit  12  (S 10 ). Even in a case where the examination result is determined to be a success, the packet correction unit  105  may report a message indicating the success of the communication based on the packet correction information  113 . 
         [0053]    A case where the received packet  111  and the generated packet  112  are compared to each other, and extraction of the difference is not possible in Step S 5  (S 5 , No) will be described. 
         [0054]      FIG. 6  is a schematic diagram illustrating another example of the configuration of the received packet  111 . 
         [0055]    A received packet  111   b  is an example of the received packet  111 . In the received packet  111   b , “Extended security” is set to “ . . . 1 . . . ”, and one of the flags is raised. 
         [0056]      FIG. 7  is a schematic diagram illustrating another example of the configuration of the generated packet  112 . 
         [0057]    A generated packet  112   b  is an example of the generated packet  112 . In the generated packet  112   b , “Extended security” is set to “ . . . 1 . . . ”, and one of the flags is raised similarly. That is, the flags of “Extended security” do not have a difference, and there is no difference at other locations in the generated packet  112   b.    
         [0058]      FIG. 8  is a schematic diagram illustrating an example of a configuration of the response packet. 
         [0059]    In this case, the packet response unit  106  performs a response in such a manner that the packet response unit  106  generates a response packet  114   b  as a response to the received packet  111   b , and transmits the generated response packet  114   b  to the communication device  2  (S 9 ). 
         [0060]    After that, the packet reception unit  102  receives a packet as a response to the response packet  114   b , from the communication device  2 , and stores the received packet as a new received packet  111 , in the memory  11  (S 3 ). The packet generation unit  103  generates a packet as a response to the response packet, and stores the generated packet as a new generated packet  112 , in the memory  11  (S 4 ). 
         [0061]      FIG. 9  is a schematic diagram illustrating another example of the configuration of the received packet  111 .  FIG. 10  is a schematic diagram illustrating another example of the configuration of the generated packet  112 . 
         [0062]    Regarding a difference between a received packet  111   c  and a generated packet  112   c , a flag of “Requests extended security”  112   c   1  of the generated packet  112  is provided in the generated packet  112   c , but is not provided in the received packet  111   c.    
         [0063]    Accordingly, the packet-difference extraction unit  104  sets a packet correction filter for removing the flag of “Requests extended security”  112   c   1  of the generated packet  112   c , as the packet correction information  113 . 
       Advantages of Exemplary Embodiment 
       [0064]    According to the above-described exemplary embodiment, a packet, which has been transmitted to the target communication device  3  from the communication devsce  2 , in which an error does not occur in communication with the target communication device  3 , is received as the received packet  111 . Then, the received packet  111  is compared the generated packet  112  generated in the own device  2 , and the correction filter is generated based on the difference between the received packet  111  and the generated packet  112 . Thus, it is possible to address an error occurring in the communication device  2  in communication between the own device and the target communication device  3 , without a report to an administrator. That is, it is not required that a packet or a log is transferred outwardly and analyzed. 
         [0065]    Since a packet is corrected by using the correction filter, the correction of the software of operating the function unit is not required. In addition, since the correction filter is registered in association with the address of the target communication device  3 , and the correction filter is not applied to a packet which is transmitted to other target communication devices in which a problem does not occur, it is possible to handle an error occurring between the communication device  2  and the target communication device  3 , without an influence on communication between the communication device  2  and another target communication device in which a problem does not occur. 
         [0066]    If information regarding the extracted difference or information of the generated correction filter is reported to an administrator, it is possible to cause the administrator to confirm whether there is no problem in details of the correction filter or to be helpful when upcoming firmware is improved. 
       Other Exemplary Embodiments 
       [0067]    The present invention is not limited to the aforementioned exemplary embodiment, and various modifications can be made in a range without departing from the gist of the present invention. For example, in a case of a protocol in which communication is performed by using a user datagram protocol (UDP) multicast, a multicast packet which is transmitted and received between the communication device  2  and the target communication device  3  may be acquired and the acquired packet may be compared to a packet of the own device, without the communication device  1  having a server function. 
         [0068]    A packet capturing function may be provided in the communication device  1 , and a packet which is transmitted and received between the communication device  2  and the target communication device  3  may be captured. 
         [0069]    In a case where other communication devices which have the same type and are connected to the same network  4  are provided, the packet correction information  113  may be shared with the other communication devices. Thus, it is possible to address communication errors occurring with the target communication device  3  without the other communication devices performing a generation operation of the packet correction information  113 . 
         [0070]    The functions of the units  100  to  106  of the controller  10  are realized by a program in the aforementioned exemplary embodiment. However, all or some of the units may be realized by hardware such as ASIC. The program used in the aforementioned exemplary embodiment may be stored in a recording medium such as a CD-ROM and be provided. The operating described in the aforementioned exemplary embodiment may be replaced, deleted, and added in the range without changing the gist of the present invention. 
         [0071]    The foregoing description of the exemplary embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.