A communication apparatus automatically sets the most appropriate
communication mode in accordance with the location at which the
communication apparatus is used. For example, the communication mode is
switched between operating as a master station and operating as a remote
station of a wireless communication system depending on whether or not
connection is made to a wired communication line.