Prevent a Man-In-The-Middle attack whilst transmitting a PSK for first time
There is no magic solution. Either both parties are in a direct contact to exchange a PSK, or they use authentication based on PKI. Otherwise there is no guarantee that there is no man in the middle.