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: Socket/TCPSocketConnection.cpp
- Revision:
- 27:dcc4f34448f0
- Parent:
- 26:f2e1030964e4
- Child:
- 29:6a0ba999597d
--- a/Socket/TCPSocketConnection.cpp Fri Mar 28 03:03:40 2014 +0000
+++ b/Socket/TCPSocketConnection.cpp Mon Mar 31 02:06:14 2014 +0000
@@ -40,7 +40,7 @@
{
}
-int TCPSocketConnection::connect( unsigned int ip_addr, unsigned short port)
+int TCPSocketConnection::connect( const char *ip_addr_p, unsigned short port)
{
int ret;
C_SNIC_Core *snic_core_p = C_SNIC_Core::getInstance();
@@ -62,6 +62,10 @@
return -1;
}
+ // IP address convert to number from strings.
+ unsigned int ip_addr = addrToInteger(ip_addr_p);
+ printf("connect to [%s](%08x)\r\n", ip_addr_p, ip_addr);
+
C_SNIC_Core::tagSNIC_TCP_CONNECT_TO_SERVER_REQ_T req;
// Make request
req.cmd_sid = UART_CMD_SID_SNIC_TCP_CONNECT_TO_SERVER_REQ;
muRata

Murata TypeYD