Simplest is to make the appropriate changes to the Modbus4J code.