esp8266 not work as access point

Hi all.
I try to make esp8266 connected on mega 2560 to works as AP , but received this

"AT+CWSAP?

SET NEW AP
AT+CWSAP="ESP_AP","123456789",6,4

ERROR
AT+RST

OK
öz‚€ÿ€@à ÈúDLJSÀ€Hè
[Vendor:www.ai-thinker.com Version:0.9.2.4]

ready
"

And AP not visible , tried with many devices to find it in networks.

If i use it like a web server connected to my router works well.

Anybody have some ideea?

Many thanks in advance

this is the code
/*
*

  • Make an Access Point

*/

#include <ESP8266_TCP.h>

// ESP8266 Class
ESP8266_TCP wifi;

// Define SSID, Password and Channel that provide for Access Point
#define ssid "ESP_AP"
#define pass "123456789"
#define channel 6

// Connect this pin to reset pin on ESP8266
#define PIN_RESET 6

void setup()
{
delay(3000);

// We use Serial1 to interface with ESP8266
// and use Serial to debugging
Serial.begin(9600);
Serial1.begin(9600);
wifi.begin(&Serial1, &Serial, PIN_RESET);

/* If your board has only 1 serial port

  • or you didn't need to debugging, try this.
  • Serial.begin(115200);
  • wifi.begin(&Serial, PIN_RESET);

*/

// Check that ESP8266 is available
if(wifi.test())
{
wifi.openAccessPoint(ssid, pass, channel);
Serial.println("pornesc ap");
}
else
{
// ESP8266 isn't available
Serial.println("Check module connection and restart to try again...");
}
}

void loop()
{

}

if you want to use access point, you must set CWMODE to 2 or 3 before you call CWSAP.

AT+CWMODE=2