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

    UIflow P2P - getP2PData()

    UIFlow
    4
    6
    7.5k
    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
      markm
      last edited by

      Does anyone know how https://github.com/m5stack/m5-docs/blob/master/docs/en/uiflow/advanced.md#p2p works - is it ESPnow-like, or are the messages routed via some m5 cloud service? I don't manage to find the source code of it to see for myself yet.

      (I can't get it working, but I'm not sure if it's what I need anyway - I need the messages to work across different wifi networks via Internet.)

      I'm not sure if P2P Read blocks or not.

      PS: Where in UIFlow is simple 'serial print' ?

      1 Reply Last reply Reply Quote 0
      • R
        robalstona
        last edited by robalstona

        I never use this option, i think the messages was routed via m5cloud service (probably the same mechanism like upload uiflow program via web uiflow with destination device api key)

        You should find orange print block in Text tab. It will generate print(...) function code, but it print message via serial to usb (you should receive text in serial terminal on laptop/pc.

        1 Reply Last reply Reply Quote 0
        • P
          plusulli
          last edited by

          it would be nice if someone could show a working example here for connecting two M5stack Core with P2P

          1 Reply Last reply Reply Quote 0
          • sodokuS
            sodoku
            last edited by

            0_1609369034040_0c26d482-5d51-4b3b-8211-6cfd03cc039b-image.png

            This works for me. The upper part loops and asks for it's data every 500ms. The lower part sends a message if button A was pressed. They key must be set to the right key of the device to send to.

            1 Reply Last reply Reply Quote 0
            • P
              plusulli
              last edited by

              Thank you it works but you have to download it to the core if you only run it to try it out you get an error message.

              1 Reply Last reply Reply Quote 0
              • R
                robalstona
                last edited by

                If you download this code to device you should add block to connect to your wifi network

                advanced -> network -> wifi connect

                or

                advanced -> network -> connect to wifi ...

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