Wireless M-Bus with RFM22

Hi,

I'm trying to implement Wireless M-Bus (Meter Bus) protocol with an RFM22.

EN 13757-4 specifies the following:

The total preamble (header + synchronisation) chip sequence for this mode shall be n×(01) 000111011010010110 with n ? 39.

and then

In Manchester coding, the chip sequence 000111 is invalid. But it is used near the end of the header to allow a receiver to detect the start of a new or a stronger transmission.

Now here is my problem:

I can't enable Manchester encoding in the RFM22 because I won't be able to set chips 000111 as a sync word.

And if I disable the Manchester encoding, the RFM22 assumes that the preamble starts with a 1, that is to say n×(10) instead of n×(01).

Any idea ?

Preamble is not encoded, the encoded part comes after it. It can't be automatically decoded, you have to use decoding functions for 3-out-of-6 and Manchester code.