1. A method for transmitting data in a neighbor awareness network (NAN), the method comprising:acquiring, by a first NAN device in a first group, a first NAN association identifier (AID) of the first NAN device from a predetermined unique identifier;
transmitting, by the first NAN device, a first service discovery frame to a second NAN device, wherein the first service discovery frame includes the first NAN AID and first group information on a number of NAN devices in the first group;
receiving, by the first NAN device, a second service discovery frame from the second NAN device in a second group, wherein the second service discovery frame includes a second NAN AID of a second NAN device and second group information on a number of NAN devices in the second group;
determining, by the first NAN device, a traffic indication map (TIM) offset for a timing at which the second NAN device switches from a sleep mode to a wake-up mode based on the second NAN AID and the second group information; and
transmitting, by the first NAN device, TIM information including the second NAN AID to the second NAN device after the timing, wherein the TIM information further includes information on whether there is buffered traffic for a station (STA);
wherein when the information indicates there is buffered traffic for the STA in the TIM information, receiving, by the first NAN device, a power save (PS)-poll frame, from the second NAN device, requesting that the first NAN device transmit the buffered traffic to the second NAN device.