Fundamentally, a beacon is simply a repeated broadcast message that carries some information of general interest in the vicinity of the sender. You can achieve this in Veins by having your application call its sendDown
method every once in a while.
You can find some example code that does this in https://github.com/sommer/veins/blob/veins-4.5/src/veins/modules/application/ieee80211p/BaseWaveApplLayer.cc#L242
solved How to send beacon with viens