a method of controlling an electronic device adapted to interact with a telephone network subscriber identification card includes the following steps : detecting the start of interaction between the card and the device ; transferring from the card to the device a program that can be executed by a microprocessor of the device subject to the condition at least of the detection ; execution of the transferred program by the microprocessor .