Wpasupplicant disconnects because of inactivity (reason = 4):
#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
This can be a number of things, including a kernel issue. Do you have access to the wireless access point? Can you control it, or can you see what happens on its side, in the logs, when you get disconnected?
Wpasupplicant disconnects because of inactivity (reason = 4):
#define WLAN_REASON_ DISASSOC_ DUE_TO_ INACTIVITY 4
This can be a number of things, including a kernel issue. Do you have access to the wireless access point? Can you control it, or can you see what happens on its side, in the logs, when you get disconnected?