Announcement

Collapse
No announcement yet.

About error 12, invalid argument

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

  • About error 12, invalid argument

    I am test a lot of times but still catch the error message.

    Show on the picture, is anyone have idea how i can do

    PHPoC Shield for Arduino connet Arduino UNO

    This my test code:
    #include <SPI.h>
    #include <Phpoc.h>
    PhpocEmail email;
    void setup() {
    Serial.begin(9600);
    while(!Serial) ;
    Phpoc.begin(PF_LOG_SPI | PF_LOG_NET | PF_LOG_APP);
    //Phpoc.begin();
    Serial.println("Email Client Test using outgoing relay server");
    // [login using your private password]
    // Google may block sign-in attempts from some apps or devices that do not use modern security standards.
    // Change your settings to allow less secure apps to access your account.
    // https://www.google.com/settings/security/lesssecureapps
    // [login using app password]
    // 1. turn on 2-step verification
    // 2. create app password
    // 3. apply app password as your login password
    // setup outgoing relay server

    email.setOutgoingServer("smtp.gmail.com", 587);
    email.setOutgoingLogin("your_login_id", "your_login_password or app_password");
    // setup From/To/Subject
    email.setFrom("from_email_address", "from_user_name");
    email.setTo("to_email_address", "to_user_name");
    email.setSubject("Mail from PHPoC Shield for Arduino");
    // write email message
    email.beginMessage();
    email.println("Hello, world!");
    email.println("I am PHPoC Shield for Arduino");
    email.println("Good bye"); email.endMessage();
    // send email
    if(email.send() > 0)
    Serial.println("Email send ok");
    else
    Serial.println("Email send failed");
    }
    void loop() {
    }

  • #2
    That error means you have not configured the WiFi network for PHPoC Shield. Please see the this instruction to config WiFi information:

    Comment


    • #3
      i need to do again when restart?am i right?

      Comment


      • #4
        No, the Wi-Fi configuration is stored in Flash memory. It is kept when there is no power. You only need to send once. You can test it.

        Comment


        • #5
          I have see this message, it's mean can't find my email adress?
          .log> phpoc_cmd: head wait timeout
          .log> phpoc_cmd: head wait timeout
          .log> phpoc_cmd: head wait timeout
          .log> phpoc_cmd: head wait timeout
          .log> phpoc_cmd: head wait timeout
          .log> phpoc_cmd: head wait timeout
          .log> phpoc_cmd: head wait timeout
          .log> phpoc_cmd: head wait timeout

          Comment


          • #6
            Could you please reboot Arduino and show me all log on Serial Monitor?

            Comment


            • #7
              When I restart still get this error message.
              i am almost get crazy

              Comment


              • #8
                Could you please:
                • Keep power Arduino and connect PHPoC Shield to PHPoC Debugger? You can download PHPoC debugger here. And this is instruction.
                • Click run button on PHPoC.Click image for larger version

Name:	fetch?id=1927&amp;d=1608271536.png
Views:	15
Size:	50.5 KB
ID:	1952
                • Copy the log in the console of PHPoC Debugger and post here
                Or you can email to [email protected] to get supported via a remote connection
                Attached Files

                Comment


                • #9
                  Thanks for you!!
                  I am already test ok ,but i have another problem.
                  Why RFID-RC522 can't work together with PHPoC?

                  Comment


                  • #10
                    Both RFID-RC522 and PHPoC shield uses SPI. By default, it can not work together. Fortunately, you can make it work by changing the SS connected to RFID-RC522. If you take a look to this Arduino RFID-RC522 tutorial, you will see the code:

                    Code:
                    #define SS_PIN 10
                    #define RST_PIN 9
                    MFRC522 rfid(SS_PIN, RST_PIN);
                    You can change SS_PIN to other pin. Do not forget to change wiring with RFID-RC522 according to the new SS pin

                    Comment


                    • #11
                      I have done already , but still catch the error message!!
                      Attached Files

                      Comment


                      • #12
                        This error is related to RFID-RC522 module. I suggest you to contact the RFID-RC522 provider

                        Comment


                        • #13
                          It can work only RFID-RC522 connet Arduino UNO but connet PHPoC can't work and see the error message.
                          So RFID can't work with PHPoC? Or you test it can success?

                          Comment


                          • #14
                            That is because two devices use the same SPI bus. The SPI allows multiple devices share the same bus, as long as they use the different SS pin. I would like to suggest you do a research about SPI

                            Comment


                            • #15
                              I took a close look to your picture. You have not change SS_PIN.
                              It only works when you change SS pin on both code and real wiring

                              Comment


                              • Ryan0807
                                Ryan0807 commented
                                Editing a comment
                                You mean I haven't write this code:{MFRC522 rfid(SS_PIN, RST_PIN);}?

                              • Khanh
                                Khanh commented
                                Editing a comment
                                Yes. And take a look to other comment I posted recently.
                            Working...
                            X