Announcement

Collapse
No announcement yet.

PHPoC Debugger screenshot for help (Thank's Khanh)

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

  • PHPoC Debugger screenshot for help (Thank's Khanh)

    Hi Khanh, here is JPEG file about screenshot of PHPoC debugger

  • #2
    Dear Stéphane Mancini,

    I tested again, there maybe something missed in system file by accident.

    Could you please upgrade new system files via the below instruction:
    https://forum.phpoc.com/forum/phpoc-...phpoc-shield-1

    This also updates some new features from PHPoC Shield 2.

    After upgrading, please upload login.php file again and test it.

    Comment


    • #3
      • Hello Khanh. So, concerning the PHPoC debugger, I re-downloaded the 1.5.0 version (already installed) and copy all the files from GitHub phpoc-shield2. Concerning Arduino IDE, PHPoC library Version 1.5.0 is well installed. I use Arduino Mega board and PHPoC Shield 1 (P4S-348). Unfortunately, same issue. I have tried some PHPoC examples from Arduino IDE like WebRemotePad, Push and Slide and all three work well. Output Log from PHPoC,debugger displays only : PHPoC Shield / P4S-348 1.5.0. , nothing else. I also tried an other project find on youtube (https://www.youtube.com/watch?v=5n7WZFef4mY) with Arduino Uno, PHPoC Shield, Grove Camera and it works perfectly. I think there is no hardware issues. If you have other ideas to help me thank's. Regard's.

      Comment


      • #4
        Hello Stéphane Mancini,
        Now we can debug step by step. Firstly try to remove all camera and Google Oauth code on Arduino side

        Code:
        #include <Phpoc.h>
        #include <Arduino_JSON.h>
        
        // Replace your GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET here
        String GOOGLE_CLIENT_ID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.app s .googleusercontent.com";
        String GOOGLE_CLIENT_SECRET = "xxxxxxxxxxxxxxxxxxxxxxxx";
        PhpocServer websocket_server(80);
        
        int buttonState;
        int lastButtonState = LOW;
        unsigned long lastDebounceTime = 0;
        unsigned long debounceDelay = 50;
        
        
        void setup(){
        Serial.begin(115200);
        while(!Serial)
        ;
        
        Phpoc.begin(PF_LOG_SPI | PF_LOG_NET);
        websocket_server.beginWebSocket("login");
        Serial.print("WebSocket server address : ");
        Serial.println(Phpoc.localIP());
        
        pinMode(2, INPUT);
        
        }
        
        void loop(){
        PhpocClient client = websocket_server.available();
        
        if (client) {
        String ws_str = client.readLine();
        
        Serial.println(ws_str);
        }
        }
        Please compile and upload that code to Arduino, and then access login page in PHPoC Shield.
        The output in Serial Monitor should be like:
        log> sppc_begin: package 1.5.0
        log> sppc_begin: WiFi INFRA phpoc_wifi ch9
        log> sppc_begin: IPv4 192.168.0.234 255.255.255.0 192.168.0.1 8.8.8.8
        log> phpoc_server : listen 2/80
        WebSocket server address : 192.168.0.234
        google
        Please tell me the result and we can do the next step of debuging

        Comment


        • #5
          Hello Khanh,

          here is my IDE Serial Monitor display after downloading the code above in my Arduino Mega Board :


          log> sppc_begin: phpoc shield, firmware 1.5.0
          log> sppc_begin: package 1.5.0
          log> sppc_begin: WiFi INFRA pacsou ch1
          log> sppc_begin: IPv4 192.168.0.29 255.255.255.0 192.168.0.254 212.27.40.241
          log> phpoc_server : listen 2/80
          WebSocket server address : 192.168.0.29

          Comment


          • Khanh
            Khanh commented
            Editing a comment
            did you access login.php on PHPoC Shield before geting the above log ?

        • #6
          Hi, yes I can access login.php but always the same page where it is written Google, Login for Arduino with a rotating icon. However, I don't have a message asking me to reload the page.

          Comment


          • #7
            If so, there is no problem with network.
            Problem might be on Camera.
            In the original code, please add a Serial.println("debug point"); right after cameraInit(CT_JPEG, PR_160x120, JR_640x480); to check if this function block other operation or not?

            PS: I made this project not for commercial, therefore, the camera library may contain bugs that blocks operation in infinitive loop

            Comment

            Working...
            X