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

    [fixed]atomlite 1.9.7 name 'wlan' isn't defined

    Micropython
    2
    4
    5.4k
    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.
    • M
      mm-uiflow
      last edited by mm-uiflow

      if i use the original network functions i get:

      Traceback (most recent call last):
      File "flow/m5cloud.py", line 82, in _exec_fun
      File "<string>", line 39, in <module>
      NameError: name 'wlan' isn't defined
      i want to check what ip adress etc is set.

      all original network functions dont work. Smart config the same

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

        Hello @mm-uiflow

        I've tried UiFlow firmware 1.9.7 and 1.9.8 and with below commands (copied from the Python tab in flow.m5stack.com) I can print IP address etc.

        from m5stack import *
        from m5ui import *
        from uiflow import *
        import network
        
        wlan = network.WLAN(network.STA_IF)
        print(wlan.ifconfig())
        

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 1
        • M
          mm-uiflow
          last edited by

          @felmue said in atomlite 1.9.7 name 'wlan' isn't defined:

          wlan = network.WLAN(network.STA_IF)
          print(wlan.ifconfig())

          if i just use the python code like you it works. Maybe i should create a custom block for that

          1 Reply Last reply Reply Quote 0
          • M
            mm-uiflow
            last edited by

            wlan = network.WLAN(network.STA_IF) is 0_1654418854491_a0cdea9b-ae52-4361-82e6-68b7f114500a-image.png

            i didnt used create station interface because of that wlan wasnt defined!

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