1. A method comprising:receiving, by a wireless device, one or more configuration parameters for a secondary cell, wherein the one or more configuration parameters indicate a plurality of bandwidth parts (BWPs) comprising a first BWP and a second BWP;
switching an active BWP of the secondary cell to the first BWP;
transmitting a preamble associated with a random access procedure for the secondary cell;
determining based on a quantity of uplink transmissions, that the random access procedure is unsuccessful; and
based on the determining that the random access procedure is unsuccessful, switching the active BWP of the secondary cell to the second BWP.