Iran clearly considers Obama a weak president. Tehran believes it can keep the U.S. out of the Persian Gulf--and eventually drive it from the Middle East.
Iran's Communist ally, Cuba, was able, with the help of the Soviet Union, to use the threat of nuclear war to get the Kennedy administration to agree to never again invade Cuba. The deal that ended the Cuban missile crisis also included a U.S. commitment to withdraw its missiles from Turkey.
Iran's Islamist rulers seem to think that they can (with Russia's help) use the threat of nuclear war to kick the U.S. out of the region--ahead of bringing about a "world without America and Zionism."