@janosp, as @whosrdaddy has pointed out the Duet only connects to 2.4GHz networks so that might be an issue. One thing you could try to check that the wifi module is working is to set the wifi module up to act as a hotspot and connect to that wifi network as a test:
https://duet3d.dozuki.com/Wiki/Gcode#Section_M589_Configure_access_point_parameters