Chat freely about anything...
User avatar
#55011 Hi,

i currently have problems to connect to my server via tcp. The connection to my local wifi network works fine, but this doesn't work:

Code: Select allLOCAL void ICACHE_FLASH_ATTR
   struct espconn conn;
   struct ip_info ipconf;
   uint32_t ipAddr = ipaddr_addr("");
   uint32 localPort = espconn_port();
   bool res = wifi_get_ip_info(STATION_IF, &ipconf);
      os_printf("No Success.");
      if(wifi_station_get_connect_status() == STATION_GOT_IP && ipconf.ip.addr != 0){
         os_printf("Got IP Address.\n");
         conn.type = ESPCONN_TCP;
         conn.state = ESPCONN_NONE;
         conn.proto.tcp = (esp_tcp*)os_zalloc(sizeof(esp_tcp));
         conn.proto.tcp->local_port = espconn_port();
         conn.proto.tcp->remote_port = 80;


      } else {
         os_timer_arm(&timer,100,0); //recall function after 100ms, don't repeat

This is the error i get on the serial terminal:

Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x4026023f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000011, depc=0x00000000

Any help is very much appreciated! :)