Extending the X_NUCLEO_IDW01M1 to allow configuration of the board as an access point

Dependents:   X_NUCLEO_IDW01M1_AP_Test

Fork of X_NUCLEO_IDW01M1 by ST

Revision:
7:0fdd186a7d90
Parent:
5:c83ffd44f40a
Child:
8:0f302a13e21b
diff -r e7a3fca2df10 -r 0fdd186a7d90 Spwf/wifi_module.c
--- a/Spwf/wifi_module.c	Mon May 09 10:38:22 2016 +0000
+++ b/Spwf/wifi_module.c	Wed May 11 06:12:16 2016 +0000
@@ -1332,11 +1332,19 @@
                {
                   if(status_flag.enable_sock_read && status_flag.Q_Contains_Message && !status_flag.message_pending)
                   {
-                      printf((const char*)&process_buffer[0]);
-                      status_flag.Q_Contains_Message = WIFI_FALSE;
-                      status_flag.Q_Contains_Data = WIFI_TRUE;
-                      //status_flag.enable_sock_read = WIFI_FALSE;
-                      //status_flag.stop_event_dequeue= WIFI_FALSE;
+                       //printf((const char*)&process_buffer[0]);
+                      status_flag.Q_Contains_Message = WIFI_FALSE;                      
+                      message_size = SockON_Data_Length;//Total size
+                      chunk_size = Fillptr;
+                      memcpy(UserDataBuff, process_buffer, Fillptr);
+                      Fillptr = 0;
+                      SockON_Data_Length = SockON_Data_Length - Fillptr;
+                      process_buffer_index = 5;
+                      pop_queue_length = 0;
+                      Stop_Dequeue();
+                      memset(process_buffer, 0x00, Fillptr); 
+                      status_flag.Pending_SockON_Callback = WIFI_TRUE;      //set this to callback to user with User Buffer pointer
+
                   }
 
                   //if in data mode, reset on \r\n
@@ -1375,7 +1383,7 @@
               //Check Process Buffer for any pending message
               if(status_flag.enable_receive_data_chunk)
                 {
-                    if(!status_flag.Q_Contains_Data && pop_buffer_size)
+                    if(pop_buffer_size)
                     {
                       pop_queue_length = pop_buffer_size;
                       if(Fillptr + pop_queue_length > 511)
@@ -1404,7 +1412,7 @@
                       {
                           if(process_buffer[0]!='\0') 
                           {
-                            if(((process_buffer[0]==0xD) && (process_buffer[1]==0xA)) && process_buffer[2] != 0xD) 
+                            if(((process_buffer[0]==0xD) && (process_buffer[1]==0xA)) && process_buffer[2] != 0xD && SockON_Data_Length != 2) 
                             {
                               status_flag.message_pending = WIFI_TRUE;
                               if((pStr = (strstr((const char *)process_buffer+2,"\r\n"))) != NULL)