i've been trying to work with WiFi on the XDK but it doesn't seems unable to connect. Specifically the program hangs in the function WLI_connectWPA(). I read in other posts that it is probably stuck in an inifite loop but I'd like to narrow down the problem.

I tried setting up hot spots with both Android and iPhones. Then I took the HttpExampleClient as well as the Bosch IoT Suite. The only thing I changed are the SSID and password in the header file. It's strange because when I scan the available networks and print out their names, sometimes the hot spot is found and sometimes not. And if I enter a wrong SSID or passwords the function gets stuck in the exact same manner.

hotspots on smartphones can be invisible sometimes for battery saving reasons.

In general, the XDK should work with smartphones as hotspot.

The reason why the XDK gets stuck in an infinite loop is the implementation of the WLI_connectWPA() function that you can find in XDK110/Platform/Wlan/source/WlanConnect/WlanConnect.c in line 297 and 298:

Thank you for the response. I tested it and the program is certainly stuck in that line you provided. Other devices I connected to the hot spot we working just fine. Also, when I used WiFi w/o authentification the XDK did connect. I think there might be an issue with the WPA.

Your issue should not be related to the amount of available SSID's within a room. Although I think that your Wi-Fi network within the room with the 20 SSID's is overloaded and therefore the XDK cannot connect to the particular network. Please note that hotspots operate on different channels and it depends on the specific network channel capacity, if the XDK can connect to it.

If it is overloaded as mentioned, then the XDK will have serious problems to connect to it.

In addition the range between the XDK and the router be the cause that the XDK doesn't connect to your desired network too.

To solve the issue, I recommend to analyze the hotspot in your showroom more in detail and to take a closer at the transmissions on each channel.

Please tell me if this is helpful and do not hesitate to ask if you have further questions.

I assume you are correct, the XDK should not get stuck anymore when the XDK fails to connect to the local Wi-Fi hotspot. I only found comments in the particular WlanConnect.c implementation file which indicates that a timeout logic is implemented.

Nevertheless I will test this case and get back to you by the end of the week.

I tested the timeout logic in greater detail and can confirm, that the XDK won’t get any longer stuck while trying to connect to a non-existing hotspot or with wrong Wi-Fi credentials. Thus you are correct, the logic is implemented since the XDK Workbench version 1.7.0.