auto detect serial events.