Cover beans in water (by a lot - too much water here is not an issue) and bring to a boil.
Turn off the heat. Let them sit for 20 minutes then pour off the excess liquid. Apparently a lot of the flatulence-causing-elements are in that liquid.
Re-cover the beans with water and all other ingredients (just put them directly into the water).
Bring to a boil and then simmer. I find it pretty difficult to gauge how long beans are going to take, so I start them as soon as possible and just let them go - continuing to test the constancy every 20 minutes after they have been simmering for an hour.
Once they are done, I like to let them cool and then heat them back up again, the cooling seems to infuse the flavor and the salt.
By the time the beans are done, the garlic and the chiles will be soft. Take out the cinnamon and the outer skin off the chiles and the stem, then mix all the ingredients together so the garlic and the chiles get mashed into the sauce.
Let cool. If there is too much liquid by the time it's cooled, just strain off a bit, or hold aside to add back in if there are extra beans.