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

    How to get Device infos from m5stack Devices

    General
    8
    23
    53.2k
    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.
    • m5stackM
      m5stack
      last edited by

      we didn't open-source all firmware code.

      this function would add it in the next version. we will release it this week or next week.

      the API would be like that

      import deviceCfg
      deviceCfg.get_board_name() 
      
      M 4 Replies Last reply Reply Quote 0
      • M
        Medy @m5stack
        last edited by Medy

        @m5stack

        Alright.

        Guess I will just have to ask again in a couple weeks in case the function doesnt show up somewhere in the uiflow repo.

        Thanks for adding the stuff

        1 Reply Last reply Reply Quote 0
        • M
          Medy @m5stack
          last edited by Medy

          @m5stack

          btw I just ordered the new e-ink model ....

          I havent messed with deep sleep yet ... is there somewhere I can read up on sleep modes and how to use them with the m5stack ?
          I was hoping I could use the ink model efficiently by geting data via wifi once a day and then power it down and wake up automaticall if thats possible ?

          If I remember correctly the esp32 should be able to do this right ?

          1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3
            last edited by ajb2k3

            There is a way to get the information as M5Burner queries the information before attempting to erase the firmware.

            Look at esptool.py and see how it queries the port.

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            M 1 Reply Last reply Reply Quote 0
            • M
              Medy @ajb2k3
              last edited by Medy

              @ajb2k3 said in How to get Device infos from m5stack Devices:

              There is a way to get the information as M5Burner queries the information before attempting to erase the firmware.

              Look at esptool.py and see how it queries the port.

              I have no idea what you are talking about.

              I just wondered if deep sleep works out of the box on m5stack like described here :?
              deep sleep esp32

              or if there is anything else I need to look out for. I just want :
              1- make device sleep
              2-wake up after 24 hrs
              3 - run script
              4- repeat

              So I could put it somewhere on a single charge ... and it would maybe last a month or more

              Edit .. nvm I think you were still talking about the device info .. myy bad ..
              Already marked this as solved in my head ... as I will just wait for the update as @m5stack mentioned ... and use that for device info.

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

                Hello @Medy

                a word of advise regarding deep sleep: while the ESP32 chip by itself consumes very little energy in deep sleep (in the microamps range) a complete M5Stack device with its internal overhead of voltage regulators still takes a couple of milliamps even with the display off.

                According to the schematics the new CoreInk model uses a similar internal structure, first boosting the battery voltage up to 5 volts (boost IC) and then reduce it back down to 3.3 volts (step down IC). Both are lossy conversions.

                As already mentioned in other posts, M5Stack devices are made for educational purposes and not primarily trimmed for real low power consumption, at least not in a sense of what an ESP32 could achieve.

                So I'd be surprised if you could get more than a couple of days deep sleep out of one battery charge.

                That said, I don't yet own an CoreInk model so my conclusions for that model could be completely wrong. For the other models (M5Stack, M5StickC and M5Core2) I made some measurements while in light or deep sleep. You can find the results though the link in my signature.

                Thanks
                Felix

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

                M M 2 Replies Last reply Reply Quote 0
                • M
                  Medy @felmue
                  last edited by Medy

                  @felmue

                  thanks for the heads up ... I would hope that they made some kind of effort in that regard ... for this particular model.... if anywhere .. I would expect it here..

                  Quote :
                  ", RTC(BM8563) for controlling accurate timing and deep sleep funcionality. "

                  Sure its educational ... so it will be worth to me regardless...

                  if not ... it will still be good to get me started for maybe my own project with a regular esp32 or smth...

                  E-ink combined with low power is intersting to me .
                  Already had my eye on a combination of waveshare e-ink displays combined with a esp32 setup....

                  So this is a good start ;)

                  1 Reply Last reply Reply Quote 0
                  • M
                    Martin8bity @felmue
                    last edited by

                    @felmue Do you have CoreInk schematic? I cannot find it. Eg. pin 35 seems to be used to measure battery voltage in samples, but no word in docs. Also DeepSleep seems to be supported in some newer unreleased libraries and does not work whne CoreInk is on USB power.

                    ajb2k3A 1 Reply Last reply Reply Quote 0
                    • ajb2k3A
                      ajb2k3 @Martin8bity
                      last edited by

                      @martin8bity said in How to get Device infos from m5stack Devices:

                      @felmue Do you have CoreInk schematic? I cannot find it. Eg. pin 35 seems to be used to measure battery voltage in samples, but no word in docs. Also DeepSleep seems to be supported in some newer unreleased libraries and does not work whne CoreInk is on USB power.

                      There are no know schematics for the coreink however I have been trying to create some.

                      UIFlow, so easy an adult can learn it!
                      If I don't know it, be patient!
                      I've ether not learned it or am too drunk to remember it!
                      Author of the WIP UIFlow Handbook!
                      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

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

                        Hello @Martin8bity

                        only what has been published as overview schematics. And yes, GPIO35 seems to have been assigned to read the battery voltage.

                        Thanks
                        Felix

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

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          Medy @m5stack
                          last edited by Medy

                          @m5stack said in How to get Device infos from m5stack Devices:

                          we didn't open-source all firmware code.

                          this function would add it in the next version. we will release it this week or next week.

                          the API would be like that

                          import deviceCfg
                          deviceCfg.get_board_name() 
                          

                          I installed the latest firmware so was it included ? What is the name of the funciton ?
                          Can I rely on this working across all devices ? otherwise I may just need to let the user name devices themselves. ;)

                          1 Reply Last reply Reply Quote 0
                          • M
                            Martin8bity @felmue
                            last edited by

                            @felmue Thank you. The overview schematic is not complete and dos not contain enough information.
                            @m5stack It is very hard to develop anything for your devices if your libraries are incomplete, buggy and poorly documented (sorry, but they are) and the detailed schematic is non existent. Either create a working libraries or allow people to do it themselves, which is really hard without schematic. Without this I cannot use your devices in my projects (I have thousands of users, who buy your products just because of my projects). I do it for free asn Open Source. I am excited with all new product and I am also big evengelist for the M5Stack, but with more and more products I spent tens of hours just by finding how it works and I am starting to be frustrated from it. Sad.

                            1 Reply Last reply Reply Quote 0
                            • hpsaturnH
                              hpsaturn @m5stack
                              last edited by

                              @m5stack said in How to get Device infos from m5stack Devices:

                              you could refer to this program to get the battery status info:

                              https://github.com/m5stack/M5StickC/tree/master/examples/Basics/AXP192

                              but before you compile it. you need to download the M5StickC-Plus lib for you device. and change the program include code.

                              https://github.com/m5stack/M5StickC-Plus

                              Hi, thanks for you answer,

                              But is secure that use this files, the AXP192 library files from StickC in the CoreInk board? I did see that in axp.begin() method you enable some voltages but the board is different, maybe I could be damage my CoreInk?

                              1 Reply Last reply Reply Quote 0
                              • M
                                Medy @m5stack
                                last edited by Medy

                                @m5stack I tried the

                                import deviceCfg
                                deviceCfg.get_board_name() 
                                

                                it throws an error ....

                                Traceback (most recent call last):
                                
                                  File "<stdin>", line 1, in <module>
                                
                                  File "deviceCfg.py", line 270, in get_board_name
                                
                                TypeError: string indices must be integers, not str
                                

                                I tested all the other functions of deviceCfg and they all work ...
                                but the one I asked you to add does not....

                                hanks for implementing it .. but it doesnt work ;)

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

                                  Hello @Medy

                                  which M5Stack device did you try?

                                  I've just tested all of my M5Stack devices using UIFlow 1.8.7 and below code successfully (except M5StampPico which returns an incorrect name).

                                  import deviceCfg
                                  print(deviceCfg.get_board_name())
                                  

                                  Results for various M5Stack devices running UIFlow 1.8.7 firmware:

                                  M5Stack Gray : core
                                  M5Core2      : Core2
                                  M5StickC     : StickC
                                  M5StickCPlus : StickC-Plus
                                  M5CoreInk    : CoreInk
                                  M5Paper      : paper
                                  M5Atom       : Atom
                                  M5StampPico  : Atom
                                  

                                  Thanks
                                  Felix

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

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    Medy @felmue
                                    last edited by

                                    @felmue I tried the core gray

                                    guess I will try again and report back if it works.

                                    Ideally the the new m5 stamps will works as well with coming updates ?

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