ESP Touch smart config不成功

leely
Posts: 4
Joined: Fri Nov 20, 2015 11:20 am

ESP Touch smart config不成功

Postby leely » Fri Nov 20, 2015 12:24 pm

使用手机APP通过smart config来配置RTOS版本的ESP8266,发现双方握手不能成功,

手机是iphone6 ios8.3。ESP touch v0.3.3。用xCode7做设备调试的时候,可以输出“send gc code”,前端日志如下:

2015-11-20 11:08:35.071 EspTouchDemo[5787:2927996] ESPTouchTask __listenAsyn() expectOneByte: 34

2015-11-20 11:08:41.094 EspTouchDemo[5787:2929212] ESPTouchTask __execute() send gc code

2015-11-20 11:08:47.108 EspTouchDemo[5787:2929212] ESPTouchTask __execute() send gc code

2015-11-20 11:08:53.139 EspTouchDemo[5787:2929212] ESPTouchTask __execute() send gc code

2015-11-20 11:08:59.157 EspTouchDemo[5787:2929212] ESPTouchTask __execute() send gc code

2015-11-20 11:09:05.158 EspTouchDemo[5787:2929212] ESPTouchTask __execute() send gc code

2015-11-20 11:09:11.174 EspTouchDemo[5787:2929212] ESPTouchTask __execute() send gc code

2015-11-20 11:09:17.204 EspTouchDemo[5787:2929212] ESPTouchTask __execute() send gc code

2015-11-20 11:09:23.104 EspTouchDemo[5787:2929212] ESPTouchTask __sleep() start

server: receiveOneByte fail

: Resource temporarily unavailable

2015-11-20 11:09:33.071 EspTouchDemo[5787:2927996] ESPTouchTask __listenAsyn() receive rubbish message, just ignore

2015-11-20 11:09:33.110 EspTouchDemo[5787:2929212] ESPTouchTask __sleep() end, receive signal is NO

2015-11-20 11:09:33.110 EspTouchDemo[5787:2929212] ###################server close() fd=10

server: receiveOneByte fail

: Bad file descriptor

2015-11-20 11:09:33.111 EspTouchDemo[5787:2927996] ESPTouchTask __listenAsyn() receive rubbish message, just ignore

2015-11-20 11:09:33.111 EspTouchDemo[5787:2929212] ESPTouchTask __notify()

2015-11-20 11:09:33.111 EspTouchDemo[5787:2927996] ESPTouchTask __notify()

2015-11-20 11:09:33.112 EspTouchDemo[5787:2927996] ESPTouchTask __listenAsyn() finish

2015-11-20 11:09:33.112 EspTouchDemo[5787:2929212] ESPViewController executeForResult() result is: (

"[isSuc: NO,isCancelled: NO,bssid: (null),inetAddress: 0.0.0.0]"

)



串口调试输出的后端日志如下:

ets Jan 8 2013,rst cause:1, boot mode:(3,2)

load 0x40100000, len 1396, room 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, room 4
tail 8
chksum 0xc0
csum 0xc0

2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

pp_task_hdl : 3fff2750, prio:13, stack:512
pm_task_hdl : 3fff3030, prio:1, stack:176
ApiMsgMutex created
tcpip_task_hdl : 3fff3448, prio:10,stack:512
wdt_task : 3fff3d08, prio:14, stack:176
idle_task_hdl : 3fff4878
tim_task_hdl : 3fff4c70
xPortStartScheduler
frc2_timer_task_hdl:3fff5580, prio:12, stack:512

OS SDK ver: 1.2.0(b900bd2) compiled @ Aug 28 2015 17:18:41
phy ver: 356, pp ver: 9.0

SDK version:1.2.0(b900bd2)
mode : sta(18:fe:34:a4:8c:34) + softAP(1a:fe:34:a4:8c:34)
add if0
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
add if1
bcn 100
IOT VERSION:v1.0.5t23701(a)
user_plug_init start!
wifi_station_get_ap num 0
apnetif->dhcps_pcb = 1073706632
bcn 0
del if1
mode : sta(18:fe:34:a4:8c:34)
configing...
C > multi_conn_init ok!
smartconfig_task start
SC version: V2.4.7configing...
scandone
configing...
scandone
SC_STATUS_FIND_CHANNEL
configing...
configing...
configing...
configing...
configing...
可见,后端的平台任务线程一直等待configing完成,而smart config 任务线程不能接收到手机APP发出的SSID和PASSWD指令,无法进入到SC_STATUS_GETTING_SSID_PSWD状态
同时,开发板上的smart config LED蓝色灯一会慢闪一阵,一会快闪一阵子,不断这样变化,请问问题在什么地方?

