This is a simple Arduino sketch that can be used to generate a serial test pattern (input to the m-bus master for instance). It will send one byte at the time, changing one bit compared to previous at a fixed interval.