A terminal that performs communication with an in-vehicle device to control a vehicle, the terminal comprising: a controller configured to switch and control an operation mode of the terminal to at least a predetermined first mode or a predetermined second mode; a reception unit configured to receive a first signal including a switching request of the operation mode of the terminal from the in-vehicle device ; a generation unit configured to update a predetermined value with the reception of the first signal and generate a second signal based on the updated predetermined value; and a transmission unit configured to transmit the second signal to the in-vehicle device , wherein, in a case where a third signal including a command for instructing switching of the operation mode of the terminal received by the reception unit is a response to the second signal, the controller is configured to switch the operation mode of the terminal from the predetermined first mode to the predetermined second mode or from the predetermined second mode to the predetermined first mode, the terminal further comprising a vibration detection unit configured to detect vibration of the terminal , wherein the controller is configured to in the first mode, restrict communication with the in-vehicle device in a case where vibration is not detected in the vibration detection unit for a predetermined time, and in the second mode, restrict communication with the in-vehicle device in a case where vibration is not detected in the vibration detection unit for a time longer than the predetermined time. a controller configured to switch and control an operation mode of the terminal to at least a predetermined first mode or a predetermined second mode; a reception unit configured to receive a first signal including a switching request of the operation mode of the terminal from the in-vehicle device ; a generation unit configured to update a predetermined value with the reception of the first signal and generate a second signal based on the updated predetermined value; and a transmission unit configured to transmit the second signal to the in-vehicle device , wherein, in a case where a third signal including a command for instructing switching of the operation mode of the terminal received by the reception unit is a response to the second signal, the controller is configured to switch the operation mode of the terminal from the predetermined first mode to the predetermined second mode or from the predetermined second mode to the predetermined first mode, the terminal further comprising a vibration detection unit configured to detect vibration of the terminal , wherein the controller is configured to in the first mode, restrict communication with the in-vehicle device in a case where vibration is not detected in the vibration detection unit for a predetermined time, and in the second mode, restrict communication with the in-vehicle device in a case where vibration is not detected in the vibration detection unit for a time longer than the predetermined time. in the first mode, restrict communication with the in-vehicle device in a case where vibration is not detected in the vibration detection unit for a predetermined time, and in the second mode, restrict communication with the in-vehicle device in a case where vibration is not detected in the vibration detection unit for a time longer than the predetermined time. <EOS>