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

    Crashes / exception with atomlite

    Scheduled Pinned Locked Moved Micropython
    3 Posts 1 Posters 5.1k 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

      Hey guys, i have used "try" around my i2c loop and mqtt to get the error and try to recover from it. how ever struggeling to fix it( i heard from an alternative mqtt library but i wanted to know if you guys have another idea)
      Here you see my grafana graph. Loop gets increased after every "readvalues loop function" (mqtt )
      0_1655364569251_2022-06-16 09_14_00-.png
      After these about 3000 loops it resets.

      Here is the flow:
      0_1655364678135_c95cbf93-e82e-41c2-91f4-8c6ff657e379-image.png
      And this( bottom of the read values function) :
      0_1655364740486_c9a090e4-4732-476b-9702-d0a7bdbd4639-image.png

      Serial console:
      [9362069] MQTTException -> Server close socket link
      reconnect start ...
      reconnect finish ...
      [9366820] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9371201] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9376101] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9380496] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9385483] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9389926] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9394818] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9399401] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9404361] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9408826] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9413730] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9418185] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9423081] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9427470] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9432469] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      [9437051] MQTTException -> -110
      reconnect start ...
      reconnect finish ...
      rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

      [9365685] MQTTException -> Server close socket link
      reconnect start ...
      rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

      i get -104 mqtt exception and -110. i dont get to except it and try to stop the mqtt, wait a sec and start again. The wifi signal is good and its 1 m to the AP on this Atom ( not like in the other thread)

      0_1655364913415_665a6fa0-0928-4cfc-84a8-01f63193872d-image.png

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

        i found out when i set mqtt's QoS to 0. i have loops over 20k and higher. So no exceptions anymore ( it was memory alloc exception before).

        i want to use QoS 1. QoS 1 sends a message with a packet id see code below.
        What is the max interger value of micropython / uiflow? It seems like its crashing near the packetid value "65000"

        0_1657179246667_24e5b69c-a38a-4045-a11a-a8ae61635024-image.png

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

          it fixed my problem with the crashes, but now i have no QoS 1

          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