createBeacon

function to construct and send beacon