Well In WSN, I guess you're using the wpan model to simulate the IEEE 802.15.4 standard. In this case, you should use the beacon enabled mode. There is some examples in the ns-2 tcl folder for different configurations. (e.g. for NS-2.35 allinone, you can find them here \ns-allinone-2.35\ns-2.35\tcl\ex\wpan)
To send some data from the coordinator using the Beacon, you should fill the Beacon frame's payload.
These are the comments from the wpan model's developer inside the function :
" void Mac802_15_4::beaconTxHandler(bool forTX)"
/* To populate the beacon payload field, and should be set first, in that order (use primitive MLME_SET_request). */
So right after these comments, the program copies the payload to the beacon for transmission. So you have to fill that field before transmitting the beacon.
And here is a FAQ from the wpan model's developer (Can be useful to solve some common issues :