ESP8266 Developer Zone The Official ESP8266 Forum 2016-12-06T10:22:39+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=2824 2016-12-06T10:22:39+08:00 2016-12-06T10:22:39+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=10809#p10809 <![CDATA[Re: Can't connect to ap from devices]]>
ESP_Alen wrote:
josejarpaparra wrote:Good Night.
I'm new with ESP8266....... I changed the user_config.h file ( MESH_ROUTER_BSSID, MESH_ROUTER_SSID and MESH_ROUTER_PASSWD). Then I compiled the demo (mesh_demo first and after mesh_perfomance) with success. I Downloaded the firmware in two devices and I get the same output of traderlopez.
I went throught the entire thread without understand the solution ......it seems to be like my devices can't see my Router. Can Clarify, please?

Thanks in advance.

JJARPA.


mesh_demo/include/user_config.h or mesh_performance/include/user_config.h ?

Which one you modify ?


Hi,
If you build mesh_demo, please modify mesh_demo/include/user_config.h
If you build mesh_performance, please modify mesh_performance/include/user_config.h

Statistics: Posted by Guest — Tue Dec 06, 2016 10:22 am


]]>
2016-10-08T13:57:27+08:00 2016-10-08T13:57:27+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=10079#p10079 <![CDATA[Re: Can't connect to ap from devices]]>
josejarpaparra wrote:
Good Night.
I'm new with ESP8266....... I changed the user_config.h file ( MESH_ROUTER_BSSID, MESH_ROUTER_SSID and MESH_ROUTER_PASSWD). Then I compiled the demo (mesh_demo first and after mesh_perfomance) with success. I Downloaded the firmware in two devices and I get the same output of traderlopez.
I went throught the entire thread without understand the solution ......it seems to be like my devices can't see my Router. Can Clarify, please?

Thanks in advance.

JJARPA.


mesh_demo/include/user_config.h or mesh_performance/include/user_config.h ?

Which one you modify ?

Statistics: Posted by Guest — Sat Oct 08, 2016 1:57 pm


]]>
2016-10-06T09:37:11+08:00 2016-10-06T09:37:11+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=10062#p10062 <![CDATA[Re: Can't connect to ap from devices]]> I'm new with ESP8266....... I changed the user_config.h file ( MESH_ROUTER_BSSID, MESH_ROUTER_SSID and MESH_ROUTER_PASSWD). Then I compiled the demo (mesh_demo first and after mesh_perfomance) with success. I Downloaded the firmware in two devices and I get the same output of traderlopez.
I went throught the entire thread without understand the solution ......it seems to be like my devices can't see my Router. Can Clarify, please?

Thanks in advance.

JJARPA.

Statistics: Posted by josejarpaparra — Thu Oct 06, 2016 9:37 am


]]>
2016-09-29T22:17:25+08:00 2016-09-29T22:17:25+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9991#p9991 <![CDATA[Re: Can't connect to ap from devices]]>
BeniBoy wrote:
Hi,
I had the exact same problem on ESP-12. Thanks a lot the solution works.
To keep the esp-touch functionnality, wouldn't a solution be having the esp-touch test after the initialisation of the SSID and Password?

Like this

Code:

static bool ICACHE_FLASH_ATTR router_init()
{
    struct station_config config;

    MESH_DEMO_MEMSET(&config, 0, sizeof(config));
        /*
         * please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
         */
    MESH_DEMO_MEMSET(&config, 0, sizeof(config));
    MESH_DEMO_MEMCPY(config.ssid, MESH_ROUTER_SSID, MESH_DEMO_STRLEN(MESH_ROUTER_SSID));
    MESH_DEMO_MEMCPY(config.password, MESH_ROUTER_PASSWD, MESH_DEMO_STRLEN(MESH_ROUTER_PASSWD));
        /*
         * if you use router with hide ssid, you MUST set bssid in config,
         * otherwise, node will fail to connect router.
         *
         * if you use normal router, please pay no attention to the bssid,
         * and you don't need to modify the bssid, mesh will ignore the bssid.
         */
    config.bssid_set = 1;
    MESH_DEMO_MEMCPY(config.bssid, MESH_ROUTER_BSSID, sizeof(config.bssid));


    if (!espconn_mesh_is_root_candidate())
        goto INIT_SMARTCONFIG;

    if (!espconn_mesh_set_router(&config)) {
        MESH_DEMO_PRINT("set_router fail\n");
        return false;
    }

INIT_SMARTCONFIG:
    /*
     * use esp-touch(smart configure) to sent information about router AP to mesh node
     */
    esptouch_init();

    MESH_DEMO_PRINT("flush ssid:%s pwd:%s\n", config.ssid, config.password);

    return true;
}



