ESP8266 Developer Zone The Official ESP8266 Forum 2017-10-30T21:10:10+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=7090 2017-10-30T21:10:10+08:00 2017-10-30T21:10:10+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7090&p=17700#p17700 <![CDATA[Re: Can't communicate two devices and ESP8266 in APMODE over UDP broadcast RTOS v1.5]]>

Code:

../Makefile:136: warning: overriding recipe for target 'clean'
Makefile:95: warning: ignoring old recipe for target 'clean'
You cloned without --recursive, fetching submodules for you.
git submodule update --init --recursive
make -C crosstool-NG -f ../Makefile _ct-ng
make[1]: *** crosstool-NG: No such file or directory. Stop.
../Makefile:122: recipe for target 'crosstool-NG/ct-ng' failed
make: *** [crosstool-NG/ct-ng] Error 2


I editted code because it was in spanish. This is English Version of output when i try to make the example.

I don't know what is happening, could you help me?

Statistics: Posted by domecar — Mon Oct 30, 2017 9:10 pm


]]>
2017-10-29T05:49:26+08:00 2017-10-29T05:49:26+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7090&p=16992#p16992 <![CDATA[Re: Can't communicate two devices and ESP8266 in APMODE over UDP broadcast RTOS v1.5]]>
I'll wait for it!

regards!

Statistics: Posted by domecar — Sun Oct 29, 2017 5:49 am


]]>
2017-10-27T13:37:24+08:00 2017-10-27T13:37:24+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7090&p=16760#p16760 <![CDATA[Re: Can't communicate two devices and ESP8266 in APMODE over UDP broadcast RTOS v1.5]]>
Sorry that this feature has not released on ESP8266 RTOS SDK, it is only on the non OS SDK now.

We will add it in the future release.

So sorry for the inconvenience.

Statistics: Posted by ESP_Faye — Fri Oct 27, 2017 1:37 pm


]]>
2017-10-27T10:25:29+08:00 2017-10-27T10:25:29+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7090&p=16758#p16758 <![CDATA[Re: Can't communicate two devices and ESP8266 in APMODE over UDP broadcast RTOS v1.5]]>

Statistics: Posted by domecar — Fri Oct 27, 2017 10:25 am


]]>
2017-10-27T09:57:19+08:00 2017-10-27T09:57:19+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7090&p=16757#p16757 <![CDATA[Re: Can't communicate two devices and ESP8266 in APMODE over UDP broadcast RTOS v1.5]]> Statistics: Posted by Her Mary — Fri Oct 27, 2017 9:57 am


]]>
2017-10-27T10:23:36+08:00 2017-10-27T08:55:29+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7090&p=16755#p16755 <![CDATA[Can't communicate two devices and ESP8266 in APMODE over UDP broadcast RTOS v1.5]]>
this is my code, for RTOS (I edit it because is long) Cellphone 1 is in port 3331 and cellphone 2 is in port 3332. if i send broadcast data from Cell 1 to 2 it never come. but if i send to ESP AP at port 3330, data arrives perfectly to ESP. I cant comunicate between clients.

What could be the error?

Thanks!!!

Code:

#include "esp_common.h"
#include "user_config.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/timers.h"
#include "freertos/queue.h"

#include "espconn.h"

#define WIFI_APSSID   "ESP8266"
#define WIFI_APPASSWORD   "0123456789"

/*Definicion de datos de Sockets*/
#define SOCKET_PORT_IN    3330
#define SOCKET_PORT_OUT 6666

static struct espconn ptrespconn;

LOCAL void user_udp_recv(void *arg, char *rdata, unsigned short length)
{
   //Do nothing for now...
}


void UDP_init(void)
{
    ptrespconn.type = ESPCONN_UDP;
    ptrespconn.proto.udp = (esp_udp *)os_zalloc(sizeof(esp_udp));
    ptrespconn.proto.udp->local_port = SOCKET_PORT_IN; 
    espconn_regist_recvcb(&ptrespconn, user_udp_recv);
    espconn_create(&ptrespconn);   
}

void SetAP()
{
   static struct softap_config apconf;

   wifi_set_opmode(SOFTAP_MODE);

   wifi_softap_get_config(&apconf);

   memset(apconf.ssid, 0, 32);
   memset(apconf.password, 0, 64);
   memcpy(apconf.ssid,WIFI_APSSID, sizeof(WIFI_APSSID));
   memcpy(apconf.password, WIFI_APPASSWORD, sizeof(WIFI_APPASSWORD));

   apconf.authmode = AUTH_WPA_WPA2_PSK;
   apconf.max_connection = 8;
   apconf.ssid_hidden = 0;
   apconf.ssid_len = strlen(WIFI_APSSID);
   apconf.channel = 1;
   apconf.beacon_interval = 100;

   wifi_softap_set_config(&apconf);
}

uint32 user_rf_cal_sector_set(void)
{
    flash_size_map size_map = system_get_flash_size_map();
    uint32 rf_cal_sec = 4;

    switch (size_map) {
        case FLASH_SIZE_4M_MAP_256_256:
            rf_cal_sec = 128 - 5;
            break;

        case FLASH_SIZE_8M_MAP_512_512:
            rf_cal_sec = 256 - 5;
            break;

        case FLASH_SIZE_16M_MAP_512_512:
        case FLASH_SIZE_16M_MAP_1024_1024:
            rf_cal_sec = 512 - 5;
            break;

        case FLASH_SIZE_32M_MAP_512_512:
        case FLASH_SIZE_32M_MAP_1024_1024:
            rf_cal_sec = 1024 - 5;
            break;
        case FLASH_SIZE_64M_MAP_1024_1024:
            rf_cal_sec = 2048 - 5;
            break;
        case FLASH_SIZE_128M_MAP_1024_1024:
            rf_cal_sec = 4096 - 5;
            break;
        default:
            rf_cal_sec = 0;
            break;
    }

    return rf_cal_sec;
}
/******************************************************************************
 * FunctionName : user_init
 * Description  : entry of user application, init user function here
 * Parameters   : none
 * Returns      : none
*******************************************************************************/
void user_init(void)
{
    uart_div_modify(0, UART_CLK_FREQ / 115200);
   os_delay_us(500);

   os_printf("SDK version : %s\n", system_get_sdk_version());
   SetAP();
   espconn_init(); //ESPCONN INIT
   UDP_init();
}

Statistics: Posted by domecar — Fri Oct 27, 2017 8:55 am


]]>