{"action":"opened","issue":{"url":"https://api.github.com/repos/itead/ITEADLIB_Arduino_WeeESP8266/issues/15","labels_url":"https://api.github.com/repos/itead/ITEADLIB_Arduino_WeeESP8266/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/itead/ITEADLIB_Arduino_WeeESP8266/issues/15/comments","events_url":"https://api.github.com/repos/itead/ITEADLIB_Arduino_WeeESP8266/issues/15/events","html_url":"https://github.com/itead/ITEADLIB_Arduino_WeeESP8266/issues/15","id":63713161,"number":15,"title":"JoinAP","user":{"login":"SBKila","id":11612777,"avatar_url":"https://avatars.githubusercontent.com/u/11612777?v=3","gravatar_id":"","url":"https://api.github.com/users/SBKila","html_url":"https://github.com/SBKila","followers_url":"https://api.github.com/users/SBKila/followers","following_url":"https://api.github.com/users/SBKila/following{/other_user}","gists_url":"https://api.github.com/users/SBKila/gists{/gist_id}","starred_url":"https://api.github.com/users/SBKila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SBKila/subscriptions","organizations_url":"https://api.github.com/users/SBKila/orgs","repos_url":"https://api.github.com/users/SBKila/repos","events_url":"https://api.github.com/users/SBKila/events{/privacy}","received_events_url":"https://api.github.com/users/SBKila/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-23T12:41:53Z","updated_at":"2015-03-23T12:41:53Z","closed_at":null,"body":"Hi,\r\n\r\nMy ESP8266 firmware is\r\nAT+GMR\r\n\r\nAT version:0.21.0.0\r\nSDK version:0.9.5\r\n\r\nOK\r\n\r\nMy arduino is a leonardo R3\r\n\r\nI have used for the first time your library this weekend. I was not able to use your example ConnectWifi.\r\nI have update the example with my SSID and password. and also ESP8266 object creation as follow\r\nESP8266 wifi(Serial1,115200);\r\n\r\nthe log I get is something like this:\r\n\r\nsetup begin\r\nFW Version:0.21.0.0\r\nto station ok\r\nJoin AP failure\r\nsetup end\r\n\r\nIn my first test application of the ESP8266 I was doing as follow and it able to join the SSID\r\nString cmd=\"AT+CWMODE=1\";\r\nSerial.print(\"SEND: \");\r\nSerial.println(cmd);\r\nSerial1.println(cmd);\r\nSerial1.flush();\r\ndelay(2000);\r\ncmd=\"AT+CWJAP=\\\"\";\r\ncmd+=ssid;\r\ncmd+=\"\\\",\\\"\";\r\ncmd+=pwd;\r\ncmd+=\"\\\"\";\r\nSerial.print(\"SEND: \");\r\nSerial.println(cmd);\r\nSerial1.println(cmd);\r\nSerial1.flush();\r\ndelay(5000);\r\nreturn Serial1.find(\"OK\");\r\n\r\n\r\nI have a look to your .CPP file, and you are doing quite the same but I was not able to connect my WIFI.\r\n\r\nI test I have updated you .CPP file as follow, \r\n\r\nbool ESP8266::joinAP(String ssid, String pwd)\r\n{\r\n\t\r\n\t//sATCWMODE(1);\r\n\tdelay(2000);\r\n\tString cmd=\"AT+CWMODE=1\";\r\n  Serial.print(\"SEND: \");\r\n  Serial.println(cmd);\r\n  m_puart->println(cmd);\r\n  m_puart->flush();\r\n  delay(2000);\r\n  cmd=\"AT+CWJAP=\\\"\";\r\n  cmd+=ssid;\r\n  cmd+=\"\\\",\\\"\";\r\n  cmd+=pwd;\r\n  cmd+=\"\\\"\";\r\n  Serial.print(\"SEND: \");\r\n  Serial.println(cmd);\r\n  m_puart->println(cmd);\r\n  m_puart->flush();\r\n  delay(5000);\r\n  return m_puart->find(\"OK\");\r\n\t\r\n}\r\n\r\nand this time i was able to connect my WIFI.\r\n\r\nany clue for me?\r\n\r\nRegards\r\n\r\n\r\nI have also try without success:\r\nmodifying \r\nbool ESP8266::sATCWJAP \r\nbool ESP8266::sATCWJAP(String ssid, String pwd)\r\n{\r\n    String data;\r\n    rx_empty();\r\n    m_puart->print(\"AT+CWJAP=\\\"\");\r\n\tSerial.print(\"AT+CWJAP=\\\"\");\r\n   \r\n    m_puart->print(ssid);\r\n\tSerial.print(ssid);\r\n\t\r\n    m_puart->print(\"\\\",\\\"\");\r\n    Serial.print(\"\\\",\\\"\");\r\n\t\r\n\tm_puart->print(pwd);\r\n\tSerial.print(pwd);\r\n\t\r\n    m_puart->println(\"\\\"\");\r\n\tSerial.println(\"\\\"\");\r\n    \r\n\tdelay(5000);\r\n\treturn m_puart->find(\"OK\");\r\n/*\r\n    data = recvString(\"OK\", \"FAIL\", 10000);\r\n    if (data.indexOf(\"OK\") != -1) {\r\n        return true;\r\n    }\r\n    return false;\r\n*/\r\n}\r\n\r\nthe output was AT+CWJAP=\"MYSSID\",\"MYPASSWORD\"\r\n"}}