Disclosed are a communication device and a method of controlling the same,
whereby it is possible to change the device name independently in such a
manner that a plurality of communication devices having the same name
will not exist on the same wireless communication network. The
communication device queries another device with regard to its name and
determines whether its own name and the name of the other device are the
same. If the two names are the same, the querying communication device
generates a name different from that of the other device using, e.g., its
own wireless communication address, thereby changing its name. As a
result, even if new devices are added to the network, the querying
communication device automatically assigns to itself a name that is
always different from those of these other devices.