Thanks very much for your sample code.

Statistics: Posted by Guest — Thu Sep 29, 2016 10:17 pm


]]>
2016-09-29T22:16:41+08:00 2016-09-29T22:16:41+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9990#p9990 <![CDATA[Re: Can't connect to ap from devices]]>
traderlopez wrote:
That is what I did, I was entering the forum to try to mark the topic as solved when I saw your last post. Thanks very much.


Welcome

Statistics: Posted by Guest — Thu Sep 29, 2016 10:16 pm


]]>
2016-09-29T21:54:51+08:00 2016-09-29T21:54:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9989#p9989 <![CDATA[Re: Can't connect to ap from devices]]> I had the exact same problem on ESP-12. Thanks a lot the solution works.
To keep the esp-touch functionnality, wouldn't a solution be having the esp-touch test after the initialisation of the SSID and Password?

Like this

Code:

static bool ICACHE_FLASH_ATTR router_init()
{
    struct station_config config;

    MESH_DEMO_MEMSET(&config, 0, sizeof(config));
        /*
         * please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
         */
    MESH_DEMO_MEMSET(&config, 0, sizeof(config));
    MESH_DEMO_MEMCPY(config.ssid, MESH_ROUTER_SSID, MESH_DEMO_STRLEN(MESH_ROUTER_SSID));
    MESH_DEMO_MEMCPY(config.password, MESH_ROUTER_PASSWD, MESH_DEMO_STRLEN(MESH_ROUTER_PASSWD));
        /*
         * if you use router with hide ssid, you MUST set bssid in config,
         * otherwise, node will fail to connect router.
         *
         * if you use normal router, please pay no attention to the bssid,
         * and you don't need to modify the bssid, mesh will ignore the bssid.
         */
    config.bssid_set = 1;
    MESH_DEMO_MEMCPY(config.bssid, MESH_ROUTER_BSSID, sizeof(config.bssid));


    if (!espconn_mesh_is_root_candidate())
        goto INIT_SMARTCONFIG;

    if (!espconn_mesh_set_router(&config)) {
        MESH_DEMO_PRINT("set_router fail\n");
        return false;
    }

INIT_SMARTCONFIG:
    /*
     * use esp-touch(smart configure) to sent information about router AP to mesh node
     */
    esptouch_init();

    MESH_DEMO_PRINT("flush ssid:%s pwd:%s\n", config.ssid, config.password);

    return true;
}

Statistics: Posted by BeniBoy — Thu Sep 29, 2016 9:54 pm


]]>
2016-09-29T21:46:36+08:00 2016-09-29T21:46:36+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9988#p9988 <![CDATA[Re: Can't connect to ap from devices]]> Statistics: Posted by traderlopez — Thu Sep 29, 2016 9:46 pm


]]>
2016-09-29T21:02:41+08:00 2016-09-29T21:02:41+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9985#p9985 <![CDATA[Re: Can't connect to ap from devices]]>
(pay attention to statement with red color)

static bool ICACHE_FLASH_ATTR router_init()
{
struct station_config config;

//if (!espconn_mesh_is_root_candidate())
// goto INIT_SMARTCONFIG;


MESH_DEMO_MEMSET(&config, 0, sizeof(config));
//espconn_mesh_get_router(&config);
//if (config.ssid[0] == 0xff ||
//config.ssid[0] == 0x00) {

/*
* please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
*/
MESH_DEMO_MEMSET(&config, 0, sizeof(config));
MESH_DEMO_MEMCPY(config.ssid, MESH_ROUTER_SSID, MESH_DEMO_STRLEN(MESH_ROUTER_SSID));
MESH_DEMO_MEMCPY(config.password, MESH_ROUTER_PASSWD, MESH_DEMO_STRLEN(MESH_ROUTER_PASSWD));
/*
* if you use router with hide ssid, you MUST set bssid in config,
* otherwise, node will fail to connect router.
*
* if you use normal router, please pay no attention to the bssid,
* and you don't need to modify the bssid, mesh will ignore the bssid.
*/
config.bssid_set = 1;
MESH_DEMO_MEMCPY(config.bssid, MESH_ROUTER_BSSID, sizeof(config.bssid));
//}

/*
* use espconn_mesh_set_router to set router for mesh node
*/
if (!espconn_mesh_set_router(&config)) {
MESH_DEMO_PRINT("set_router fail\n");
return false;
}

INIT_SMARTCONFIG:
/*
* use esp-touch(smart configure) to sent information about router AP to mesh node
*/
esptouch_init();

MESH_DEMO_PRINT("flush ssid:%s pwd:%s\n", config.ssid, config.password);

return true;
}

