for EthernetInterface library compatibility.\\ ** Unoffical fix. may be a problem. **

Dependents:   SNIC-httpclient-example SNIC-ntpclient-example

Fork of SNICInterface by muRata

Files at this revision

API Documentation at this revision

Comitter:
kishino
Date:
Tue Jun 24 06:24:23 2014 +0000
Parent:
36:f33fcf5975ab
Child:
38:f13e4e563d65
Commit message:
Fixed bugs that was found in the API test.

Changed in this revision

SNIC/SNIC_Core.cpp Show annotated file Show diff for this revision Revisions of this file
SNIC_WifiInterface.cpp Show annotated file Show diff for this revision Revisions of this file
Socket/TCPSocketConnection.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/SNIC/SNIC_Core.cpp	Thu Jun 19 10:15:47 2014 +0000
+++ b/SNIC/SNIC_Core.cpp	Tue Jun 24 06:24:23 2014 +0000
@@ -77,9 +77,9 @@
     DigitalOut reset_pin( reset );
 
     reset_pin = 0;
-    wait(0.2);
+    wait(0.1);
     reset_pin = 1;
-    wait(0.2);
+    wait(0.1);
     
     return 0;
 }
@@ -110,7 +110,6 @@
                                             , unsigned char *req_buf_p,    unsigned int req_buf_len
                                             , unsigned char *response_buf_p, unsigned char *command_p )
 {
-    unsigned short payload_len;
     unsigned int   command_len = 0;
     
     // Make all command request
--- a/SNIC_WifiInterface.cpp	Thu Jun 19 10:15:47 2014 +0000
+++ b/SNIC_WifiInterface.cpp	Tue Jun 24 06:24:23 2014 +0000
@@ -35,13 +35,13 @@
     C_SNIC_Core               *snic_core_p  = C_SNIC_Core::getInstance();
     C_SNIC_UartCommandManager *uartCmdMgr_p = snic_core_p->getUartCommand();
     
+    /* Initialize UART */
+    snic_core_p->initUart( mUART_tx, mUART_rx, mUART_baud );
+
     /* Module reset */
     snic_core_p->resetModule( mModuleReset );
     
-    /* Initialize UART */
-    snic_core_p->initUart( mUART_tx, mUART_rx, mUART_baud );
-
-    wait(0.5);
+    wait(1);
     /* Initialize SNIC API */
     // Get buffer for response payload from MemoryPool
     tagMEMPOOL_BLOCK_T *payload_buf = snic_core_p->allocCmdBuf();
@@ -210,7 +210,6 @@
         snic_core_p->freeCmdBuf( payload_buf );
         return -1;
     }
-    printf("join OK\r\n");
     
     if( (uartCmdMgr_p->getCommandStatus() != 0) && 
         (uartCmdMgr_p->getCommandStatus() != UART_CMD_RES_WIFI_ERR_ALREADY_JOINED) )
@@ -553,7 +552,7 @@
     } 
 
     // set SSID
-    if( ( status_p->status == e_STA_JOINED ) == ( status_p->status == e_AP_STARTED ) )
+    if( ( status_p->status == e_STA_JOINED ) || ( status_p->status == e_AP_STARTED ) )
     {
         memcpy( status_p->ssid, &payload_buf->buf[9], strlen( (char *)&payload_buf->buf[9]) );
     } 
--- a/Socket/TCPSocketConnection.cpp	Thu Jun 19 10:15:47 2014 +0000
+++ b/Socket/TCPSocketConnection.cpp	Tue Jun 24 06:24:23 2014 +0000
@@ -51,7 +51,6 @@
         printf("createSocket error : %d\r\n", ret);
         return -1;
     }
-    printf("socket created : %d\r\n", mSocketID);
 
     int ip_addr = resolveHostName( host_p );
     //lcd_printf("connect to [%s](%08x)\r\n", host_p, ip_addr);