Have a look at one of these solutions, maybe one of them can help you. http://answers.ea.com/t5/Battlefield-3/READ-Battlefield-3-Crash-Fixes-etc-PC-XBOX-360-amp-PS3/m-p/286004#U286004
Also if the problem persists go to this site, look for some fixes there, if nothing is working register there and post about your problem, someone will respond with a solution.
Here is one solution that worked for many users: http://www.battlelog.org/bl/tutorial_disconnect-from-ea_32
These are the ports that need to be open.
PC
TCP: 80, 443, 9988, 20000-20100, 22990, 17502, 42127
UDP: 3659, 14000-14016, 22990-23006, 25200-25300
Also check again if you have not then disable UpNp and SSDP on your Router, also make sure your NAT type is OPEN.
-Disable Firewall and other anti-virus programs.
Regards