1. A method for operating a base station (BS) in a wireless communication system, the method comprising:receiving, from a wireless device, a message including:
first information informing at least one frequency on which the wireless device wants to transmit a device-to-device (D2D) discovery signal to another wireless device, and
second information informing that the wireless device wants to receive the D2D discovery signal from another wireless device; and
transmitting, to the wireless device, information on a gap in which the wireless device transmits the D2D discovery signal to another wireless device or receives the D2D discovery signal from another wireless device.