Involved in the assembly of a N-linked pentasaccharide that decorates the S-layer glycoprotein and flagellins. S-adenosyl-L-methionine-dependent methyltransferase that modifies the hexuronic acid found at position 4 of the pentasaccharide. Cell surface structure biogenesis; S-layer biogenesis. Mutants exhibit defective or limited motility. Belongs to the FkbM methyltransferase family.