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

    LoraWAN868 demo error

    PRODUCTS
    2
    8
    6.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.
    • T
      tonyd
      last edited by

      Hi all

      Has anyone managed to get the Demo to work? I followed the instructions for OTAA on here [https://docs.m5stack.com/en/quick_start/lorawan/ttn](link url) and also just plonked in the DEMO code in MFFlow. The run button completes, but looking at the terminal output I get this error

      Connected to Serial Port!
      Traceback (most recent call last):
      File "flow/m5cloud.py", line 82, in _exec_fun
      File "<string>", line 7, in <module>
      File "unit.py", line 156, in get
      File "<string>", line 1, in <module>
      AttributeError: 'module' object has no attribute 'LoRaWAN'

      As far as I know the M5Flow site doesn't expose the libraries, so I can't look at them.

      Tony

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

        Hello @tonyd

        make sure you are running the latest UIFlow firmware version (e.g. 1.10.x) on your M5Stack device. (Use UIFLOW FIRMWARE BURNING TOOL from here.)
        Also make sure you only have one browser tab / window open at the same time which runs https://flow.m5stack.com.
        In addition make sure you have added the LoRaWAN868 unit with the + sign on the left side of the UIFlow browser window.

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 0
        • T
          tonyd
          last edited by

          Hi @felmue

          I had downloaded and burnt firmware, I downloaded the new beta burner and tried that. The unit I have added is LoRaWAN868, I used the default PORT A. The object I get is LoRaWAN868_0. I am using a Atom Lite and the error I now get is.

          *Traceback (most recent call last):
          File "<stdin>", line 6, in <module>
          File "unit.py", line 152, in get
          Unit: Please change unit LoRaWAN to other grove

          It seems like its telling me to select another Grove Port, but the only choices are PORT A and Custom. I will try and use a M5Stick CPlus and see if that works

          tony

          1 Reply Last reply Reply Quote 0
          • T
            tonyd
            last edited by

            @felmue

            I tried to re-burn the M5Stick with the beta burner and it made the device unstable in that the screen was scrambled and it kept disconnecting from UIFlow. I re-burned on the stable burner and it sorted that out. When I tried to download the Lora demo code, the stick screen displays
            'module' object has no atrribute 'LoRaWan'

            tony

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

              Hello @tonyd

              I've tried both M5Atom and M5StickCPlus with the older UIFlow firmware 1.9.8 and on both I get the same error as you do. However when I use the latest UIFlow firmware 1.10.x there is no error with both devices.

              My conclusion is that you must use the latest UIFlow firmware else it doesn't work.

              Two things you could try on your M5StickC or M5StickCPlus:

              • make sure you use the proper UIFlow firmware (there different for the non Plus and Plus version)
              • erase the firmware before burning the new one

              Thanks
              Felix

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

              1 Reply Last reply Reply Quote 0
              • T
                tonyd
                last edited by

                hi @felmue

                Thanks for then help. I have stuck with the Atom and re-installed v1.10.2 and still get

                Traceback (most recent call last):
                File "<stdin>", line 6, in <module>
                File "unit.py", line 152, in get
                Unit: Please change unit LoRaWAN to other grove

                I'll leave it a while and try again after a re-boot in case anything is cached

                Tony

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

                  Hello @tonyd

                  hmm, I really don't understand why you would get the Unit: Please change unit LoRaWAN to other grove error. Both M5Atom and M5StickC(Plus) only have one Groove port.

                  That said, I found that sometimes switching between different M5Stack devices can cause strange errors. I always reload the UIFlow browser page to make sure and then start over adding the unit and the UIFlow code.

                  BTW: I do not have the LoraWAN686 unit - therefore I cannot fully test the functionality - I can only say that I do not get any errors and I can see the generated AT commands on the serial line.

                  Thanks
                  Felix

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

                  1 Reply Last reply Reply Quote 0
                  • T
                    tonyd
                    last edited by

                    Hi @felmue

                    I got a bit further. Instead of just using the demo app, I built the app up step by step from the separate unit components and put debug prints on each step. I have now got the code printing a message at the top of the loop containing the two if/do statements. So for me it seems that taking the demo code was the problem. I don't know why though as I essentially built the same code block by block. The next problem is that Things Network is not letting me in. I think I will have to switch to the arduino IDE as there is a bit more control over debugging there

                    Tony

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