A communication device is provided having wireless capabilities configured
to communicate in a first communication mode via an access point and in a
second communication mode directly between other communication devices
without utilizing an access point. The communication device includes a
detecting unit configured to detect the existence of an available
wireless network; a receiving unit configured to receive a request from
another communication device for transferring communication parameters in
the second communication mode; and a transmitting unit configured to
transmit communication parameters relating to the available wireless
network to the other communication device in response to the request.