In order to achieve maximum endurance in a piston airplane fly at the lowest safe altitude with the propeller turning as slowly as possible to maintain level flight.
The easiest way to find this power setting is to reduce the power in 100 RPM increments until you cannot maintain altitude unless you add power. Your maximum endurance power setting is the last power setting used before you needed to add power.