afunx
Posts: 19
Joined: Fri Jan 09, 2015 11:04 am

Re: ESP Touch smart config不成功

Postby afunx » Fri Nov 20, 2015 3:22 pm

从打印来看,Device并未收到手机发出的消息。我曾用过iphone6的Esptouch,也是8.x的系统,是可以成功的。如果使用的是原生代码,建议可以多试几次,确认是大概率失败还是偶有失败。

ESP_Alfred
Posts: 54
Joined: Mon Nov 10, 2014 7:31 pm

Re: ESP Touch smart config不成功

Postby ESP_Alfred » Fri Nov 20, 2015 4:33 pm

请更新ESPTOUCH APP到最新的v0.3.4.x版本, https://github.com/espressifAPP

leely
Posts: 4
Joined: Fri Nov 20, 2015 11:20 am

Re: ESP Touch smart config不成功

Postby leely » Tue Nov 24, 2015 10:29 am

手机端更换成0.3.4.3,还是不行。一次都没有成功过。

EspTouch端显示的日志是‘send gc code’,开发板显示的日志也还是跟一样,始终没有收到。

怎么办?

leely
Posts: 4
Joined: Fri Nov 20, 2015 11:20 am

Re: ESP Touch smart config不成功

Postby leely » Wed Nov 25, 2015 11:06 am

今天开发板使用non-os sc 2.4和2.5.1, ipad iOS 9.0,直接运行EspTouch,成功。

再次安装EspTouch到ipad或者iphone6,运行就不成功了。开发板输出:
T|once 1 80
20:0c:c8:06:f3:c1: 594
20:0c:c8:06:f3:c1: 593
20:0c:c8:06:f3:c1: 592
20:0c:c8:06:f3:c1: 595
T|once 2 80
save, rssi:-74 20:0c:c8:06:f3:c1:
20:0c:c8:06:f3:c1: 593
20:0c:c8:06:f3:c1: 592
20:0c:c8:06:f3:c1: 595
20:0c:c8:06:f3:c1: 594

这是怎么回事?什么情况下会打印这样的信息?

leely
Posts: 4
Joined: Fri Nov 20, 2015 11:20 am

Re: ESP Touch smart config不成功

Postby leely » Wed Nov 25, 2015 11:08 am

补充:ESP Touch v0.3.4.3

ESP_Alfred
Posts: 54
Joined: Mon Nov 10, 2014 7:31 pm

Re: ESP Touch smart config不成功

Postby ESP_Alfred » Thu Nov 26, 2015 11:38 am

leely wrote:今天开发板使用non-os sc 2.4和2.5.1, ipad iOS 9.0,直接运行EspTouch,成功。

再次安装EspTouch到ipad或者iphone6,运行就不成功了。开发板输出:
T|once 1 80
20:0c:c8:06:f3:c1: 594
20:0c:c8:06:f3:c1: 593
20:0c:c8:06:f3:c1: 592
20:0c:c8:06:f3:c1: 595
T|once 2 80
save, rssi:-74 20:0c:c8:06:f3:c1:
20:0c:c8:06:f3:c1: 593
20:0c:c8:06:f3:c1: 592
20:0c:c8:06:f3:c1: 595
20:0c:c8:06:f3:c1: 594

这是怎么回事?什么情况下会打印这样的信息?


能否多测试几次,提供全一点的log给我。可以把log打包成文件发上来。

mijin
Posts: 3
Joined: Wed Dec 09, 2015 1:02 am

Re: ESP Touch smart config不成功

Postby mijin » Wed Dec 09, 2015 1:10 am

Hi,

I have the same issue on the iPhone 6 (iOS9).

https://github.com/EspressifApp/EsptouchForIOS

It keeps failing.

