Technical Description of OBD-II Trouble Code
Generic: Circuit Range/Performance of Transmission Range Sensor “B”
What is the meaning of this code?
This code is a generic powertrain code that applies to all makes and models from 1996 onwards. However, the specific troubleshooting steps may vary depending on the vehicle.
P2801 is a generic powertrain DTC in the transmission controls subsystem group. It is classified as a “C” type DTC. “C” type DTCs are not related to emissions, so the powertrain control module (PCM) does not activate the check engine light or store freeze frame data.
The transmission range sensor is also known as the park/neutral switch (PN) or the neutral safety switch. Its purpose is to inform the PCM about the position of the gear shifter and to allow the engine to start only in the park and neutral positions. The PCM sends a voltage reference to the sensor, and the sensor sends back a different voltage depending on the gear selected by the shifter. If the returned voltage is incorrect, this code will be triggered.
Example of an external Transmission Range Sensor (TRS):

TRS image from Dorman
Symptoms & Severity of the Code
When this code is present, the vehicle may start in any gear position, and the PCM may force the transmission into “limp” mode. In this mode, there is a noticeable lack of power, especially when starting from a complete stop.
This code poses a serious safety concern because the vehicle may start moving upon startup if it is in gear. It is important to address this problem immediately.
Causes
Possible causes for this code to be triggered are:
Diagnostic and Repair Procedures
There are two possible conditions that can trigger this code:
Condition #1- The PCM detects drive or reverse at vehicle startup
Condition #2- The PCM detects park or neutral, and the following conditions exist for 10 seconds or more: >Throttle position is 5% or more: >engine torque is greater than 50ft.lbs. >Vehicle speed is greater than 20 MPH
In my experience, this code is most commonly found in four-wheel-drive trucks that have been off-roading and have sustained damage to the range sensor and/or harness. It is very rare for a faulty PCM to be the cause of this code. The diagnosis of this code is relatively straightforward. SET THE PARKING BRAKE.
Begin with a thorough visual inspection of the range sensor and wiring harness. Repair any damage that is found. Does the vehicle start in reverse/drive? If it does start, unplug the range sensor and try starting it in reverse/drive again. If it still starts, suspect a short in the harness. If it does not start, suspect a faulty or misadjusted range sensor.
Related Transmission Range Sensor codes: P2800, P2802, P2803, and P2804.