Welcome ,I copied this from the from the Buell whisper,
you have a few issues that need addressed though your thread content a bit ambiguous. will attempt to resolve as follows:
1-all 1203cc XB models have interactive exhaust. it consists of 4 components: ecm programmed for same....actuator drive box which sits atop the airbox inner cover....drive cable...muffler with interactive exhaust power valve.
2-any failure even intermittent in the actuator box, cable or valve will dump fault code into your ecm and activate the CEL.
3-"so my first question is".......ambiguous. do you or do you NOT have stock XB12 muffler installed?
4-when installing aftermarket muffler on an XB12 that muffler will typically NOT have an interactive power valve. when that's the case it is highly recommended that you purchase "ecm accessing goodies" to gain access to your ecm. that access will enable you to , among many other things, clear any and all stored fault codes and DEACTIVATE the interactive exhaust feature. this will terminate your CEL(check engine light) and clear the codes.
5-in all likelihood a problematic chain-of-events lead you to this situation as follows: prior owner dicking with bike who was clueless to the inner workings of the XB models. the actuator drive box stripped its internal gears for 1 or more reasons....very common. the PO then instead of properly addressing the given problem just removed the drive cable and took a chance this would resolve the issue. clearly it did not