🤖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

    Scheduled Pinned Locked Moved Micropython
    4 Posts 2 Posters 7.4k Views
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post