Implement custom serial callbacks