Statistics: Posted by Guest — Thu Sep 29, 2016 9:02 pm


]]>
2016-09-29T18:01:51+08:00 2016-09-29T18:01:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9983#p9983 <![CDATA[Re: Can't connect to ap from devices]]>
Please tell me another way to get the new router information programmed into the flash. Currently I use user_config.h.

Thanks very much in advance.

Statistics: Posted by traderlopez — Thu Sep 29, 2016 6:01 pm


]]>
2016-09-29T17:48:02+08:00 2016-09-29T17:48:02+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9981#p9981 <![CDATA[Re: Can't connect to ap from devices]]>
traderlopez wrote:
Finally I got the router up again and running.

I tried to connect the mesh devices and it happens the same.

It wasn't the raspberry pi routing thing, it has something else.

The server is connected, although I think this doesn't make any difference.


This time the user_config.h is:

static const uint16_t server_port = 7000; /*PORT USED BY USER IOT SERVER FOR MESH SERVICE*/
static const uint8_t server_ip[4] = {192, 168, 0, 100}; /*USER IOT SERVER IP ADDRESS*/
static const uint32_t UART_BAUT_RATIO = 115200; /*UART BAUT RATIO*/
static const uint8_t MESH_GROUP_ID[6] = {0x18,0xfe,0x34,0x00,0x00,0x50}; /*MESH_GROUP_ID & MESH_SSID_PREFIX REPRESENTS ONE MESH NETWORK*/

static const uint8_t MESH_ROUTER_BSSID[6] = {0x00, 0x80, 0x5A, 0x5B, 0x1B, 0xAD};
/*MAC OF ROUTER*/
//static const uint8_t MESH_ROUTER_BSSID[6] = {0x00, 0x0B, 0x81, 0x88, 0x63, 0x83}; PI - no va

/*
* please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
*/
#define MESH_ROUTER_SSID "NETDEA" /*THE ROUTER SSID*/
#define MESH_ROUTER_PASSWD "rinocero"/*THE ROUTER PASSWORD*/
#define MESH_SSID_PREFIX "DEMOMESA" /*SET THE DEFAULT MESH SSID PREFIX;THE FINAL SSID OF SOFTAP WOULD BE "MESH_SSID_PREFIX_X_YYYYYY"*/
#define MESH_AUTH AUTH_WPA2_PSK /*AUTH_MODE OF SOFTAP FOR EACH MESH NODE*/
#define MESH_PASSWD "amiantos" /*SET PASSWORD OF SOFTAP FOR EACH MESH NODE*/
#define MESH_MAX_HOP (4) /*MAX_HOPS OF MESH NETWORK*/



And a random device log:

{lESP-TOUCH FLOW INIT...
ESP-TOUCH SET STATION MODE ...
SC version: V2.5.4
flush ssid: pwd:@úÿ?@úÿ?
mesh version: v1.3.2
mode : sta(5c:cf:7f:c1:0b:64)
add if0
scandone
err,scan status 1
scandone
err,scan status 4
ESP-TOUCH TIMEOUT
mode : sta(5c:cf:7f:c1:0b:64) + softAP(5e:cf:7f:c1:0b:64)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone


If you want to switch router, please use eep-touch to push new AP to device.

Statistics: Posted by Guest — Thu Sep 29, 2016 5:48 pm


]]>
2016-09-29T17:37:28+08:00 2016-09-29T17:37:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9980#p9980 <![CDATA[Re: Can't connect to ap from devices]]>
traderlopez wrote:
It seems that the problem is related to ESP-TOUCH, which I don't use

;lESP-TOUCH FLOW INIT...
ESP-TOUCH SET STATION MODE ...
SC version: V2.5.4
flush ssid: pwd:@úÿ?@úÿ?
mesh version: v1.3.2
mode : sta(5c:cf:7f:c1:07:d5)
add if0
scandone
err,scan status 1
scandone
err,scan status 4
ESP-TOUCH TIMEOUT

Those ssid and pwd can't be known as there is no ESP-TOUCH enabled mobile phones in range.

