Patent ID: 8117442

Claim:
A data processing device capable of being connected to and communicating with an external device having at least one predetermined communication/authentication method, the data processing device comprising a control unit comprising: a processing unit; a first storing unit storing a plurality of first type combinations, each first type combination having a plurality of first type methods including a communication method and an authentication method, the communication method and the authentication method are used for establishing communications with the external device; a non-transitory medium having instructions stored thereon that, when executed by the processing unit, cause the control unit to function as: a coefficient assigning unit assigning a coefficient to each first type method; a calculating unit calculating a value for each first type combination based on coefficients assigned to first type methods in the each first type combination; a first assigning unit assigning a first level of priority to each first type combination based on the value, the first level including a plurality of grades from highest grade to lowest grade; a first selecting unit selecting a first type combination from the plurality of first type combinations one at a time in order from the highest grade to the lowest grade of the first level; an initiating unit initiating communications with the external device using a first type method in a first type combination selected by the first selecting unit as setting data to establish communications with the external device; a first determining unit determining whether a first type method in a first type combination selected by the first selecting unit corresponds to at least one communication/authentication method for the external device based on a result of communications with the external device initiated by the initiating unit; a setting unit setting each first type method in a first type combination selected by the first selecting unit as valid method for communications with the external device when the first determining unit determines that each first type method in a first type combination selected by the first selecting unit corresponds to at least one communication/authentication method for the external device; a second determining unit determining whether at least one of a plurality of first type methods in a first type combination currently selected by the first selecting unit corresponds to a prescribed method that has been determined to be out of conformance with the communication/authentication method for the external device by the first determining unit; and a canceling unit canceling the selection of a first type combination selected by the first selecting unit when the second determining unit determines that at least one of a plurality of first type methods in the first type combination selected by the first selecting unit corresponds to the prescribed method.