2015-12-08 16:52:46.106 EspTouchDemo[2490:492596] ESPViewController do confirm action...
2015-12-08 16:52:46.111 EspTouchDemo[2490:493315] ESPViewController do the execute work...
2015-12-08 16:52:46.112 EspTouchDemo[2490:493315] ESPTouchTask init
2015-12-08 16:52:46.113 EspTouchDemo[2490:493315] ##########################client init() _sck_fd=5
2015-12-08 16:52:46.114 EspTouchDemo[2490:493315] ##########################server init(): _sck_fd=6
2015-12-08 16:52:46.115 EspTouchDemo[2490:493315] ESP_NetUtil:: 192.168.1.192
2015-12-08 16:52:46.116 EspTouchDemo[2490:493315] ESPTouchTask executeForResult() localInetAddr: 192.168.1.192
2015-12-08 16:52:52.496 EspTouchDemo[2490:493315] ESPTouchTask __execute() send gc code
2015-12-08 16:52:52.497 EspTouchDemo[2490:493291] ESPTouchTask beginBackgroundTask() entrance
2015-12-08 16:52:52.499 EspTouchDemo[2490:493291] ESPTouchTask __listenAsyn() start an asyn listen task, current thread is: <NSThread: 0x127e86c90>{number = 2, name = (null)}
2015-12-08 16:52:52.499 EspTouchDemo[2490:493291] ESPTouchTask __listenAsyn() expectOneByte: 27
2015-12-08 16:52:58.501 EspTouchDemo[2490:493315] ESPTouchTask __execute() send gc code
2015-12-08 16:53:04.527 EspTouchDemo[2490:493315] ESPTouchTask __execute() send gc code
2015-12-08 16:53:10.532 EspTouchDemo[2490:493315] ESPTouchTask __execute() send gc code
2015-12-08 16:53:16.551 EspTouchDemo[2490:493315] ESPTouchTask __execute() send gc code
2015-12-08 16:53:22.568 EspTouchDemo[2490:493315] ESPTouchTask __execute() send gc code
2015-12-08 16:53:28.587 EspTouchDemo[2490:493315] ESPTouchTask __execute() send gc code
2015-12-08 16:53:34.597 EspTouchDemo[2490:493315] ESPTouchTask __execute() send gc code
2015-12-08 16:53:37.524 EspTouchDemo[2490:493315] ESPTouchTask __sleep() start
server: receiveOneByte fail
: Resource temporarily unavailable
2015-12-08 16:53:52.476 EspTouchDemo[2490:493291] ESPTouchTask __listenAsyn() receive rubbish message, just ignore
2015-12-08 16:53:52.529 EspTouchDemo[2490:493315] ESPTouchTask __sleep() end, receive signal is NO
2015-12-08 16:53:52.530 EspTouchDemo[2490:493315] ###################server close() fd=6
server: receiveOneByte fail
: Bad file descriptor
2015-12-08 16:53:52.530 EspTouchDemo[2490:493291] ESPTouchTask __listenAsyn() receive rubbish message, just ignore
2015-12-08 16:53:52.530 EspTouchDemo[2490:493291] ESPTouchTask __notify()
2015-12-08 16:53:52.530 EspTouchDemo[2490:493315] ESPTouchTask __notify()
2015-12-08 16:53:52.531 EspTouchDemo[2490:493291] ESPTouchTask __listenAsyn() finish
2015-12-08 16:53:52.531 EspTouchDemo[2490:493315] ESPViewController executeForResult() result is: (
"[isSuc: NO,isCancelled: NO,bssid: (null),inetAddress: 1.0.0.0]"
)
2015-12-08 16:53:52.534 EspTouchDemo[2490:493291] ESPTouchTask endBackgroundTask() entrance

Any advices in English would be helpful.
Thanks

M

ESP_Faye
Posts: 1549
Joined: Mon Oct 27, 2014 11:08 am

Re: ESP Touch smart config不成功

Postby ESP_Faye » Wed Dec 09, 2015 4:58 pm

Hi,

Sorry that we can not duplicate your problem. We tested it on iPhone 6(iOS9), and succeed.

In your case, did it fail every time ? Or it just failed sometimes ?

Could your provide the ESP8266's UART output logs for debugging ?

mijin
Posts: 3
Joined: Wed Dec 09, 2015 1:02 am

Re: ESP Touch smart config不成功

Postby mijin » Mon Dec 14, 2015 7:24 pm

Hi,

It works randomly in the office which has many sources of interference (with unnecessary amounts of 2.4 Ghz Aps). It seems it doesn't receive any data. See logs below. But when testing at home, it works all the time on both android, iOS apps without giving any failure messages.

Log
*** SMARTCONFIG MODE ***
bcn 0
del if1
usl
mode : sta(5c:cf:7f:12:11:78)
add if0
SC version: V2.5.3
f r0, scandone
f r0, scandone
SC_STATUS_FIND_CHANNEL

*** READY TO GET DATA [14422ms] ***

--------------------------
UPDATE: our router supports 2.4Ghz and 5 Ghz bands. It didn't work when packs were broadcasted to 5Ghz.
Thanks

M
Last edited by mijin on Wed Dec 16, 2015 7:01 pm, edited 3 times in total.

Who is online

Users browsing this forum: No registered users and 1 guest