A method of setting up communication between a first and a second wireless communication device of an industrial automation system via a cellular network , the method being performed in the first wireless communication device and comprising: receiving (38; 54), while the first wireless communication device is attached to a first base station of the cellular network , a first message (M1) from the second wireless communication device via the first base station , said first message (M1) comprising base station identifying information (BSII) identifying a base station of the cellular network to which the second wireless communication device is attached, investigating (39; 56) the base station identifying information (BSSI) of the first message (M1) in order to identify said base station to which the second wireless communication device is attached, if the second wireless communication device is attached to a second base station , further performing investigating (42; 60, 62, 64) if one or more conditions for attaching to the second base station are fulfilled by the first wireless communication device , where one condition (42; 62) is that the second base station is allowable, and sending (43, 45; 66, 68) a response to the first message (M1) concerning the ability of the first wireless communication device to attach to the second base station , wherein if (42; 60, 62, 64) said one or more conditions are fulfilled, the method further comprises detaching (46; 70) from the first base station , and attaching (48; 72) to the second base station . receiving (38; 54), while the first wireless communication device is attached to a first base station of the cellular network , a first message (M1) from the second wireless communication device via the first base station , said first message (M1) comprising base station identifying information (BSII) identifying a base station of the cellular network to which the second wireless communication device is attached, investigating (39; 56) the base station identifying information (BSSI) of the first message (M1) in order to identify said base station to which the second wireless communication device is attached, if the second wireless communication device is attached to a second base station , further performing investigating (42; 60, 62, 64) if one or more conditions for attaching to the second base station are fulfilled by the first wireless communication device , where one condition (42; 62) is that the second base station is allowable, and sending (43, 45; 66, 68) a response to the first message (M1) concerning the ability of the first wireless communication device to attach to the second base station , wherein if (42; 60, 62, 64) said one or more conditions are fulfilled, the method further comprises detaching (46; 70) from the first base station , and attaching (48; 72) to the second base station . investigating (42; 60, 62, 64) if one or more conditions for attaching to the second base station are fulfilled by the first wireless communication device , where one condition (42; 62) is that the second base station is allowable, and sending (43, 45; 66, 68) a response to the first message (M1) concerning the ability of the first wireless communication device to attach to the second base station , wherein if (42; 60, 62, 64) said one or more conditions are fulfilled, the method further comprises detaching (46; 70) from the first base station , and attaching (48; 72) to the second base station . <EOS>