A method for authentication of devices (D1, D2, D3) in a wireless network, wherein—a device (D1, D2, D3) periodically switches its mode from a read mode, in which it is able to receive authentication data from one or more other devices (D1, D2, D3), to a write mode, in which it sends out authentication data to the one or more other devices (D1, D2, D3), according to a random time slot scheme, —the device (D1, D2, D3) authenticates itself after having received authentication data from another device (D1, D2, D3) during the read mode, and—the device (D1, D2, D3) switches permanently its mode to the write mode after being authenticated.