Pygate packet forwarder ERROR



  • Hi,

    I'm installing a Pygate/Gpy, firmware 1.20.2.RC10 and registered it at TTN. Apparently it got a connection, but it was last seen 11 days ago. I'm not using the LTE part for coms, only WLAN.

    (sysname='GPy', nodename='GPy', release='1.20.2.rc10', version='v1.11-b2436d4 on 2020-07-01', machine='GPy with ESP32', pybytes='1.5.0', pygate='1.0.1')

    main.py

    from network import WLAN
    import time
    import machine
    from machine import RTC
    import pycom

    pycom.heartbeat(False)

    def machine_cb (arg):
    evt = machine.events()
    if (evt & machine.PYGATE_START_EVT):
    pycom.rgbled(0x103300)
    elif (evt & machine.PYGATE_ERROR_EVT):
    pycom.rgbled(0x331000)
    elif (evt & machine.PYGATE_STOP_EVT):
    pycom.rgbled(0x000000)

    machine.callback(trigger = (machine.PYGATE_START_EVT | machine.PYGATE_STOP_EVT | machine.PYGATE_ERROR_EVT), handler=machine_cb)

    wlan = WLAN(mode=WLAN.STA)
    wlan.connect(ssid='xxxxxx', auth=(WLAN.WPA2, "xxxxxx"))

    while not wlan.isconnected():
    time.sleep(1)

    print("Wifi Connection established")

    rtc = RTC()
    rtc.ntp_sync(server="0.pool.ntp.org")

    fp = open('/flash/config.json','r')
    buf = fp.read()

    machine.pygate_init(buf)

    Atom Console after firing up:

    ...
    ...
    Info: Initialising AGC firmware...
    Info: putting back original RADIO_SELECT value
    [106664084] lorapf: INFO_ [main] concentrator started, packet can now be received
    [106664085] lorapf: INFO_ [up ] start
    [106664086] lorapf: ERROR [main] impossible to create Timer Sync thread (12) (34) (11,22,1)
    [106664086] lorapf: INFO_ [down] start
    [106664087] lorapf: INFO_ [jit ] start
    [106664101] lorapf: INFO_ [down] End of downstream thread
    [106664104] lorapf: INFO_ [jit ] end
    [106664138] lorapf: INFO_ [up ] End of upstream thread
    [106664138] lorapf: INFO_ [main] Stopping concentrator

    The End

    Then the LED goes RED.
    When looking at other Pygate issues I don't see ERROR's in the packet forwarder.

    Please advice, what is happening here ?



  • for anybody else running into this - pretty sure it's about the memory consumption as explained here: https://docs.pycom.io/tutorials/expansionboards/pygate/#setup



  • @Gijs Thanks!! This solved my problem!



  • Hi Gijs,

    Thanks, that did the trick. I've used the GPy for earlier projects, so maybe that was messing up the installation. Maybe a good idea to add these advanced settings to the instructions.

    The LED is GREEN now. Thanks Gijs



  • Hi,
    Ive seen this issue before.. It was cleared after I reflashed my GPy and clearing the 'CONFIG', 'NVS' and partitions (and I clicked 'erase during update' as well) in the Pycom Firmware update tool. I believe it has to do with using other timers in previous configurations

    The error line is here:

    [106664086] lorapf: ERROR [main] impossible to create Timer Sync thread (12) (34) (11,22,1)
    

    Let me know if that worked for you!


Log in to reply
 

Pycom on Twitter