Can I get rid of ESP-TOUCH in the Mesh?


Yes, if you don't need eep-touch, please disable esp-touch.

Statistics: Posted by Guest — Thu Sep 29, 2016 5:37 pm


]]>
2016-09-29T17:17:49+08:00 2016-09-29T17:17:49+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9977#p9977 <![CDATA[Re: Can't connect to ap from devices]]>
I tried to connect the mesh devices and it happens the same.

It wasn't the raspberry pi routing thing, it has something else.

The server is connected, although I think this doesn't make any difference.


This time the user_config.h is:

static const uint16_t server_port = 7000; /*PORT USED BY USER IOT SERVER FOR MESH SERVICE*/
static const uint8_t server_ip[4] = {192, 168, 0, 100}; /*USER IOT SERVER IP ADDRESS*/
static const uint32_t UART_BAUT_RATIO = 115200; /*UART BAUT RATIO*/
static const uint8_t MESH_GROUP_ID[6] = {0x18,0xfe,0x34,0x00,0x00,0x50}; /*MESH_GROUP_ID & MESH_SSID_PREFIX REPRESENTS ONE MESH NETWORK*/

static const uint8_t MESH_ROUTER_BSSID[6] = {0x00, 0x80, 0x5A, 0x5B, 0x1B, 0xAD};
/*MAC OF ROUTER*/
//static const uint8_t MESH_ROUTER_BSSID[6] = {0x00, 0x0B, 0x81, 0x88, 0x63, 0x83}; PI - no va

/*
* please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
*/
#define MESH_ROUTER_SSID "NETDEA" /*THE ROUTER SSID*/
#define MESH_ROUTER_PASSWD "rinocero"/*THE ROUTER PASSWORD*/
#define MESH_SSID_PREFIX "DEMOMESA" /*SET THE DEFAULT MESH SSID PREFIX;THE FINAL SSID OF SOFTAP WOULD BE "MESH_SSID_PREFIX_X_YYYYYY"*/
#define MESH_AUTH AUTH_WPA2_PSK /*AUTH_MODE OF SOFTAP FOR EACH MESH NODE*/
#define MESH_PASSWD "amiantos" /*SET PASSWORD OF SOFTAP FOR EACH MESH NODE*/
#define MESH_MAX_HOP (4) /*MAX_HOPS OF MESH NETWORK*/



And a random device log:

{lESP-TOUCH FLOW INIT...
ESP-TOUCH SET STATION MODE ...
SC version: V2.5.4
flush ssid: pwd:@úÿ?@úÿ?
mesh version: v1.3.2
mode : sta(5c:cf:7f:c1:0b:64)
add if0
scandone
err,scan status 1
scandone
err,scan status 4
ESP-TOUCH TIMEOUT
mode : sta(5c:cf:7f:c1:0b:64) + softAP(5e:cf:7f:c1:0b:64)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone

Statistics: Posted by traderlopez — Thu Sep 29, 2016 5:17 pm


]]>
2016-09-29T16:47:22+08:00 2016-09-29T16:47:22+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9976#p9976 <![CDATA[Re: Can't connect to ap from devices]]>
If you've set a mobile device for ESP-TOUCH, you forgot to change SSID and PASSWORD to useful values, in the code, so you are seeing the default values.

The values I am being informed are not real, they are rubbish from memory, as they haven't been initialized before they appear logged in the serial port

Thanks very much.

Statistics: Posted by traderlopez — Thu Sep 29, 2016 4:47 pm


]]>
2016-09-29T15:46:28+08:00 2016-09-29T15:46:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9975#p9975 <![CDATA[Re: Can't connect to ap from devices]]>

flush ssid: pwd:@úÿ?@úÿ?
. In my case it looks: flush ssid:SSID_NAME pwd:PASSWORD. In you case it looks like you don't have any ssid and your password is "strange". I have password in plain text.

Statistics: Posted by trojek — Thu Sep 29, 2016 3:46 pm


]]>
2016-09-29T15:17:46+08:00 2016-09-29T15:17:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9974#p9974 <![CDATA[Re: Can't connect to ap from devices]]>
;lESP-TOUCH FLOW INIT...
ESP-TOUCH SET STATION MODE ...
SC version: V2.5.4
flush ssid: pwd:@úÿ?@úÿ?
mesh version: v1.3.2
mode : sta(5c:cf:7f:c1:07:d5)
add if0
scandone
err,scan status 1
scandone
err,scan status 4
ESP-TOUCH TIMEOUT

