The information which you provided is not sufficent to find the exact root cause of the issue.
Could you more details about your WiFi network setup?
Are you enterprise WiFi Network or Personal WiFi network?
Is there are any restriction in your WiFi network. Whether it blocks some address or any Security Related Restriction?
Are you able to connect with any other devices (e.g., mobile or any device) other than xdk without any problem?
One of user was facing issue while connecting with wifi network, finally the problem was with wifi network setup. Please find the details -> https://community.developer.bosch.com/t5/Technical-Support/Can-t-connect-home-Wifi/td-p/15496/page/3
i try it with different types of networks (enterprise, personal,, dhcp, open, ...)
The developed code works fine at one sensor, but all the others are not connecting to any network.
So there is no general problem with the code neither with the network.
The problem has to be on the devices itsself. (inital setup, wifi chipset, ...)