SNIC UART Interface library: Serial to Wi-Fi library for Murata TypeYD Wi-Fi module. For more information about TypeYD: http://www.murata.co.jp/products/microwave/module/lbwb1zzydz/index.html
Dependents: SNIC-xively-jumpstart-demo SNIC-FluentLogger-example TCPEchoServer murataDemo ... more
Fork of YDwifiInterface by
Diff: YDwifiInterface.cpp
- Revision:
- 7:e88ccbe0225f
- Parent:
- 6:70f522934032
--- a/YDwifiInterface.cpp Thu Mar 13 10:33:18 2014 +0000
+++ b/YDwifiInterface.cpp Fri Mar 14 08:48:12 2014 +0000
@@ -267,13 +267,11 @@
strcpy( (char *)req.ssid, ssid_p );
buf_len += strlen(ssid_p);
}
- else
- {
- buf_len++;
- }
-
+ buf_len++;
+
// Make command payload
payload_len = C_YD_UartMsg::makePayload( buf_len, (unsigned char *)&req, payload_array );
+
// Make all command request
command_len = C_YD_UartMsg::makeRequest( UART_CMD_ID_WIFI, payload_array, payload_len, command_array );
@@ -286,7 +284,7 @@
// Send uart command request
sendUart( command_len, command_array );
-
+
// Wait UART response
ret = mUartCommand.wait();
printf( "scan wait:%d\r\n", ret );
@@ -302,6 +300,7 @@
printf("scan status:%02x\r\n", mUartCommand.getCommandStatus());
ret = -1;
}
+
gMEMPOOL_PAYLOAD.free( payload_buf );
return ret;
muRata

Murata TypeYD