A method for wireless communication, comprising: reporting, by a terminal, in a first protocol layer, a first event to a second protocol layer, the first event being used to indicate that quality of a signal in a first signal set q0 is worse than a threshold; under the condition that the terminal determines, in the second protocol layer, occurrence of a second event based on an occurrence situation of the first event, starting, by the terminal, a first timer in the second protocol layer, and determining, by the terminal, in the second protocol layer, a random access sequence for transmission based on a signal reporting situation provided by the first protocol layer about a second signal set q1 during a duration of the first timer, the random access sequence being a contention-based random access sequence or a contention-free random access sequence, wherein the second event is used to indicate that link quality corresponding to the signal in the first signal set q0 is poor enough to meet a second condition, wherein the first protocol layer is a physical layer and the second protocol layer is a higher layer, characterized by determining, by the terminal, in the second protocol layer, the random access sequence for transmission based on the signal reporting situation about the second signal set q1 during the duration of the first timer comprises: when the second protocol layer receives first report information from the first protocol layer during the duration of the first timer, determining, by the terminal, that the random access sequence for transmission is the contention-free random access sequence, the first report information being used to indicate at least one signal, of which quality is good enough to meet a third condition, in the second signal set q1. reporting, by a terminal, in a first protocol layer, a first event to a second protocol layer, the first event being used to indicate that quality of a signal in a first signal set q0 is worse than a threshold; under the condition that the terminal determines, in the second protocol layer, occurrence of a second event based on an occurrence situation of the first event, starting, by the terminal, a first timer in the second protocol layer, and determining, by the terminal, in the second protocol layer, a random access sequence for transmission based on a signal reporting situation provided by the first protocol layer about a second signal set q1 during a duration of the first timer, the random access sequence being a contention-based random access sequence or a contention-free random access sequence, wherein the second event is used to indicate that link quality corresponding to the signal in the first signal set q0 is poor enough to meet a second condition, wherein the first protocol layer is a physical layer and the second protocol layer is a higher layer, characterized by determining, by the terminal, in the second protocol layer, the random access sequence for transmission based on the signal reporting situation about the second signal set q1 during the duration of the first timer comprises: when the second protocol layer receives first report information from the first protocol layer during the duration of the first timer, determining, by the terminal, that the random access sequence for transmission is the contention-free random access sequence, the first report information being used to indicate at least one signal, of which quality is good enough to meet a third condition, in the second signal set q1.