effect of system_timer_reinit

doswork
Posts: 6
Joined: Wed May 20, 2015 3:20 pm

effect of system_timer_reinit

Postby doswork » Wed Jul 06, 2016 6:01 pm

I connect my Android phone to ESP8266 AP, then leave the phone to sleep.
The log:
add 1
aid 1
station: 98:6c:f5:51:cf:3b join, AID = 1
station: 98:6c:f5:51:cf:3bjoin, AID = 1 @ time 48s
station: 98:6c:f5:51:cf:3b leave, AID = 1
rm 1
station: 98:6c:f5:51:cf:3bleave, AID = 1 @ time 432s
add 1
aid 1
station: 98:6c:f5:51:cf:3b join, AID = 1
station: 98:6c:f5:51:cf:3bjoin, AID = 1 @ time 597s
station: 98:6c:f5:51:cf:3b leave, AID = 1
rm 1
station: 98:6c:f5:51:cf:3bleave, AID = 1 @ time 969s

There are some times join-leave when sleep.
I add system_timer_reinit() in user_init(). The time interval between join and leave is less.
add 1
aid 1
station: 98:6c:f5:51:cf:3b join, AID = 1
station: 98:6c:f5:51:cf:3bjoin, AID = 1 @ time 18s
station: 98:6c:f5:51:cf:3b leave, AID = 1
rm 1
station: 98:6c:f5:51:cf:3bleave, AID = 1 @ time 108s
add 1
aid 1
station: 98:6c:f5:51:cf:3b join, AID = 1
station: 98:6c:f5:51:cf:3bjoin, AID = 1 @ time 145s
station: 98:6c:f5:51:cf:3b leave, AID = 1
rm 1
station: 98:6c:f5:51:cf:3bleave, AID = 1 @ time 167s
add 1
aid 1
station: 98:6c:f5:51:cf:3b join, AID = 1
station: 98:6c:f5:51:cf:3bjoin, AID = 1 @ time 276s
station: 98:6c:f5:51:cf:3b leave, AID = 1
rm 1
station: 98:6c:f5:51:cf:3bleave, AID = 1 @ time 316s

I think system_timer_reinit cause some timer error, maybe soft-AP DHCP server lease time, its unit is minute.
In API Guide, os_timer_arm: if called system_timer_reinit, the maximum value allowed to input is 0x41893.
I have no idea if there is any other impact calling system_timer_reinit.
Any help ?
NONOS_SDK_V1.5.4

pratik

Re: effect of system_timer_reinit

Postby pratik » Wed Jul 06, 2016 7:49 pm

Hello,

Could you post the code before/after the problem is observed? Where exactly did you reinit the timer that seems to be causing this?
Also, please step down to an older version of the SDK if possible. The very recent versions are sometimes prone to such issues.

Who is online

Users browsing this forum: No registered users and 285 guests