A method performed by a first device for device to device, D2D, communication with a second device, comprising: discovering (S310) a second device supportive of the D2D communication; receiving (S320) an ANQP message which includes service information from the discovered second device; determining whether a mirroring service is supported based on the received ANQP message of the second device (S330); if the second device doesn't support the mirroring service, performing a group owner negotiation step in accordance with a general Wi-Fi Direct connectivity according to which the group owner is determined by comparing preset group owner intent values being transmitted as random values; if the second device supports the mirroring service as a result of the determining step, performing the following steps: determining (S350) either the first device or the second device as a group owner based on the service information of the second device and service information of the first device; receiving (S410) a group owner intent value of the second device from the second device; if the second device is determined as a group owner, comparing the group owner intent value of the first device and the group owner intent value of the second device to each other; if the group owner intent value of the second device is smaller than the group owner intent value of the first device as a result of the comparison (S540), setting (S550) the group owner intent value of the first device smaller than the group owner intent value of the second device; and if the second device is determined as a client, comparing the group owner intent value of the first device and the group owner intent value of the second device to each other; if the group owner intent value of the first device is smaller than the group owner intent value of the second device as a result of the comparison (S510), setting (S520) the group owner intent value of the first device to greater than the group owner intent value of the second device; transmitting the set group owner intent value of the first device to the second device (S430). discovering (S310) a second device supportive of the D2D communication; receiving (S320) an ANQP message which includes service information from the discovered second device; determining whether a mirroring service is supported based on the received ANQP message of the second device (S330); if the second device doesn't support the mirroring service, performing a group owner negotiation step in accordance with a general Wi-Fi Direct connectivity according to which the group owner is determined by comparing preset group owner intent values being transmitted as random values; determining (S350) either the first device or the second device as a group owner based on the service information of the second device and service information of the first device; receiving (S410) a group owner intent value of the second device from the second device; if the second device is determined as a group owner, comparing the group owner intent value of the first device and the group owner intent value of the second device to each other; if the group owner intent value of the second device is smaller than the group owner intent value of the first device as a result of the comparison (S540), setting (S550) the group owner intent value of the first device smaller than the group owner intent value of the second device; and if the second device is determined as a client, comparing the group owner intent value of the first device and the group owner intent value of the second device to each other; if the group owner intent value of the first device is smaller than the group owner intent value of the second device as a result of the comparison (S510), setting (S520) the group owner intent value of the first device to greater than the group owner intent value of the second device; transmitting the set group owner intent value of the first device to the second device (S430). <EOS>