Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Pymesh crashes Lopy

    Scheduled Pinned Locked Moved Firmware
    20 Posts 7 Posters 914 Views 6 Watching
    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.
    • A Offline
      andreas @robert-hh
      last edited by andreas

      Hi there,

      @robert-hh said in Pymesh crashes Lopy:

      No python script should cause a crash dump.

      I believe the Python snippets outlined within this topic by @Jordan-Reyes and @Danne will perfectly work for many people.

      Unfortunately, I haven't been able to create and publish a short and concise Python program which deterministically reproduces the indeterministic core panics some people are observing in various conditions. In fact, many things are involved here beyond the sole scope of the MicroPython interpreter.

      While I can't say this matches the observations of @Jordan-Reyes and @Danne in this particular case, the issues are going down to the silicon level. To be clear on that detail: Let's not blame Pycom here, I believe they are doing a great job of keeping things running but the nitty gritty details within "turtles all the way down" are more than overwhelming.

      @robert-hh said in Pymesh crashes Lopy:

      For some people it causes the firmware to crash, which in turn points at bugs in the firmware.

      That is probably the case here. We have investigated potential issues thoroughly during the past two months and tried to report about them as good as possible on [1].

      However, wrapping things up requires more dedication and we are running out of everything on these details. So, I am currently trying to get in touch with @daniel and @Xykon in order to discuss further details. Maybe @catalin is also the right person to talk to as I just found out he is also member of Pycom [2].

      With kind regards,
      Andreas.

      [1] https://community.hiveeyes.org/t/investigating-random-core-panics-on-pycom-esp32-devices/2480
      [2] https://github.com/orgs/pycom/people

      1 Reply Last reply Reply Quote 0
      • A Offline
        andreas @catalin
        last edited by

        Hi there,

        @catalin said in Pymesh crashes Lopy:

        Since 1.20.0.rc9, the Pymesh component was excluded from development firmware releases.

        I have not been aware of that detail. Thanks for telling us, @catalin. That said, I am afraid you will not have any fun with the custom builds coming from our pen unless the updates might have been mainlined.

        So, sorry for the noise everybody!

        With kind regards,
        Andreas.

        1 Reply Last reply Reply Quote 0
        • R Offline
          ricardolima
          last edited by

          @catalin
          Hello all,
          i'am trying to implement a mesh using your new release and I had tried to send a message from one node to the border router. But I think i'am getting some problem in configuring the border router.
          To configure the border router I uncommented "pymesh.br_set(PymeshConfig.BR_PRIORITY_NORM, new_br_message_cb)", "new_br_message_cb" function, connected the device to the wifi and running the codes it returns

          State: True BR:  []
          Force add BR
          BR:  [(net='2001:cafe:cafe:cafe::/64', preference=0)]
          done Pymesh init, forever loop, exit/stop with Ctrl+C multiple times
          

          Which seems like it is working. But now I have two problem:
          1 - It is getting blocked (the node br)

          Neighbors: Router MAC 0x70B3D5499F8MASTER, rloc16 0x7800, coord (51.45, 5.45313), neigh_num 1, ts 126
          MAC 0x70B3D5499SENDER, rloc16 0x3000, role 3, rssi -16, age 98
          

          And this does not pass from where.. it is really blocked, even if I press enter it does not change anything.

          2 - Then in the other node, the one how is spamming messages I tried

          while True:
              #print("sent to br")
              #ip = "1:2:3::4"
              #port = 5555
              #pymesh.send_mess_external(ip, port, "Hello World number 2)
              pymesh.send_mess(0x70B3D5499F8DBDD0, "Hello World number 2")
              time.sleep(3)
          

          the option with pymesh.send_mess was working, but then it stopped and I don't know why .. using the function pymesh.send_mess_external it gives the error "no BR (mesh-external IPv6) found"

          Any idea ? sorry for the long post

          Thank you

          catalinC 1 Reply Last reply Reply Quote 0
          • catalinC Offline
            catalin @ricardolima
            last edited by

            @ricardolima After declaring the BR, do you see in the network the nodes starting to have a new IPv6 unicast address with prefix `2001:cafe:cafe:cafe:'?

            The error no BR (mesh-external IPv6) found comes from not being able to find this ipv6 prefix.

            If this is the case, probably I should start investigating this issue.

            Catalin,

            Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io
            Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              ricardolima @catalin
              last edited by

              @catalin
              the node sending to the br says

              Role 4, Single False, IPv6: ['fdde:ad00:beef:0:0:ff:fe00:fc00', 'fdde:ad00:beef:0:0:ff:fe00:1400', 'fdde:ad00:beef:0:0:0:0:3bda', 'fdde:ad00:beef:0:cb3d:2abf:bcb3:839', 'fe80:0:0:0:72b3:d549:9b77:3bda']
              Neighbors: Router MAC 0x70B3D5499B773BDA, rloc16 0x1400, coord (51.45, 5.45313), neigh_num 1, ts 485
              MAC 0x70B3D5499777124D, rloc16 0x5800, role 3, rssi -26, age 11
              

              And the br says

              Role 3, Single False, IPv6: ['fdde:ad00:beef:0:0:ff:fe00:5800', 'fdde:ad00:beef:0:0:0:0:124d', 'fdde:ad00:beef:0:6b76:e43d:813b:f49d', 'fe80:0:0:0:72b3:d549:9777:124d']
              

              What do you think? it is a issue?

              Thank you

              1 Reply Last reply Reply Quote 0
              • R Offline
                ricardolima
                last edited by

                @catalin
                No news about this ?
                Happy new year for all

                catalinC 1 Reply Last reply Reply Quote 0
                • catalinC Offline
                  catalin @ricardolima
                  last edited by

                  @ricardolima
                  Sorry for the late answer. I am investigating this, seems from the last openthread update, some BR functionality fails.

                  Catalin,

                  Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io
                  Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    ricardolima
                    last edited by

                    @catalin Ok thank you.
                    Waiting for news :D

                    catalinC 1 Reply Last reply Reply Quote 0
                    • catalinC Offline
                      catalin @ricardolima
                      last edited by

                      @ricardolima
                      Yes, the BR functionality was re-factorized in a new module, and it was fixed.
                      LoRaWAN coexistence with Pymesh, is also being exposed in the micropython API.
                      Refreshing the base software (probably esp32 idf v.3.3.1) will also be integrated.
                      I am targeting this week(Th) to re-release Pymesh.

                      Catalin,

                      Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io
                      Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        ricardolima
                        last edited by

                        Ok thank you ! You will resend the file to all users that have asked permission to use Pymesh ?

                        catalinC 1 Reply Last reply Reply Quote 0
                        • catalinC Offline
                          catalin @ricardolima
                          last edited by

                          @ricardolima Yes, I'll make an email list with everyone that already signed the licence.

                          Catalin,

                          Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io
                          Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

                          J 1 Reply Last reply Reply Quote 0
                          • J Offline
                            jclo13 @catalin
                            last edited by

                            hello @catalin, I I have followed the procedures to download the latest firmware through Pybytes and I am using pymesh microphyton API, the problem I have is that with the following code the system chashes or not connect whit the other nodes, I do not know if it is a firmware problem or what it is due to, I will appreciate your help.

                            from network import LoRa
                            from mesh import LoraMesh
                            import ubinascii
                            import socket
                            import utime
                            from  LoraWan import lorawan
                            import cayenneLPP
                            import config
                            import machine
                            from machine import SD
                            
                            pycom.rgbled(0x0000ff)                  #blue
                            time.sleep(0.2)
                            
                            pycom.rgbled(0x000000)
                            
                            sd = SD()
                            os.mount(sd, '/sd')
                            f= open('/sd/reenvio.csv', 'a+')
                            r= open('/sd/reenvio.csv', 'r')
                            os.listdir('/sd')
                            
                            
                            
                            while True:
                            
                                print('##################### Conectando  MESH ##################')
                                lora = LoRa(mode=LoRa.LORA, region=LoRa.US915, frequency = 904300000, bandwidth=LoRa.BW_125KHZ, sf=7)
                                masterkey = ubinascii.unhexlify("12345678")
                                pymesh = lora.Mesh(key=masterkey)
                                pymesh.border_router("2001:dead:beef:caff::/64", 0)
                                time.sleep(5)
                                print("IPv6 unicast addresses: %s"%pymesh.ipaddr())
                                print("4")
                                pycom.rgbled(0xff00)                 #GREEN
                                time.sleep(0.3)
                                pycom.rgbled(0x000000)
                                #IP=mesh.ipaddr()
                                #ipBR=str(IP[0])
                            
                                #creando sockets:
                            
                                s_EID = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
                                s_EID.bind(config.puertoEID)
                            
                                s_BR = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
                                s_BR.bind(config.puertoBR)
                            
                                s_mesh=[]
                                s_mesh.append(s_EID)
                                s_mesh.append(s_BR)
                            
                                data= "hola"
                                id=0
                                ip=0
                                cont=0
                            
                                #escuchando mesh
                                while cont<config.acumulador:
                                    time.sleep(4)
                                    paquete= Loramesh.receive_pack(s_mesh)
                                    if paquete!=None:
                                        data=paquete[0]
                                        ip=paquete[1]
                                        port=paquete[2]
                                        print("-----------PAQUETE:%d-------"%cont)
                                        print ('datos recividos:  %s'% (data))
                                        pycom.rgbled(0xff00)                 #verde
                                        time.sleep(0.2)
                                        pycom.rgbled(0xff00)                 #verde
                                        time.sleep(0.2)
                                        pycom.rgbled(0x000000)
                                        time.sleep(2)
                                        f.write('{},{},{}\n'.format(data,port,utime.localtime()))
                                        cont+=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
                            • 1 / 1
                            • First post
                              Last post

                            Pycom on Twitter

                            Pycom