收藏官网首页
查看: 11429|回复: 0

[问答] 关于ap和airline模式的问题,为什么ap变成到了station模式?

2

主题

7

帖子

188

积分

注册会员

Rank: 2

积分
188
发表于 2018-5-28 22:06:33 | 显示全部楼层 |阅读模式
免费使用STM32、APP自动代码生成工具
本帖最后由 鱼油游 于 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);
}




您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

加入Q群 返回顶部

版权与免责声明 © 2006-2024 Gizwits IoT Technology Co., Ltd. ( 粤ICP备11090211号 )

快速回复 返回顶部 返回列表