Announcement

Collapse
No announcement yet.

Trying to setup my 4duino With ESP8266 WIFI as a server

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Hi Asha

    Ok, well it looks like the AP is not active for some reason. I will find or make an example using AT commands and test it here to make sure I can see it and connect to it and then send it to you.

    Best regards

    Paul

    Comment


    • #17
      Hi Paul,

      I also integrated the ESP8266 library and with given set of examples from 4Duino websites, TCPClient and TCPServer which I will upload.
      I tried using TCPServer on my 4Duino and I get "joinAP" failure.
      I am attaching image. Thanks for all your help.
      Thanks, Asha
      Attached Files

      Comment


      • #18
        Hi Paul,
        I was wondering if you have an update?
        I was also wondering if the ESP8266's firmware is the cause of the problem? Is there another way of issuing the "joinAP" command other than

        "m_puart->print("AT+CWJAP="connect_here","12345679"\r\n");"

        Below is the ESP8266 version info

        FW Version:
        AT version:1.3.0.0(Jul 14 2016 18:54:01)
        SDK version:2.0.0(656edbf)
        compile time:Jul 19 2016 18:44:44

        Thanks,
        Asha

        Comment


        • #19
          Hi,

          Everything in your code looks right.

          I did follow this example which seemed to work

          https://techtutorialsx.com/2017/05/2...h-at-commands/

          Maybe it is just because of the added ",1,4" that makes this version work.

          Code:
          //ESPserial.print("AT+CWJAP=\"myNetworkSSID\",\"password\"\r\n");
                      ESPserial.print(F("AT+CWJAP=\""));
                      ESPserial.print(F(SSID));
                      ESPserial.print(F("\",\""));
                      ESPserial.print(F(PASSWORD));
                      ESPserial.print(F("\",1,4\r\n"));
          Best regards

          Paul

          Comment


          • #20
            Hi,
            I tried
            ESPserial.print(F("",1,4\r\n")); But I still do not see the new SSID "connect_here" on my android phone and I also do not see it on my PC wifi, I always see ESP_xxxxxx I am successful in the "joinAP". I do get the AP IP address and the MAC address. But never the new SSID. I noticed on the web that the SSID password has to more than 8 characters and so I have made my password larger than 8 characters. So I do not understand. Please help. Thanks, Asha

            Comment


            • #21
              Hi Asha,

              I have attached a 4Duino project so that AT commands can be entered directly using the serial monitor in the example. I have noticed that the AT+CWSAP=”ESP”,”password”,1,4 returns an error and I don't know why yet but the response of the failed command doesn't match what is sent.

              Best regards

              Paul


              Attached Files

              Comment


              • #22
                Hi Paul,

                Thank you. Appreciate all your help.
                I am finally able to see the new SSID on my Android phone as well as on my PC.
                I had to add below set of code and another state after the getting the MAC address:

                case WIFI_STATE_ADVERTISE_SSID :
                {
                if (*(long*)ipAddr == 0) {
                dataScan(dataScan_IP);
                ESPreplyWait(2000);
                break;
                }
                dataScan(dataScan_OK);

                ESPserial.print(F("AT+CWSAP=""));
                ESPserial.print(F(SSID));
                ESPserial.print(F("",""));
                ESPserial.print(F(PASSWORD));
                ESPserial.print(F("",1,4\r\n"));

                ESPreplyWait(5000);
                wifiState = WIFI_STATE_CONFIGURE_CONNECTION_CNT;
                }
                break;



                So, actually, in the example code "4D-PR-100-018 Server - Client", in the TCPServer.ino code,
                I added code below after calling "if (wifi.joinAP(SSID, PASSWORD))"
                " if(wifi.setSoftAPParam(SSID, PASSWORD, 1,4))
                Display.print(SSID); "

                And this also worked.
                Thank you for your support.
                Asha

                Comment


                • #23
                  Hi Asha,

                  I am so glad you managed to fix it, thank you for letting me know. It may be possible to customize the firmware in the ESP8266 to just do what you want it to do and possibly reduce the needed code to connect and communicate but maybe something for the future, at the moment you now have a working setup.

                  Thanks again.

                  Best regards

                  Paul

                  Comment


                  • #24
                    Hi,
                    I was wondering if there is a way to clear the ESP8266 ssid and password using the AT commands from the Atmel?
                    I have researched but cannot find a way
                    Thanks,
                    Asha

                    Comment

                    Working...
                    X