Menu

Wemos D1 R32 station mode can't connect

Jaime
2023-05-21
2023-05-30
  • Jaime

    Jaime - 2023-05-21

    Hello,

    I have a Wemos D1 R32 board and wanted to test if it works before buying sensors. I installed the mySQM+ firmware and uploaded the data with the sketch uploader. When the controller works in "access point" mode I can connect by wifi but in "station" mode I can't. I get an error message titled "myESP32DB" saying: "Socket Connection Exception - Failed to connect". Could you help me? Could it be because I don't have any sensor connected?

     
  • brownrb

    brownrb - 2023-05-22

    Hi Jamie

    I dont think a missing sensor would cause that.

    You said
    myESP32DB

    but this site here is for mySQM+ controllers. So I am having a little trouble understanding what is going on. A little more info could be beneficial.

    Is it an SQM+ controller?
    What firmware and version was uploaded to the board?
    What were the focuser config settings? what has been enabled?
    Are you sure that the controller board is connecting to your local network?
    How are you trying to connect? web browser? windows app? ascom oc driver?
    To what are you connecting to? web server, tcpip server, management server etc

    Regards
    Robert

     
    • Jaime

      Jaime - 2023-05-22

      Hello, Robert,

      I want to make a weather station to connect with NINA through ASCOM.

      I have some experience in other projects with Arduino: focuser, OnStep,
      telescope cover) but I can't get mySQM+ to work.

      I will try to answer your questions to see if you can help me. Thanks in
      advance!

      1.Hardware: Wemos D1 R32
      1. Firmware: I have downloaded from
      https://sourceforge.net/projects/mysqmproesp32/files/FIRMWARE/
      the file "mysqmplus firmware-135-02.zip". (Is this server correct?)

      From that file I have unzipped the one called "mysqmplus_135_02". Then I
      have configured the "STATION" mode and created the wificonfig.json file in
      the data folder. Then I installed the libraries and set board to ESP32 Dev
      module and uploaded with Arduino IDE 1.8.19 the file "mysqmplus_135_02" and
      finally I uploaded the last process with "Tools > ESP32 sketch data
      upload". So far there is no error messages.

      What were the focuser config settings? what has been enabled? -> I do not
      understand this. Could you explain it to me better please?
      How are you trying to connect? web browser? windows app? ascom oc driver? -> I
      have tried all but none work. I can only connect if I set the access point
      mode.
      Are you sure that the controller board is connecting to your local network?
      -> Yes, I confirm that from my router.
      To what are you connecting to? web server, tcpip server, management server
      etc -> I try to connect to webserver and tcpip. I think they are well
      activated in the firmware.

      From controller_config.h:

      // ACCESSPOINT ENABLE/DISABLE
      // If configuring as ACCESSPOINT enable this option
      // Edit defines/softap_defines for ACCESSPOINT TCP/IP values, WiFi
      SSID-PASSWORD values
      // --------------------------------------------------------------------
      // remove comment to enable as ACCESSPOINT
      //#define CONTROLLERMODE ACCESSPOINT

      // --------------------------------------------------------------------
      // STATION ENABLE/DISABLE
      // If configuring as STATION enable this option
      // Edit defines/station_defines.h for other settings, TCP/IP values, and
      // WiFi login SSID-PASSWORD values
      // --------------------------------------------------------------------
      // remove comment to enable as STATION

      define CONTROLLERMODE STATION

      // Select ONE, either DYNAMICIP (default) or STATICIP (1 of them must be
      enabled)

      // IP address specified by network device and can change

      define IPADDRESSMODE DYNAMICIP

      // IP address specified by controller - must be defined correctly
      //#define IPADDRESSMODE STATICIP

      // to enable reading SSID and PASSWORD from file wificonfig.json
      // at boot time, uncomment next line

      define READWIFICONFIG 1

      // --------------------------------------------------------------------
      // SERVERS ENABLE/DISABLE
      // --------------------------------------------------------------------
      // to enable the Management Server interface [Port 6060], uncomment next
      line

      define MANAGEMENTSERVER 2

      // The TCP/IP Server handles requests from the Windows and Linux
      applications
      // to enable the TCP/IP server [Port 2121], uncomment next line

      define TCPIPSERVER 3

      // to enable the Web Server interface [Port 80], uncomment next line

      define WEBSERVER 4

      // Debug Server interface [Port 9090] cannot be disabled
      //#define DEBUGSERVER 5

      Thanks in advance Robert!

      El lun, 22 may 2023 a las 19:53, brownrb (brownrb@users.sourceforge.net)
      escribió:

      Hi Jamie

      I dont think a missing sensor would cause that.

      You said
      myESP32DB

      but this site here is for mySQM+ controllers. So I am having a little
      trouble understanding what is going on. A little more info could be
      beneficial.

      Is it an SQM+ controller?
      What firmware and version was uploaded to the board?
      What were the focuser config settings? what has been enabled?
      Are you sure that the controller board is connecting to your local network?
      How are you trying to connect? web browser? windows app? ascom oc driver?
      To what are you connecting to? web server, tcpip server, management server
      etc

      Regards
      Robert


      Wemos D1 R32 station mode can't connect
      https://sourceforge.net/p/mysqmproesp32/discussion/general/thread/41a4c83d96/?limit=25#9d59


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/mysqmproesp32/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Jaime González López

       
  • brownrb

    brownrb - 2023-05-23

    Hi again

    In controller_defines.h enable
    DEBUG_PRINT
    BOOT_PRINT
    ERROR_PRINT
    then save it

    in controller_config.h make sure these are enabled
    MANAGEMENTSERVER
    TCPIPSERVER
    WEBSERVER
    DEBUGSERVER

    Connect controller using usb cable
    Load Arduino IDE with project file - xxx.ino
    Open Serial Port Monitor in Arduino IDE, set speed to 9600
    Close Serial Port Monitor
    Program controller with the firmware
    Upload the sketch data files
    Wait 10s
    Open the Serial Port Monitor
    Press the reboot button On the ESP32 chip/board
    You will see all the boot, load. start messages
    See if the controller connects to your Wifi network
    If it does it will list an IP address for the controller
    If all goes well and it is running
    Open web browser, goto IP address as shown in the Serial Port Monitor window when the controller rebooted
    if the address was 192.168.2.22 then add the correct port which is 6060 so the URL you use in the web browser is
    192.168.2.22:6060
    which should pop up a login window. Name and Password found in file defines/management_defines.h
    which is
    admin
    admin

    If you get that far, then you can see that on admin page 1 SERVERS that the Web server is Not enabled and NOT Runnning,
    If you intend to use the web server on port 80, then you need to
    enable it, then
    start it
    After that you get to the user web page by
    192.168.2.22

    regards
    Robert

     

    Last edit: brownrb 2023-05-23
    • Jaime

      Jaime - 2023-05-23

      Hi Robert,

      I have tried the changes. I think it is reducing where the problem is. But
      it still doesn't work. I think everything is fine until I try to connect to
      the server.

      I send you the Serial monitor contect after reboot and an image of data
      folder.

      rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
      configsip: 0, SPIWP:0xee
      clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
      mode:DIO, clock div:1
      load:0x3fff0018,len:4
      load:0x3fff001c,len:1216
      ho 0 tail 12 room 4
      load:0x40078000,len:10944
      load:0x40080400,len:6388
      entry 0x400806b4
      mysqm+ start
      READ CONFIG SETTINGS
      INIT VARS
      START STATION
      SSID: Casa Deco2
      TCPIP address : 192.168.1.149
      SubnetMask: 255.255.255.0
      Gateway: 192.168.1.1
      DNS 1: 77.26.11.233
      DNS 2: 212.142.173.65
      START DEBUG SERVER
      debug server is running
      MAC: 94:B9:7E:FB:36:B8
      START SYSTEM UP TIME
      START I2C
      START TSL2591
      err tsl2591 not found
      START TCP/IP SERVER
      START WEBSERVER
      START MANAGEMENT SERVER
      START STATIC GPS
      setup end
      Controller is running

      I wrote the next address in Chrome navigator: 192.168.1.149:6060 but
      cant connect (I tried 192.168.1.149:80 with the same result 😕).

      [image: image.png]

      Image of files in data folder

      [image: image.png]

      Do you have more ideas?

      El mar, 23 may 2023 a las 13:34, brownrb (brownrb@users.sourceforge.net)
      escribió:

      Hi again

      In controller_defines.h enable
      DEBUG_PRINT
      BOOT_PRINT
      ERROR_PRINT
      then save it

      in controller_config.h make sure these are enabled
      MANAGEMENTSERVER
      TCPIPSERVER
      WEBSERVER
      DEBUGSERVER

      Connect controller using usb cable
      Load Arduino IDE with project file - xxx.ino
      Open Serial Port Monitor in Arduino IDE, set speed to 9600
      Close Serial Port Monitor
      Program controller with the firmware
      Upload the sketch data files
      Wait 10s
      Open the Serial Port Monitor
      Press the reboot button On the ESP32 chip/board
      You will see all the boot, load. start messages
      See if the controller connects to your Wifi network
      If it does it will list an IP address for the controller
      If all goes well and it is running
      Open web browser, goto IP address as shown in the Serial Port Monitor
      window when the controller rebooted
      if the address was 192.168.2.22 then add the correct port which is 6060 so
      the URL you use in the web browser is
      192.168.2.22:6060
      which should pop up a login window. Name and Password found in file
      defines/management_defines.h
      which is
      admin
      admin


      Wemos D1 R32 station mode can't connect
      https://sourceforge.net/p/mysqmproesp32/discussion/general/thread/41a4c83d96/?limit=25#5fb3


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/mysqmproesp32/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • brownrb

        brownrb - 2023-05-23

        I wrote the next address in Chrome navigator: 192.168.1.149:6060 but
        cant connect (I tried 192.168.1.149:80 with the same result 😕).

        trying the Web server on port 80 will not work, because it is disabled. only the Management server can enable it

        so the url of 192.168.1.149:6060 would be the address of the management server.

        Curiousity: Have u tried a different web broswer like Edge?

        The start messages show that the controller restarted, logged on and started what it was meant to start. The issue seems to point to a network issue. Ping is pretty much useless here.

        You could try the Advanced IP Scanner and Advanced Port Scanner programs, the port scanner should be able to detect what ports are available on 192.168.1.149
        A search on google will reveal the location for download. These are free

        You could try ACCESSPOINT MODE. Then connect to that AP on the ESP32, and try the management server again. If that works, then it would seem to point to a network issue.

        regards
        Robert
        Sorry, sleep deprived, its already day break now

         
        • Jaime

          Jaime - 2023-05-30

          Hello, Robert,

          Thanks to your comments I was testing different configurations of my local
          network. It is fixed! everything works!

          Thank you so much for your help

          El mar, 23 may 2023 a las 22:41, brownrb (brownrb@users.sourceforge.net)
          escribió:

          I wrote the next address in Chrome navigator: 192.168.1.149:6060
          http://192.168.1.149:6060 but cant connect (I tried 192.168.1.149:80
          http://192.168.1.149:80 with the same result 😕).

          trying the Web server on port 80 will not work, because it is disabled.
          only the Management server can enable it

          so the url of 192.168.1.149:6060 would be the address of the management
          server.

          Curiousity: Have u tried a different web broswer like Edge?

          The start messages show that the controller restarted, logged on and
          started what it was meant to start. The issue seems to point to a network
          issue. Ping is pretty much useless here.

          You could try the Advanced IP Scanner and Advanced Port Scanner programs,
          the port scanner should be able to detect what ports are available on
          192.168.1.149
          A search on google will reveal the location for download. These are free

          You could try ACCESSPOINT MODE. Then connect to that AP on the ESP32, and
          try the management server again. If that works, then it would seem to point
          to a network issue.

          regards
          Robert
          Sorry, sleep deprived, its already day break now


          Wemos D1 R32 station mode can't connect
          https://sourceforge.net/p/mysqmproesp32/discussion/general/thread/41a4c83d96/?limit=25#5fb3/ff07/2eb8


          Sent from sourceforge.net because you indicated interest in
          https://sourceforge.net/p/mysqmproesp32/discussion/general/

          To unsubscribe from further messages, please visit
          https://sourceforge.net/auth/subscriptions/

           

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.