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

    Arduino get_apikey()

    SOFTWARE
    3
    5
    3.6k
    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.
    • P
      PocketDonkey
      last edited by

      Hello,

      I am working with an M5StickCplus.

      In micropython one can obtain a unique device ID like this:

      import deviceCfg
      deviceCfg.get_apikey()

      How does one get this same key in Arduino? Is this only a feature of UIFlow or is there some equivalent other hex identifier?

      Thx, PD

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

        You don’t, the api key is only used by UIFlow to program the controller and is generated in the UIFlow/Micropython firmware. Arduino wipes the firmware and works on a lower level to Micropython

        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
        • P
          PocketDonkey
          last edited by

          Thanks @ajb2k3. Do you happen to know if there is any way to obtain a char[] or int that is unique to each M5stickC in Arduino? If one has many devices sending data over wifi, is there any way to tell them apart other than hardcoding a string or using a hardcoded IP address? Cheers, PD

          1 Reply Last reply Reply Quote 0
          • H
            holofloh
            last edited by

            the IP Adress is not hard coded when using DHCP to obtain it. Do you mean the hardware MAC adress? It is (theoretical) unique on every piece of network hardware.
            WiFi.macAddress()

            P 1 Reply Last reply Reply Quote 0
            • P
              PocketDonkey @holofloh
              last edited by

              @holofloh Thanks, this is exactly what I was looking for. PD

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