Hot!PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently

Author
dalohar
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2013/05/16 20:31:32
  • Location: 0
  • Status: offline
2018/05/10 04:26:06 (permalink)
0

PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently

 
Hi,
Greetings!
 
I am using below custom setup
PIC32MZ2048EFG064
ATWINC1500 (Firmware versio: 19.4.4)
Harmony Stack v2_05
MPLAB X v4.05
MPLAB XC32 V1.44
 
Here I have connected to existing WiFi network in open security mode and default channel as '6'
ATWINC1500 get connected successfully to router however after sometime (say about 10-15 minutes with no any kind of data exchange), I gets "Wi-Fi Disconnected" event.
I tried to find out the error code for the same in winc1500_task.c "M2M_WIFI_RESP_CON_STATE_CHANGED" state.
Wherein I found that current state is "M2M_WIFI_DISCONNECTED" i.e. 0 and pstrWiFiState->u8ErrCode as '0' for which I am not able to find any definition as "tenuM2mConnChangedErrcode" has error codes from '1' onwards.
 
Please help to find out the cause behind it and also to resolve this issue.
Thanks in advance.
 
With Best Regards,
dalohar
 
#1
aschen0866
Super Member
  • Total Posts : 4278
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/10 07:35:53 (permalink)
0
From m2m_types.h

typedef enum {
M2M_ERR_SCAN_FAIL = ((uint8)1),
/*!< Indicate that the WINC board has failed to perform the scan operation.
*/
M2M_ERR_JOIN_FAIL,
/*!< Indicate that the WINC board has failed to join the BSS .
*/
M2M_ERR_AUTH_FAIL,
/*!< Indicate that the WINC board has failed to authenticate with the AP.
*/
M2M_ERR_ASSOC_FAIL,
/*!< Indicate that the WINC board has failed to associate with the AP.
*/
M2M_ERR_CONN_INPROGRESS,
/*!< Indicate that the WINC board has another connection request in progress.
*/
}tenuM2mConnChangedErrcode;

I don't think you can perform the WiFi scan operation while it is already connected.
 
#2
dalohar
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2013/05/16 20:31:32
  • Location: 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/10 22:56:07 (permalink)
0
 
Hi aschen0866,
 
Thanks for your reply.
Please note that I am not performing WiFi scan but still it gets disconnected.
I am trying figure out why this is happening.
 
Can you please suggest some method/steps to find the correct cause?
 
Regards,
dalohar
 
#3
aschen0866
Super Member
  • Total Posts : 4278
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/11 07:59:01 (permalink)
0
dalohar
 
Can you please suggest some method/steps to find the correct cause?




If you but have a Windows 10 machine, try enabling the Mobile hotspot feature, then have your device connected to the hotspot, run Wireshark over the "Local Area Connection 2" interface instead of the "Wi-Fi" interface, and see if the capture gives you a hint.
 
On your custom board, do you have access to the WINC1500's debug port (pin-14 UART_TXD)? It has debug messages coming out at 115K-bps.
 
 
 
 
 




#4
dalohar
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2013/05/16 20:31:32
  • Location: 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/12 01:35:49 (permalink)
0
 
Hi aschen0866,
 
Thank you for your reply!
As suggested by you I have logged WINC1500 debug port as mentioned below
 
(8620)g_activity_timeout = 8000
(82070)!@#$ Rate UP (18.0 Mbps) !@#$
(84070)!@#$ Rate UP (24.0 Mbps) !@#$
(87070)!@#$ Rate UP (36.0 Mbps) !@#$
(97070)!@#$ Rate UP (48.0 Mbps) !@#$
(99070)!@#$ Rate UP (54.0 Mbps) !@#$
(176620)g_activity_timeout = 10000
(286620)g_activity_timeout = 10000
(316620)g_activity_timeout = 10000
(346620)g_activity_timeout = 10000
(436620)g_activity_timeout = 10000
(642460)SERR(E3)
(642460)SERR(E3)
(642460)(mem_alloc) Pattern
(642460)(MEM ERR) NULL Buffer
(642470)Disc from AP
(642470)MAC State
(0)NO CORTUS app
(0)EthernetMode=1
(0)Chip ID = 1503a0
(0)Flash ID = c21320c2, Size = 4 MBit
(0)EFUSE:MAC
(10)MAC_ADDR = F8:F0:05:E0:F9:C2
(10)Shared buff 65 NRX 23 LRX 43 HIFLTX 23 MINTX 12
(10)NMI M2M SW VERSION 19.4.4
(20)NMI MIN DRV VERSION 19.3.0
(20)Built at Nov 19 2015 22:36:45
(20)ROM LIB VER_2
(20)__AES_HW_ENGINE__
(30)(M2M)LOAD SEC
(40)(M2M)PS 0
(40)(M2M)Wifi Connect
(40)(M2M)SSID : EnGenius1
(50)(M2M)AUTH : Open
(50)(M2M)Ch : 256
(50)Reset MAC
(70)>> Slp clk src <= Int. osc
(90)(GP_REG)USE PMU
(90)MAC State
(90)Set Fast Ch 6
(150)MAC State
(150)MAC State
(150)Set Fast Ch 6
(210)MAC State
(210)MAC State
(210)Set Fast Ch 6
(270)MAC State
(270)MAC State
(1110)MAC State
(1110)Join on 6 Bss 00:1e:e5:7f:28:25 Rssi -62
(1110)MAC State
(1110)MAC State
(1110)MAC State
(1110)MAC State
(1110)MAC State
(1110)MAC State
(1120)!@#$ Rate DN (12.0 Mbps) !@#$
(1120)Assoc Success.