Those ssid and pwd can't be known as there is no ESP-TOUCH enabled mobile phones in range.

Can I get rid of ESP-TOUCH in the Mesh?

Statistics: Posted by traderlopez — Thu Sep 29, 2016 3:17 pm


]]>
2016-09-29T14:47:42+08:00 2016-09-29T14:47:42+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9971#p9971 <![CDATA[Re: Can't connect to ap from devices]]>
I run gen_misc.sh from the mesh_demo folder. I check the timestamp of the output files being saved in the flash and the update file has the correct updated date. I don't understand how the performance scenario folder user_config.h can have some influence on the demo files I changed in the demo folder.

If it is possible, please explain me as shortly as you wish how to switch scenarios between demo and performance.

Thanks very much.

Statistics: Posted by traderlopez — Thu Sep 29, 2016 2:47 pm


]]>
2016-09-29T13:02:59+08:00 2016-09-29T13:02:59+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9969#p9969 <![CDATA[Re: Can't connect to ap from devices]]>
traderlopez wrote:
Yesterday my WAN router died.

I then set up a Raspberry PI as router. I tested it connecting to internet from my laptop through it, and also my mobile gets wifi through it, and everything seems right there.

Then I changed user_config to reflect the change on the mesh devices, and they don't connect.

They don't even try to connect to it, as I can see the connection tries live on the screen attached to the PI and it doesn't show anything when I switch on the mesh devices.

This is the serial log of a device. It always ends up in a "enable mesh fail, re-enable" and goes on scanning (on channel 0?). I don't know, but I think it should scan all channels.

;lESP-TOUCH FLOW INIT...
ESP-TOUCH SET STATION MODE ...
SC version: V2.5.4
flush ssid: pwd:@úÿ?@úÿ?
mesh version: v1.3.2
mode : sta(5c:cf:7f:c1:07:d5)
add if0
scandone
err,scan status 1
scandone
err,scan status 4
ESP-TOUCH TIMEOUT
mode : sta(5c:cf:7f:c1:07:d5) + softAP(5e:cf:7f:c1:07:d5)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone



This is another device that has the PI router in range:

;lESP-TOUCH FLOW INIT...
ESP-TOUCH SET STATION MODE ...
SC version: V2.5.4
flush ssid: pwd:@úÿ?@úÿ?
mesh version: v1.3.2
mode : sta(5c:cf:7f:c1:07:d5)
add if0
scandone
err,scan status 1
scandone
err,scan status 4
ESP-TOUCH TIMEOUT
mode : sta(5c:cf:7f:c1:07:d5) + softAP(5e:cf:7f:c1:07:d5)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone



This is user_config.h. I changed the server_ip, the MESH_ROUTER_BSSID, ROUTER_SSID and ROUTER_PASS. Also there is no server at this time at that address, but the devices don't get a wifi connection, I don't think they will ask for the server yet.


static const uint16_t server_port = 7000; /*PORT USED BY USER IOT SERVER FOR MESH SERVICE*/
static const uint8_t server_ip[4] = {192, 168, 10, 1}; /*USER IOT SERVER IP ADDRESS*/
static const uint32_t UART_BAUT_RATIO = 115200; /*UART BAUT RATIO*/
static const uint8_t MESH_GROUP_ID[6] = {0x18,0xfe,0x34,0x00,0x00,0x50}; /*MESH_GROUP_ID & MESH_SSID_PREFIX REPRESENTS ONE MESH NETWORK*/

//static const uint8_t MESH_ROUTER_BSSID[6] = {0x00, 0x80, 0x5A, 0x5B, 0x1B, 0xAD};
/*MAC OF ROUTER*/
static const uint8_t MESH_ROUTER_BSSID[6] = {0x00, 0x0B, 0x81, 0x88, 0x63, 0x83};

/*
* please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
*/
#define MESH_ROUTER_SSID "PitAP" /*THE ROUTER SSID*/
#define MESH_ROUTER_PASSWD "*8*8*8*8*8*8*8*"/*THE ROUTER PASSWORD*/
#define MESH_SSID_PREFIX "MEMO" /*SET THE DEFAULT MESH SSID PREFIX;THE FINAL SSID OF SOFTAP WOULD BE "MESH_SSID_PREFIX_X_YYYYYY"*/
#define MESH_AUTH AUTH_WPA2_PSK /*AUTH_MODE OF SOFTAP FOR EACH MESH NODE*/
#define MESH_PASSWD "3HappyLions" /*SET PASSWORD OF SOFTAP FOR EACH MESH NODE*/
#define MESH_MAX_HOP (4) /*MAX_HOPS OF MESH NETWORK*/


