Statistics: Posted by geo.espressif — Thu Sep 24, 2015 11:38 pm
Statistics: Posted by geo.espressif — Thu Sep 24, 2015 11:13 pm
Statistics: Posted by kolban — Thu Sep 24, 2015 9:10 pm
Code:
wifi_set_opmode_current( STATIONAP_MODE );
Code:
case EVENT_STAMODE_GOT_IP
Code:
os_memset( &connector, 0, sizeof(connector));
connector.type = ESPCONN_TCP;
connector.state = ESPCONN_NONE;
connector.proto.tcp = &tcp_con;
os_memset( &tcp_con, 0, sizeof(tcp_con));
tcp_con.local_port = espconn_port();
tcp_con.remote_port = tcp_port;
os_memcpy ( tcp_con.remote_ip, serverIp, 4 );
espconn_regist_connectcb( &connector, tcpConnected );
espconn_regist_disconcb( &connector, tcpDisconnected );
if ( err = espconn_connect ( &connector ) != 0 )
{
os_printf ( "Error connecting: %d", err );
}
Statistics: Posted by geo.espressif — Thu Sep 24, 2015 5:18 pm