How to do an active scan

Hi !
I have a problem when a I tried To do an active Scan. The xbee module answer me with an ERROR in At mode or with an invalid command in Api mode.
Someone has an idea ?

Which XBee product and related firmware are you working with?