|
本帖最后由 鱼油游 于 2018-5-28 22:12 编辑
长按按键,我能进入airline模式,可以实现了远程的控制,但是短按按键时进入的不是ap模式,而是显示进入了station模式,而且搜索不到esp_12f的ap。这是长按进入airline模式的打印:
[023800][NWK] GAgentNwkEventCB event: 0x0040
[023800][Local] GAgentStatus change, lastGAgentStatus:0x0000, newGAgentStatus:0x000C
@@@@ GAgentStatus[hex]:0c | [Bin]:0,0,1,1,0,0
OnBoarding: AirLink mode
WiFi status: in binding mode
@@@@ RSSI 0
[023800][FR] Cancle router connect monitor.
[023800][Dev] Save gagent config data
[023800][NWK] haiNwkStatus: 0x000C, gagentStatus: 0x200C
这是短按进入ap模式的打印:
[023888][NWK] NWK_WIFI_STA_UP
[023888][NWK] gagentNwkEventHandle invalid event : 1024
[024304][NWK] gagentNwkEventCB event: 0x0004
[024304][Local] GAgentStatus change, lastGAgentStatus:0x1008, newGAgentStatus:0x104A
@@@@ GAgentStatus[hex]:104a | [Bin]:0,0,1,0,1,0
OnBoarding: Station mode
@@@@ RSSI 0
[024304][NWK] haiNwkStatus: 0x000A, gagentStatus: 0x104A
scandone
no GIZWITS_TEST_1 found, reconnect after 1s
[024248][WiFiEvent] disconnect from ssid GIZWITS_TEST_1, reason 201
打印串口每秒接到的数据:
scandone
no GIZWITS_TEST_1 found, reconnect after 1s
[024248][WiFiEvent] disconnect from ssid GIZWITS_TEST_1, reason 201
reconnect
模块的状态我用了蓝色的字体显示了出来。我按键的设置,是原来的设置,没有进行更改的。
这是按键的配网设置:
LOCAL void ICACHE_FLASH_ATTR key2ShortPress(void)
{
GIZWITS_LOG("#### key2 short press, soft ap mode \n");
gizwitsSetMode(WIFI_SOFTAP_MODE);
}
/**
* Key2 button long press
* @param none
* @return none
*/
LOCAL void ICACHE_FLASH_ATTR key2LongPress(void)
{
GIZWITS_LOG("#### key2 long press, airlink mode\n");
gizwitsSetMode(WIFI_AIRLINK_MODE);
}
|
|