Multiple issues with LoPy TTN Nano Gateway



  • Hi all!
    I tried to set up a TTN Nanogateway, following example and video. I registered the gateway to TTN and it connects. So far, so good. But the gateway doesn't run stable. It runs into an Guru Meditation Error every few minutes.

    Connecting on COM4...
    WiFi connected!
    MicroPython v1.8.6-650-9bacbbd4 on 2017-06-09; LoPy with ESP32
    
    Type "help()" for more information.
    >>>
    >>> Push ack
    Push ack
    Guru Meditation Error of type StoreProhibited occurred on core  0. Exception was unhandled.
    Register dump:
    PC      : 0x400f78ba  PS      : 0x00060930  A0      : 0x800ef433  A1      : 0x3ffeec80                                  
    A2      : 0x3ffed930  A3      : 0x3ffe8d74  A4      : 0x00000000  A5      : 0x00000001                                  
    A6      : 0xffffff30  A7      : 0x3ffed84f  A8      : 0x800f78ba  A9      : 0x3ffeec60                                  
    A10     : 0x3f409af8  A11     : 0x3ffe7600  A12     : 0x3f40a124  A13     : 0x00000021                                  
    A14     : 0x00000001  A15     : 0x3ffc6040  SAR     : 0x0000001a  EXCCAUSE: 0x0000001d                                  
    EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000                                  
    
    Backtrace: 0x400f78ba:0x3ffeec80 0x400ef433:0x3ffc6050 0x400d8c13:0x3ffc6070 0x400d9120:0x3ffc60a0 0x400d9356:0x3ffc60c0
     0x400d847f:0x3ffc6100
     
    Rebooting... 
    ets Jun  8 2016 00:22:57
    
    rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:QIO, clock div:2
    load:0x3fff9010,len:12
    ho 0 tail 12 room 4
    load:0x3fff9020,len:388
    load:0x40078000,len:11412
    load:0x4009fc00,len:848
    entry 0x4009fd9c
    ******************************
    **********  tsHome  **********
    *****  TTN Nano Gateway  *****
    ******************************
    b'240AC4FFFE00D624'
    ******************************
    
    WiFi connected!                                                                                                         
    MicroPython v1.8.6-650-9bacbbd4 on 2017-06-09; LoPy with ESP32                
    Type "help()" for more information. 
    >>> Push ack
    Push ack
    Pull ack
    Guru Meditation Error of type StoreProhibited occurred on core  0. Exception was unhandled.
    Register dump:
    PC      : 0x400f78ba  PS      : 0x00060130  A0      : 0x800ef433  A1      : 0x3ffeec80
    A2      : 0x3ffed930  A3      : 0x3ffe8d74  A4      : 0x00000000  A5      : 0x00000001
    A6      : 0xffffff30  A7      : 0x00000008  A8      : 0x800f78ba  A9      : 0x3ffeec60
    A10     : 0x3f409af8  A11     : 0x3ffe8940  A12     : 0x3f40a124  A13     : 0x00000021
    A14     : 0x00000001  A15     : 0x3ffc6040  SAR     : 0x00000020  EXCCAUSE: 0x0000001d
    EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000
    
    Backtrace: 0x400f78ba:0x3ffeec80 0x400ef433:0x3ffc6050 0x400d8c13:0x3ffc6070 0x400d9120:0x3ffc60a0 0x400d9356:0x3ffc60c0
     0x400d847f:0x3ffc6100                                                                                              
    Rebooting... 
    

    and so on. After a while, the LoPy freaks completely out, and just reboots repeatedly.

    I tested it with several LoPys. Everytime the same behaviour. All LoPys run the latest 1.7.2 Firmware, and I didn't changed anything in the example code, exept the three EUIs.
    The corresponding OTAA nodes run stable, but shows allways "Not joined yet..."

    Any idea anybody?

    Cheers,
    Thomas



  • @Thosch42
    This tip from Robert should fix your red light:

    https://forum.pycom.io/topic/1343/solved-lopy-bricked-red-led/3



  • OK, it seems running now. But I don't know why.
    I updated the device with the newest 1.7.5.b1 firmware via update tool - no success.
    I flashed my own build from the latest pull - get a red light after update
    I updated the device again with the update tool - no red light, but also no success
    I synced the lopy directly from the git working directory, just changed the three lines in config.py, leaving the otaa_node.py where it is (so it copied it also to the gateway) and - Tataa - the gateway runs now for more than an houre.
    Ok, the node is not joining, but I#ve seen, there are some threads about this issue.

    And I have to find out, why I get a red light and a freeze, when I flash my own build from the original source.

    Cheers,
    Thomas



  • @jmarcelino said in Multiple issues with LoPy TTN Nano Gateway:

    https://forum.pycom.io/topic/1361/firmware-release-1-7-3-b1

    After my update from 1.6.2 to 1.7.x the nano gateway stopped functioning. Is there anyone who has working code for a nano gateway functioning on 1.7.3-b1 firmware?



  • @jmarcelino
    Hi!
    I still have this problem.Another question: Should there really not boot.py? Because I have one.

    import os
    from machine import UART
    uart = UART(0, 115200)
    os.dupterm(uart)
    

    Or should I better delete the boot.py and connect the LoPy via Wi-Fi?

    Cheers,
    Thomas



  • @jmarcelino Ok, it took a while. Currently pretty busy:
    The addr2line tool told me the following:

    ts@Vrumfondell MSYS ~/pycom-micropython-sigfox/esp32/build/LOPY_868/release
    $ xtensa-esp32-elf-addr2line -e application.elf -a 0x400f7b66
    0x400f7b66
    C:\msys32\home\ts\pycom-micropython-sigfox\esp32/../py/vm.c:1206
    

    what leads me directly to

    (gdb) info symbol 0x400f7b66
    mp_execute_bytecode + 4166 in section .flash.text
    (gdb) list *0x400f7b66
    0x400f7b66 is in mp_execute_bytecode (../py/vm.c:1206).
    1201                    ENTRY(MP_BC_BINARY_OP_MULTI): {
    1202                        MARK_EXC_IP_SELECTIVE();
    1203                        mp_obj_t rhs = POP();
    1204                        mp_obj_t lhs = TOP();
    1205                        SET_TOP(mp_binary_op(ip[-1] - P_BC_BINARY_OP_MULTI, lhs, rhs));
    1206                        DISPATCH();
    1207                    }
    1208
    1209                    ENTRY_DEFAULT:
    1210                        MARK_EXC_IP_SELECTIVE();
    

    but it does (me) not really help.

    Cheers,
    Thomas



  • @jmarcelino Yes, just LoPys with Expansionboards V2.1A.
    Good to know, with the addr2line command for gdb. I check it, as soon as I'm back in the office.
    Cheers,
    Thomas



  • @Thosch42

    I’ve never seen anything quite that bad and I’ve seen a fair share of nano gateways.

    Which nodes are you using? just LoPys?

    It’s possible to get the offending line from the address given in the guru medication error, if you have the tool chain and a compiled image you can use addr2line included in the compiler tool chain



  • @gertjanvanhethof
    Yes, I use the original gitlab source, and also the original binary with Pycom Firmware Updater. But I run always into this Guru Meditation error. I tried it with the tutorial scripts from from gitlab and also with modified versions. Always the same.
    Offline debugging tells me only, the bad code line is inside the byte code (what means, inside the python scripts, isn't it?).
    Cheers,
    Thomas


  • Pybytes Beta

    @Thosch42 I don't thing it has anything to do with you build environment.
    I don't have guru meditation errors but still facing problems with acceptance of the gateway connection by TTN.
    See: TTN Join accept not handled properly

    Do you use the code from github?



  • @jmarcelino
    Currently I try to setup a firmware build environment on Win10 in order to debug the thing, but it works not yet.
    Does anybody have a complete guidance or a docker image?



  • @jmarcelino Hi!
    Ok, updated the Firmware 1.7.3. Same result:

    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    ets Jun  8 2016 00:22:57
    
    rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:QIO, clock div:2
    load:0x3fff9010,len:12
    ho 0 tail 12 room 4
    load:0x3fff9020,len:388
    load:0x40078000,len:11412
    load:0x4009fc00,len:848
    entry 0x4009fd9c
    ******************************
    **********  tsHome  **********
    *****  TTN Nano Gateway  *****
    ******************************
    b'240AC4FFFE00D624'
    ******************************
    
    WiFi connected!
    MicroPython v1.8.6-664-gef7afeaa on 2017-06-15; LoPy with ESP32
    Type "help()" for more information.
    >>> Push ack
    Push ack
    Pull ack
    Push ack
    Push ack
    Pull ack
    Push ack
    Guru Meditation Error of type StoreProhibited occurred on core  0. Exception was unhandled.
    Register dump:
    PC      : 0x400f7b66  PS      : 0x00060130  A0      : 0x800ef6df  A1      : 0x3ffee280
    A2      : 0x3ffecf23  A3      : 0x3ffe8374  A4      : 0x00000000  A5      : 0x00000001
    A6      : 0xffffff30  A7      : 0x3ffece4f  A8      : 0x800f7b66  A9      : 0x3ffee260
    A10     : 0x3f409ae8  A11     : 0x3ffe6ee0  A12     : 0x3f40a0c4  A13     : 0x00000021
    A14     : 0x00000001  A15     : 0x3ffc6020  SAR     : 0x0000001a  EXCCAUSE: 0x0000001d
    EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000
    
    Backtrace: 0x400f7b66:0x3ffee280 0x400ef6df:0x3ffc6030 0x400d8d9b:0x3ffc6050 0x400d92a8:0x3ffc6080 0x400d94de:0x3ffc60a0 0x400d8607:0x3ffc60e0
    
    Rebooting...
    ets Jun  8 2016 00:22:57
    
    rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:QIO, clock div:2
    load:0x3fff9010,len:12
    ho 0 tail 12 room 4
    load:0x3fff9020,len:388
    load:0x40078000,len:11412
    load:0x4009fc00,len:848
    entry 0x4009fd9c
    ******************************
    **********  tsHome  **********
    *****  TTN Nano Gateway  *****
    ******************************
    b'240AC4FFFE00D624'
    ******************************
    
    WiFi connected!
    MicroPython v1.8.6-664-gef7afeaa on 2017-06-15; LoPy with ESP32
    Type "help()" for more information.
    >>> Push ack
    Push ack
    Pull ack
    Push ack
    Pull ack
    Push ack
    Push ack
    Push ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Pull ack
    Push ack
    Guru Meditation Error of type LoadProhibited occurred on core  0. Exception was unhandled.
    Register dump:
    PC      : 0x400d8b24  PS      : 0x00060130  A0      : 0x800f7bf0  A1      : 0x3ffee260
    A2      : 0x00000000  A3      : 0x00000001  A4      : 0x00000000  A5      : 0x00000001
    A6      : 0x00000001  A7      : 0x3ffc6020  A8      : 0x800d8b4d  A9      : 0x3ffee220
    A10     : 0x00000001  A11     : 0x00000001  A12     : 0x00000001  A13     : 0x00000000
    A14     : 0x00000000  A15     : 0x000003a2  SAR     : 0x00000020  EXCCAUSE: 0x0000001c
    EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000
    
    Backtrace: 0x400d8b24:0x3ffee260 0x400f7bf0:0x3ffee280 0x400ef6df:0x3ffc6030 0x400d8d9b:0x3ffc6050 0x400d92a8:0x3ffc6080 0x400d94de:0x3ffc60a0 0x400d8607:0x3ffc60e0
    
    Rebooting...
    ets Jun  8 2016 00:22:57
    
    rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:QIO, clock div:2
    load:0x3fff9010,len:12
    ho 0 tail 12 room 4
    load:0x3fff9020,len:388
    load:0x40078000,len:11412
    load:0x4009fc00,len:848
    entry 0x4009fd9c
    ******************************
    **********  tsHome  **********
    *****  TTN Nano Gateway  *****
    ******************************
    b'240AC4FFFE00D624'
    ******************************
    

    Cheers,
    Thomas



  • @Thosch42
    Please try the just released 1.7.3 some fixes may be relevant https://forum.pycom.io/topic/1361/firmware-release-1-7-3-b1



  • @jmarcelino Oh, and also when I power the board only from the LiPo, without USB connection, I get the same problem.



  • @jmarcelino It's just a LoPy with Expansionboard 2.1A, a 2000mAh LiPo, and USB connection to my PC. I also tested it without the LiPo, on two different PCs, a Notebook and a MS Surface Pro 4. Everytime the same result. I tried 5 different LoPys with 5 different Expansionboards. Allways the same. Sometimes, it runs for 10 min, sometimes it freaks out after 2 min. Till now, I found no rule.

    Cheers,
    Thomas



  • @Thosch42
    Can you explain your setup a bit better? How are your powering the LoPy?


Log in to reply
 

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