DTC B1231/31: Driver Door Jam Protection Limit Switch Circuit Malfunction: DTC Detecting Condition
WARNING: This page is about a different car, the 2002 Toyota Avalon. However, it is still accessible from the selected car via links, so may be relevant.
DTC B1231/31 is set when there is no change in jam protection limit switch for more than 2 seconds, even when lowering glass while jam protection limit switch is OFF (indicating glass is fully closed).