I believe FDR did know.
We had broke Jap code, I believe.
And we actually decrypted the message faster than the Japanese embassy did, which is why they presented their declaration of war to Cordell Hull after the attack on Pearl rather than just a few minutes before as had been the plan.
The best description of this IMO is in the first chapter of The Codebreakers by David Kahn.