I already did that. In this example only peripheral device can send data. but i want my central device to send data in the some or the other way without making connections.
A Central won't be able to send any data to peripheral without connection. There is no provision for the same.
Only peripeheral can broasdcast some data to the Central through adv/scan response packet.