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

  • 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')

  • @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

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

  • 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.

  • @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!!

  • administrators

    @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?


  • 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 ;-)

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

Log in to reply

Pycom on Twitter

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.