Why does my PSOC6 fails to re-connect to the WIFI when I reset it?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiPi_3762791
Level 1
Level 1

I'm running the default demo of Cypress's AWS FreeRTOS after following the instructions in: Getting Started with Amazon FreeRTOS and PSoC62 + 43xxx

And when I reset I tend to get this log:

WLAN MAC Address : CC:C0:79:A7:03:56

WLAN Firmware    : wl0: Sep  5 2019 23:24:33 version 7.45.98.92 (r722362 CY) FWID 01-f7128517

WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2019-09-05 23:10:00

WHD VERSION      : v1.70.0 : v1.70.0 : GCC 7.2 : 2019-12-02 04:14:53 -0600

.1 8308 [Tmr Svc] Wi-Fi failed to connect to AP Infinity-2.4G.

2 8308 [Tmr Svc] Connect to SoftAP Enter SSID for Soft AP using password Enter Password for Soft AP3 8327 [Tmr Svc] Wi-Fi configuration successful.

4 10111 [Tmr Svc] Write certificate...

5 10756 [Tmr Svc] Write certificate...

6 10977 [Tmr Svc] Warning: no persistent storage is available for the JITP certificate. The cerWLAN MAC Adtifi7 10978 dress : CE:[iot_threa] C0:79:A7:03[INFO ][DEMO:56

][lu] ---------STARTING DEMO--WLAN Firmwar-------

.e    : wl0: 8 10980 [ioSep  5 2019t_threa] [IN 23:24:33 vFO ][INIT][lersion 7.45u] SDK succe.98.92 (r72ssfully init2362 CY) FWialized.

ID 01-f7128517

WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2019-09-05 23:10:00

WHD VERSION      : v1.70.0 : v1.70.0 : GCC 7.2 : 2019-12-02 04:14:53 -0600

Function whd_wifi_set_supplicant_key_timeout failed at line 535 checkres = 2007

Function whd_wifi_active_join_init failed at line 1004 checkres = 2007

Function whd_wifi_set_supplicant_key_timeout failed at line 535 checkres = 2007

Function whd_wifi_active_join_init failed at line 1004 checkres = 2007

Function whd_wifi_set_supplicant_key_timeout failed at line 535 checkres = 2007

Function whd_wifi_active_join_init failed at line 1004 checkres = 2007

Besides the failure to connect, the log appears to be corrupted by race conditions. Considering that logs are important to diagnose problems, I'm surprised that no measurements were taken to avoid that.

0 Likes
5 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Please check if the following threads are helpful:

If the issue still persists, can you please let me know the detailed steps to reproduce this issue? Also, consider attaching your project if you made any modifications to the demo project so that we can get more insight into the issue.

Regards,

Dheeraj

0 Likes
MiPi_3762791
Level 1
Level 1

Thanks for the links but the issue is not related to MQTT, as it fails to connect to the WIFI. I was following the steps of the previously posted PDF. So I only modified code to add WIFI SSID and pasword and he MQTT credentials. The fist time I run the program it works just fine (it connects and sends MQTT messsages, although the log still looks bad because of thread racing conditions), if I then press the board reset switch it fails to connect and produces the log that I just posted...

0 Likes

I followed the steps in the guide and was able to run the project successfully. I tried reset, disconnecting and replugging the device, but couldn't reproduce your issue.

Can you please try using another network and see if the issue persists? Also, check if you have correct network type in the file "aws_clientcredential.h" present in the path: "amazon-freertos\demos\include\". The macros is as follows:

#define clientcredentialWIFI_SECURITY                eWiFiSecurityWPA2

Regards,

Dheeraj

0 Likes

I figured out that if I had connectivity problems and the log was almost unreadable, I probably would have many other issues, so I gave Mbed a try.

I'm also having trouble with Mbed now.

I creatd 5 PwmOut objects, LED1-5.

if I found that ".write(1.0);" produces the same result than ".write(0.0)", (max led output). On the other side ".write(0.9999)" generates a very faint LED glow (as expected).

the LED4 behaves different than LED1-3. For instance I can set ".period(.005f)" to LED1-3, but if I try that wih LED4, the LED stays on. I haven't tested yet, but LED5 may behave like LED4 too.

0 Likes

Can you please attach your project so that I can have a look at what might be going wrong?

Regards,

Dheeraj

0 Likes