cmd might be null if there is no AP defined