031797 is a fault stored in your BMW's memory (an ISTA fault code, not a standard OBD-II P-code).
What it means: Head unit: function-restriction log entry for Bluetooth audio playback — streaming music from the phone over Bluetooth was interrupted or not possible at some point. This is an informational entry, usually caused by the phone (connection drop, app, phone update), not a car defect. Nothing needs to be done; if Bluetooth audio keeps failing, delete and re-pair the phone and update the head unit software.