🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    UIFlow places WiFi connection code in the wrong place

    Bug Report
    4
    5
    8.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SlartibartfastS
      Slartibartfast
      last edited by

      I'm trying to make a robust wifi connection flow for unattended use. To do this I need to put the wifi connect commands inside a conditional so that I can test/handle/etc.

      Here's a simple example to demonstrate the issue

      A simple flow with the wifi connect widget in the correct place (inside a conditional):
      grab1

      ...and here is the resulting python code. Note WiFi.doConnect has moved to the top of the python code block instead of inside the else statement:
      grab2

      If I move the doConnect to the correct place the code works as I expect and there are no errors.

      I have tried this with doConnect and AutoConnect with the same result.

      W 1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hi @Slartibartfast

        I am seeing the same. I guess it's a bug.

        Interestingly, when I replace the Connect to Wi-Fi ... block with an Execute code: wifiCfg.doConnect('myAP', 'myPW') block the block stays within the else statement.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        SlartibartfastS 1 Reply Last reply Reply Quote 0
        • SlartibartfastS
          Slartibartfast @felmue
          last edited by

          @felmue Interesting. I had not tried that. Good workaround until this gets fixed for realz.

          Thanks!

          1 Reply Last reply Reply Quote 0
          • alperianA
            alperian
            last edited by

            Hi
            it seems wifi block handling not completely finished at UIFlow .
            also i need wifi.RSSI level
            0_1608525709701_m5 wifi1.JPG
            0_1608525767154_m5 wifi2.JPG

            1 Reply Last reply Reply Quote 0
            • W
              wsanders @Slartibartfast
              last edited by wsanders

              @slartibartfast Hate to bump an old topic but this is a problem for me still. The "Original Network Function" blocks place the calls to the wlan class correctly but they don't actually work. This is UIFlow 1.9.6 now. It makes it impossible to use the program except in the coverage area of the SSID hard coded into the program.

              For a workaround, you can manually relocate the call to doConnect inside the loop or function where you want it. You can save that, and when you upload the program to the device it seems to send the modified python.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post