Menu

myFP2ESP8266 Management server on wifi not working

Jimboh2
2024-01-28
2024-01-31
  • Jimboh2

    Jimboh2 - 2024-01-28

    I can access via serial control and move the stepper as it should however when I try to access via wifi on ip:6060 I get to log in and then get a page that says 192.168.0.18 didn’t send any data. I can also use the windows app on this ip:6060, it connects but as soon as I try to change anything it disconnects. I have also tried enabling the TCPIP and the Web server but get nothing on 192.168.0.18. I have a good idea how these function work as I have had access to them on a ESP32 module I have been attempting to get working. I have full access to wifi management on that device.
    Was wondering as I have arduino with multiple versions including esp32, could one of the libraries be too new/wrong version. I am very confident I have the config and defines set up correctly.
    On a side issue. I have enabled Text display and connected a display but the display enable box in the serial management screens has the box greyed out, ie I cant change it.

     
  • brownrb

    brownrb - 2024-01-29

    Hi
    Some of what you stated I have no idea what you are saying, because I am lacking knowledge of what and how you are using things.

    I thought we were discussing the myFP2ESP32? but you started a heading with esp8266. Let me highlight the things I do not understand.

    You will just end up confused and angry if you are just try this, try that. That approach will get you nowhere at all in short order. You need to follow a precise guide as laid out in the PDF. When you come across something that does not work , that is the time to STOP, and post a query here. Again, going off target with oh I I try this is a recipe for failure.

    1. I can access via serial control
    The Serial mode in ESP8266 is really not a an option and will be deprecated in the next update
    When running in Serial mode you cannot use Wifi,

    2. I try to access via wifi on ip:6060 I get to log in and then get a page that says 192.168.0.18 didn’t send any data
    Did you forget to upload the data Skecth files.

    3. I can also use the windows app on this ip:6060, it connects but as soon as I try to change anything it disconnects.
    No you cannot do that. Port6060 is exclusive to a web browser. You cannot use tge Windows app to connect to Port6060.
    The Windows app can only connect to port 2020 which is the tcpip server. So to use the windows app you must have the tcpip server running on port 2020
    pdf page 123
    The Port will always be 2020 as this is the default port specified when programming the Controller.

    So
    Port 6060 - only used by Web browser to access the Management Server
    Port 2020 - used by Windows app or Linux App
    port 80 (default port) Used by Web browser to access user page of focuser

    1. Was wondering as I have arduino with multiple versions including esp32, could one of the libraries be too new/wrong version.
      I doubt that. They both share the same libraries and hence code.

    Please try to follow the steps in the PDF.
    Do one thing at a time.
    Chopping and changing and try this, try that will only end in frustration.
    I would suggest
    1. Download a fresh firmware zip file myFP2-Firmware-330.zip from the project site
    2. Resolve the issues of network first
    3. Use WiFi - NOT serial
    4. Load arduino ide v1.8.19 for the firmware myFP2-Firmware-330.ino
    5. In preferences set Compiler Warnings to None
    6. Enable tcpipserver and webserver in controller_config.h

    // To enable the TCPIP SERVER uncomment the following line
    #define ENABLE_TCPIP_SERVER  2
    
    // To enable the WEB SERVER uncomment the following line
    #define ENABLE_WEB_SERVER  3
    
    1. In controller_defines.h line 229 enable boot debugging
    #define BOOT_PRINT 1
    
    1. You will need to edit defines/station_defines.h to specify your WiFi network credentials
      char mySSID[64] = "yournetworkssid";
      char myPASSWORD[64] = "yournetworkpwd";

    // ALTERNATIVE NETWORK CREDENTIALS
    char mySSID_1[64] = "FireFox";
    char myPASSWORD_1[64] = "AllYeWhoEnter";

    1. Save the file defines/station_defines.h
    2. Now Reprogram controller, followed Immediately with the data sketch file upload

    If you get any arduino IDE warnings, stop and post the warning messages to me before going any further.

    Leave the arduino IDE 1.8.19 running. Open the serial monitor. Set the speed to 115200
    so you can see any debug or other messages.

    1. Open a web browser, enter in Ip address:6060
    2. You should see the management pages after username and password of admin
    3. Enable then start tcpip server and enable then start web server
    4. Open a new browser tab and enter Ip address without port number
    5. The user page should show

    If the pages are not shown then go back and upload the data sketch files again.

    if you see in the Serial Monitor that the controller keeps rebooting, you can use the add-on Exception Decoder (google) to determine where it is crashing.

    Use of address 192.168.0.18
    192.168.0.18 is the default login IP address used by many manufacturers of wireless routers and modems to access the admin panel. So you should not be using this and should think of a different network ip.

    regards
    Robert

     

    Last edit: brownrb 2024-01-29
  • Jimboh2

    Jimboh2 - 2024-01-30

    Thanks for the response and I am sorry to take up so much of your time in responding.

    I have reinstalled everything and followed your steps. I still get the same result when I open a browser window "192.169.0.18:6060 - didn’t send any data ". I did not get any exceptions in serial monitor after uploading but if I start the serial monitor quickly after uploading the file system I get an exception (4). Unfortunately when I invoke the exception decoder from tools I get an error

    gdbPath: C:\Users\jim\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp-elf-gdb\11.2_20220823/bin/xtensa-lx106-elf-gdb.exe

    ERROR: xtensa-lx106-elf-gdb.exe not found!

    So I will have to find a solution to that problem first
    I have attached a copy of the serial monitor o/p for info

     
    • brownrb

      brownrb - 2024-01-31

      Hi
      the exception log.
      When the Arduino IDE compiles a firmware, it generates a number of important files. which users really do not know (or need to know) about.

      The Exception decoder uses these generated files to try and trace where issues occured in the running firmware.

      because these generated files are on the user computer, another user on another computer cannot read or make sensor of a decode exception log. That means the log cannot apply to anyone else ecept the user that compiled the firmware. Any one else trying to use an exception log from someone is akin to an engish scolar trying to read some instructions written in an alien language.

      if I start the serial monitor quickly after uploading the file system

      Dont. I probably forget to mention this, my fault,

      So these are the steps
      Enable in controller_config.h

      #define CONTROLLERMODE  STATION
      #define ENABLE_TCPIP_SERVER  2
      #define ENABLE_WEB_SERVER  3
      

      In controller_defines.h

      #define BOOT_PRINT 1
      #define DEBUG_PRINT 1
      

      Then generate a new firmware (using Arduino 1.8.19) and upload it to the controller (via Menu Tools, ESP8266 LittleFS Data Upload)

      Next correct procedure is
      wait around 10seconds after the upload
      start serial monitor in Arduino IDE at correct speed 115200
      Next, press the reset button on the ESP32 which will restart the ESP32 and then you get a log of the bootup process.

      Next procedure is to
      Start Web browser (Use netscape because Edge has issues)
      The Url is your controller ip and port number
      192.168.0.18:6060

      Next, select the Serial Monitor window and select all the text, the copy past the text into a newtext file and post it please.

       

      Last edit: brownrb 2024-01-31
  • Jimboh2

    Jimboh2 - 2024-01-30

    Also for info the result of uploading file system:

     
  • brownrb

    brownrb - 2024-01-31

    I have taken a look at firmware myfp2esp8266_329-01

    Did you manage to compile this clean without error?
    Did you need to make changes to get the firmware to compile clean?

    At my loooking at 329_01 I noticed quite a few errors around Json and app defines variables.
    Did you encounter this?

    Another thing. please do not use Serial, There are a significant number of debug messages that get sent to the Serial port. Disabling Debug has no effect on these messages.

    Because the messages are there, it means that anything trying to connect to the Serial port, those apps also get sent these messages, whiic the apps do not kknow how to decode those messages, so the apps either timeout, generate an error message, or simply crash.

    As I had stated before the esp9266 Serial mode is deprecated in the next update

    regards
    Robert

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.