|
本帖最后由 yjsmyhome 于 2020-9-27 08:56 编辑
最近几天不是在同一个网络下无法连接到设备,既不是连线也不是离线,但连接到同一网络下发指令会返回在线状态并响应指令,重新烧写几次后,连上wifi立马就会断线,
blinker 0.3.3、app 2.4.7,
串口跟踪信息:
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Exception (28):
epc1=0x402215f4 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000424 depc=0x00000000
>>>stack>>>
ctx: cont
sp: 3ffffbc0 end: 3fffffc0 offset: 0190
3ffffd50: 3fff8fac 3fff01f0 3fff01ec 4020ab9a
3ffffd60: 00000000 00000000 3fff3424 3fff3574
3ffffd70: 0011001f 002553a8 3f0101bb 00001388
3ffffd80: 3fff36b4 0031003f 00fee0cc 70747468
3ffffd90: 40250073 85252d04 3fff37bc 0000001f
3ffffda0: 00252ccf 3fff31cc 0011001f 00100967
3ffffdb0: 40253200 3ffee0cc 80000000 00000000
3ffffdc0: 00000000 00000000 ffffffff 00000001
3ffffdd0: 00000000 0000000a 3ffe8500 00000000
3ffffde0: 8026665a 00000000 00000000 3fff8900
3ffffdf0: 3fff8ba4 3fff8c8e 3fff8f04 3fff8fa4
3ffffe00: 3fff8f94 3fff8f04 3ffe85a0 6e696c00
3ffffe10: 0072656b 802181c5 3fff3500 0010001f
3ffffe20: 80616958 375f696d 00444134 40100967
3ffffe30: 3fff896c 0018001f 00ffff3c 6e696c62
3ffffe40: 0072656b 87323430 6e696c62 0072656b
3ffffe50: 87002188 3fff8934 0020002f 00100967
3ffffe60: 3fff37e4 001a001f 00ff0e3c 3fff352c
3ffffe70: 0018001f 00fe858d 3fff8a6c 0128012f
3ffffe80: 00000000 3fff3284 004a004f 00000000
3ffffe90: 3fff323c 003b003f 00c6a7f0 3fff31a4
3ffffea0: 0011001f 00000000 4010047c 00000254
3ffffeb0: 3ffffe00 3ffffdf0 00000000 3fff3424
3ffffec0: 3fff3554 3ffefccc 00000000 00000001
3ffffed0: 40217f08 3fffff00 3fffff00 3fff09a0
3ffffee0: 3fffdad0 00000000 3ffefccc 4020acc9
3ffffef0: 007a1200 00000000 3ffefccc 4020ae85
3fffff00: 40105421 0002af0c 3fff0a00 00000000
3fffff10: 3ffef000 3fff0a00 0000000a 3fff09a0
3fffff20: 3fffdad0 3fff0a00 0000000a 4021f230
3fffff30: 3fffdad0 00000000 3ffefccc 4020aec6
3fffff40: 3fffdad0 00000000 3ffef800 4020ef68
3fffff50: 3fffdad0 4020408c 3ffef800 40202cf9
3fffff60: 007a1200 966e83ff 3ffef800 40205a01
3fffff70: 00000000 feefeffe 80efeffe feefef00
3fffff80: 00000000 00000000 00000001 3fff09a0
3fffff90: 3fffdad0 00000000 3fff0960 4020f334
3fffffa0: feefeffe 00000000 3fff0960 4021f348
3fffffb0: feefeffe feefeffe 3ffe85c4 40100ea5
<<<stack<<<
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
ets Jan 8 2013,rst cause:2, boot mode3,6)
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld
##################################################
代码如下:
#define BLINKER_WIFI
#include <Blinker.h>
char auth[] = "b2b36811e4f6";
char ssid[] = "Xiaomi_74AD";
char pswd[] = "11111111";
// 新建组件对象
BlinkerButton Button1("btn-abc");
BlinkerNumber Number1("num-abc");
int counter = 0;
// 按下按键即会执行该函数
void button1_callback(const String & state) {
BLINKER_LOG("get button state: ", state);
digitalWrite(2, !digitalRead(LED_BUILTIN));
}
// 如果未绑定的组件被触发,则会执行其中内容
void dataRead(const String & data)
{
BLINKER_LOG("Blinker readString: ", data);
counter++;
Number1.print(counter);
}
void setup() {
// 初始化串口
Serial.begin(115200);
// 初始化有LED的IO
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
// 初始化blinker
Blinker.begin(auth, ssid, pswd);
Blinker.attachData(dataRead);
Button1.attach(button1_callback);
}
void loop() {
Blinker.run();
}
|
-
|