The router ssid is different from "PitAP", please pay attention to statement with red color.
Please use scenario of mesh_performance, and modify user_config.h in mesh_performance/include

Statistics: Posted by Guest — Thu Sep 29, 2016 1:02 pm


]]>
2016-09-29T12:55:30+08:00 2016-09-29T12:55:30+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2824&p=9967#p9967 <![CDATA[Can't connect to ap from devices]]>
I then set up a Raspberry PI as router. I tested it connecting to internet from my laptop through it, and also my mobile gets wifi through it, and everything seems right there.

Then I changed user_config to reflect the change on the mesh devices, and they don't connect.

They don't even try to connect to it, as I can see the connection tries live on the screen attached to the PI and it doesn't show anything when I switch on the mesh devices.

This is the serial log of a device. It always ends up in a "enable mesh fail, re-enable" and goes on scanning (on channel 0?). I don't know, but I think it should scan all channels.

;lESP-TOUCH FLOW INIT...
ESP-TOUCH SET STATION MODE ...
SC version: V2.5.4
flush ssid: pwd:@úÿ?@úÿ?
mesh version: v1.3.2
mode : sta(5c:cf:7f:c1:07:d5)
add if0
scandone
err,scan status 1
scandone
err,scan status 4
ESP-TOUCH TIMEOUT
mode : sta(5c:cf:7f:c1:07:d5) + softAP(5e:cf:7f:c1:07:d5)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone



This is another device that has the PI router in range:

;lESP-TOUCH FLOW INIT...
ESP-TOUCH SET STATION MODE ...
SC version: V2.5.4
flush ssid: pwd:@úÿ?@úÿ?
mesh version: v1.3.2
mode : sta(5c:cf:7f:c1:07:d5)
add if0
scandone
err,scan status 1
scandone
err,scan status 4
ESP-TOUCH TIMEOUT
mode : sta(5c:cf:7f:c1:07:d5) + softAP(5e:cf:7f:c1:07:d5)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
no ap to join
mesh_enable_cb
enable mesh fail, re-enable
scan-ch:0
scandone



This is user_config.h. I changed the server_ip, the MESH_ROUTER_BSSID, ROUTER_SSID and ROUTER_PASS. Also there is no server at this time at that address, but the devices don't get a wifi connection, I don't think they will ask for the server yet.


static const uint16_t server_port = 7000; /*PORT USED BY USER IOT SERVER FOR MESH SERVICE*/
static const uint8_t server_ip[4] = {192, 168, 10, 1}; /*USER IOT SERVER IP ADDRESS*/
static const uint32_t UART_BAUT_RATIO = 115200; /*UART BAUT RATIO*/
static const uint8_t MESH_GROUP_ID[6] = {0x18,0xfe,0x34,0x00,0x00,0x50}; /*MESH_GROUP_ID & MESH_SSID_PREFIX REPRESENTS ONE MESH NETWORK*/

//static const uint8_t MESH_ROUTER_BSSID[6] = {0x00, 0x80, 0x5A, 0x5B, 0x1B, 0xAD};
/*MAC OF ROUTER*/
static const uint8_t MESH_ROUTER_BSSID[6] = {0x00, 0x0B, 0x81, 0x88, 0x63, 0x83};

/*
* please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
*/
#define MESH_ROUTER_SSID "PitAP" /*THE ROUTER SSID*/
#define MESH_ROUTER_PASSWD "*8*8*8*8*8*8*8*"/*THE ROUTER PASSWORD*/
#define MESH_SSID_PREFIX "MEMO" /*SET THE DEFAULT MESH SSID PREFIX;THE FINAL SSID OF SOFTAP WOULD BE "MESH_SSID_PREFIX_X_YYYYYY"*/
#define MESH_AUTH AUTH_WPA2_PSK /*AUTH_MODE OF SOFTAP FOR EACH MESH NODE*/
#define MESH_PASSWD "3HappyLions" /*SET PASSWORD OF SOFTAP FOR EACH MESH NODE*/
#define MESH_MAX_HOP (4) /*MAX_HOPS OF MESH NETWORK*/

Statistics: Posted by traderlopez — Thu Sep 29, 2016 12:55 pm


]]>