(1130)Tsf join
(1240)Tsf join Done
(2860)(M2M)Enable Logs 1
(3870)(M2M)Enable Logs 1
(80070)!@#$ Rate UP (18.0 Mbps) !@#$

 
Here in log it says that
(642460)(MEM ERR) NULL Buffer
(642470)Disc from AP
 
What does it really mean? Please guide.
 
Regards,
dalohar
#5
dalohar
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2013/05/16 20:31:32
  • Location: 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/16 02:54:42 (permalink)
0
Someone please help!!! Got stuck at this point.
Thanks in advance
#6
Chris A
Super Member
  • Total Posts : 782
  • Reward points : 0
  • Joined: 2010/07/20 04:37:07
  • Location: 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/16 08:58:25 (permalink)
0
(642460)SERR(E3)
(642460)SERR(E3)
(642460)(mem_alloc) Pattern
(642460)(MEM ERR) NULL Buffer
Not used a ATWINC1500 but it looks like the lines start with a time, so the first two line above are to do with the issue as well!  Search for that error.
 
#7
RISC
Super Member
  • Total Posts : 5105
  • Reward points : 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/16 16:27:12 (permalink)
0
Hi,
You should use a more recent versions of XC32 with Harmony v2.05 (XC32 is currently v2.05).
You should also update your WINC1500 module to latest FW (19.5.2) read the release notes.
Regards
#8
dalohar
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2013/05/16 20:31:32
  • Location: 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/17 23:30:44 (permalink)
0
 
Hi Chris,
 
Thanks for your reply.
I tried to search for that error but unfortunately not able to get any clue.
However I will still continue my efforts on the same.
 
Regards,
dalohar
#9
dalohar
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2013/05/16 20:31:32
  • Location: 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/17 23:37:18 (permalink)
0
 
RISC
Hi,
You should use a more recent versions of XC32 with Harmony v2.05 (XC32 is currently v2.05).
You should also update your WINC1500 module to latest FW (19.5.2) read the release notes.
Regards




Hi RISC,
 
Thanks for your reply :)
Currently I do not have 19.5.2 firmware version so I am preparing for the same.
Once I get through it will back to you.
Also can you please help me on suggesting any reference guide which can explain about the terms used in ATWINC1500 serial log e.g.
(642460)SERR(E3)
(642460)SERR(E3)
(642460)(mem_alloc) Pattern <00>
(642460)(MEM ERR) NULL Buffer
 
As I am not able to get any for the same.
 
Regards,
dalohar
#10
aschen0866
Super Member
  • Total Posts : 4278
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/18 07:28:35 (permalink)
0
The debug log is for Microchip/Atmel internal development use. However, if you create a tech support ticket, and send them the log capture, they can help you from their end.  
 
What else are you doing besides connecting to an open WiFi AP? You didn't say much.
#11
dalohar
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2013/05/16 20:31:32
  • Location: 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/19 05:39:19 (permalink)
0
aschen0866
The debug log is for Microchip/Atmel internal development use. However, if you create a tech support ticket, and send them the log capture, they can help you from their end.  
 
What else are you doing besides connecting to an open WiFi AP? You didn't say much.




Hi,
Besides of connecting to an Wi-Fi AP, I am sending data to server using TCP Client App.
Which sends data received on UART to Server. At first it works but later after sometime TCPIP_TCP_CLIENT_Open() fails as it return INVALID_SOCKET and then either it remains in that state or gets disconnected.
 
Here please note that I have done some modifications in TCP_CLIENT_APP to make it suitable to my requirements.
Is there any chance that TCPIP_TCP_CLIENT App causing for disconnections? Can you please suggest me TCP Client Application apart from Microchip Harmony Stack example applications so that it may help me to check whether it needs some corrections or not.
 
Please help me, badly stuck in this issue!!!
 
Regards,
dalohar
 
 
#12
RISC
Super Member
  • Total Posts : 5105
  • Reward points : 0
  • Status: offline
Re: PIC32MZ + ATWINC1500: Wi-Fi Disconnect event occurring frequently 2018/05/19 14:19:09 (permalink)
0
Hi,
It seems in the meantime latest WINC1500 firmware is 19.5.4
Which Harmony project do you use ?
There are 2 types of projects for WINC1500 and Harmony : 
* projects which use the WINC1500 onboard TCP/IP stack (Harmony TCPIP stack is not used)
* projects which use the WINC1500 in "bypass" mode (Harmony TCPIP stack is used)
Regards
 
#13
Jump to:
© 2018 APG vNext Commercial Version 4.5