ESP8266 Developer Zone The Official ESP8266 Forum 2016-03-02T22:00:16+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1836 2016-03-02T22:00:16+08:00 2016-03-02T22:00:16+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1836&p=5934#p5934 <![CDATA[Re: 使用 SDK1.5.1时,测试example 中的 smart_config 例程时,监控串口的波特率应该设置为多少]]> Statistics: Posted by dearwind153 — Wed Mar 02, 2016 10:00 pm


]]>
2016-03-02T15:47:03+08:00 2016-03-02T15:47:03+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1836&p=5916#p5916 <![CDATA[Re: 使用 SDK1.5.1时,测试example 中的 smart_config 例程时,监控串口的波特率应该设置为多少]]>
默认波特率是 74880,或者您也可以调用 uart_init 设置成其他波特率。

感谢您对 ESP8266 的关注!

Statistics: Posted by ESP_Faye — Wed Mar 02, 2016 3:47 pm


]]>
2016-02-29T23:51:14+08:00 2016-02-29T23:51:14+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1836&p=5864#p5864 <![CDATA[使用 SDK1.5.1时,测试example 中的 smart_config 例程时,监控串口的波特率应该设置为多少]]> 2. 虚拟机下编译生成 bin,烧录至ESP8266
3. 上电,按Reset按钮,串口有数据打印,但是显示乱码
4. 查看工程中的代码非常简单,但是没找到设置波特率的地方

Code:

void ICACHE_FLASH_ATTR
smartconfig_done(sc_status status, void *pdata)
{
    switch(status) {
        case SC_STATUS_WAIT:
            os_printf("SC_STATUS_WAIT\n");
            break;
        case SC_STATUS_FIND_CHANNEL:
            os_printf("SC_STATUS_FIND_CHANNEL\n");
            break;
        case SC_STATUS_GETTING_SSID_PSWD:
            os_printf("SC_STATUS_GETTING_SSID_PSWD\n");
         sc_type *type = pdata;
            if (*type == SC_TYPE_ESPTOUCH) {
                os_printf("SC_TYPE:SC_TYPE_ESPTOUCH\n");
            } else {
                os_printf("SC_TYPE:SC_TYPE_AIRKISS\n");
            }
            break;
        case SC_STATUS_LINK:
            os_printf("SC_STATUS_LINK\n");
            struct station_config *sta_conf = pdata;
   
           wifi_station_set_config(sta_conf);
           wifi_station_disconnect();
           wifi_station_connect();
            break;
        case SC_STATUS_LINK_OVER:
            os_printf("SC_STATUS_LINK_OVER\n");
            if (pdata != NULL) {
                uint8 phone_ip[4] = {0};

                os_memcpy(phone_ip, (uint8*)pdata, 4);
                os_printf("Phone ip: %d.%d.%d.%d\n",phone_ip[0],phone_ip[1],phone_ip[2],phone_ip[3]);
            }
            smartconfig_stop();
            break;
    }
   
}

void user_rf_pre_init(void)
{
}

void user_init(void)
{
    os_printf("SDK version:%s\n", system_get_sdk_version());
   smartconfig_set_type(SC_TYPE_ESPTOUCH); //SC_TYPE_ESPTOUCH,SC_TYPE_AIRKISS,SC_TYPE_ESPTOUCH_AIRKISS
    wifi_set_opmode(STATION_MODE);
    smartconfig_start(smartconfig_done);
}

[img]
11111111111111.png
[/img]
请问在哪里设置波特率,或者默认的波特率是多少?
11111111111111.png

Statistics: Posted by dearwind153 — Mon Feb 29, 2016 11:51 pm


]]>