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

    Hard crash on upload of 25k file to /flash over ftp

    Scheduled Pinned Locked Moved LoPy
    8 Posts 4 Posters 2.0k Views 4 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.
    • B Offline
      bartvandeenen
      last edited by

      I was going to play with installing xmodem.py on the LoPy, but no luck, even ftp-ing the file to /flash on the LoPy fails with a Guru Meditation Error (Interrupt wdt timeout on CPU0).
      Reading the documentation of the WDT, it seems I can't disable it, and can't alter its timing. So what do I do? I'm just trying to make working with the LoPy somewhat more pleasant.

      On a side node, the current Lora OTAA never returns 'has_joined()' is True, and ABP immediately crashes the LoPy. Is there a way to talk directly to the SX1272 via a serial port? I could try to figure out why your LoRa python module is not working.
      Even better, just opensource the firmware.

      (sysname='LoPy', nodename='LoPy', release='0.9.3.b2', version='d78a5a3 on 2016-11-05', machine='LoPy with ESP32')
      
      B 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh
        last edited by robert-hh

        Confirmed with a 24k sized file. A 16 k sized file could be loaded. Trying to save another file just wiped the file system.

        1 Reply Last reply Reply Quote 0
        • B Offline
          Batilan
          last edited by Batilan

          Accessing the SX127X probably requires accessing it via the SPI interface. But indeed better wait for the source to become available, or even better a fix ;-)

          1 Reply Last reply Reply Quote 0
          • D Offline
            daniel
            last edited by

            @bartvandeenen the ftp issue is caused by the WDT and it will be fixed as part of the release tomorrow. The firmware will go open source this week :-)

            ABP should not crash the LoPy. Can you share your ABP code?

            Cheers,
            Daniel

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              bartvandeenen @daniel
              last edited by bartvandeenen

              @daniel

              DEV_ADDR = struct.unpack(">l", binascii.unhexlify('F08C9A56'))
              NWK_SESSKEY = binascii.unhexlify('30BB4B25282FA6E7C441F7BADC13A223')
              APP_SESSKEY = binascii.unhexlify('56D6CB701264DE9836BCEC119FDDBD68')
              
              def setup_lora():                                                                                                   
                  lora = LoRa(mode=LoRa.LORAWAN)                                                                                  
                  lora.join(activation=LoRa.ABP, auth=(DEV_ADDR, NWK_SESSKEY, APP_SESSKEY))                                       
                  return lora                                                                                                     
              

              I don't have the lopy connected here, so I can't test, but there's a hard crash at the moment def function setup_lora() is called.

              It's awesome that the firmware is going opensource this week!!

              1 Reply Last reply Reply Quote 0
              • robert-hhR Offline
                robert-hh
                last edited by robert-hh

                In the absence of a documentation of lora.join, I cannot tell wther the code is right or wrong. There is an example in the docs, which looks different. Are you aware, that on the first line DEV_ADDR receives a tuple, and not a single 32biit binary value?
                But nevertheless, a hard crash should not happen. If parameters are wrong, either an exception should be raised to a proper return code shall be given.

                1 Reply Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh
                  last edited by

                  The crash by uploading a larger file is gone with today's build. Thanks a lot.

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    bartvandeenen @bartvandeenen
                    last edited by

                    @bartvandeenen
                    Reply to myself!!!!

                    The ABP lora function call does cause a hard crash, if you provide it the wrong parameter:

                    DEV_ADDR = struct.unpack(">l", binascii.unhexlify('311...513'))
                    

                    And then call

                    lora.join(activation=LoRa.ABP, auth=(DEV_ADDR, NWK_SESSKEY, APP_SESSKEY))
                    

                    The problem is I forgot to take the first item from the struct.unpack array return!

                    To be honest, it doesn't help that the documentation shows this in blue on darkgrey 0_1479647178257_upload-8c69dd48-7ea8-47dd-aaa2-d88de272ffe3

                    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