New firmware release 1.6.5.b1 (GC bug fixed)



  • Hello everyone,

    We have fixed that long annoying GC bug that was causing lots of unexplainable crashes. The full change log is the following:

    If you don't have the latest updater tool, make sure to get it from here: https://www.pycom.io/resources/

    @Colateral @livius @jmarcelino Please give this release a try and let us know, hopefully your tests will also show that the bug is gone. Thanks!

    Cheers,
    Daniel



  • @daniel Thanks for the reply, I have installed the newest version, I'm using now the LoraWan nano gateway, my previous project was a lora gateway based on a raspberry pi and a LoPy board.
    The newest Firmware version include the Lorawan nano gateway example you have created with your team is Great!! Thanks!!! Another question: have you any idea when the newest Pytrack board is available? I have pre-order this and I can wait ;)



  • @rikkertmark sorry for the delay. The problem is that you must have the latest firmware on both the receiver and the transmitter. Your issue is caused because on release 1.6.5.b1 we solved a problem where the sync word was not being set according to the public argument int the constructor/init.
    So what happens now is that if both boards do not have the latest firmware, one will be sending with a public sync word and the other will be trying to receive with the private sync word, which results in only some messages being received. Please try having the latest firmware on both boards and let me know. Thanks!



  • @daniel
    Do you have see my code in my previous post about the Lora Problem between different firmware? You say on Monday , I will check it tomorrow first, but i have heard nothing about it.
    I will try to build a Horsebirth Sensor with accellerometer and Lora, My horse Waiting not for my sensor ;) I need the sensor in two weeks so I hope you have a solution before my horse split into 2 pieces ;)



  • Is is possible to change SSID of wipi in AP mode?

    Following:

    import machine
    import os
    import pycom

    pycom.heartbeat(True)

    uart = machine.UART(0, 115200) # disable these two lines if you don't want serial access
    os.dupterm(uart)

    from network import WLAN
    wl = WLAN()

    #trying to change AP properties:

    original_ssid = "MyNode"
    wl.ssid(original_ssid)

    original_auth = (3,'bewell')

    wl.init(mode=WLAN.AP, ssid=original_ssid, auth=original_auth, channel=6, antenna=WLAN.INT_ANT)

    Does not change SSID visible on my iphone.
    It remains wipy-wlan-xxx
    Am I doing something wrong?

    Or SSID is hardcoded regardless of what says in documentation:

    "wlan.ssid([ssid])
    Get or set the SSID when in AP mode.



  • @daniel
    New test with same problem:

    Sender with earlier Version of firmware(1.6.0.b1)

     from network import LoRa
     import socket
     import machine
     import time
     import pycom
    
    pycom.rgbled(0x7f0000) # red 
    
    #initialize LoRa in LORA mode
    lora = LoRa(mode=LoRa.LORA, frequency=863000000, power_mode=LoRa.ALWAYS_ON, tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8,
    coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False)
    
    #create a raw LoRa socket
    s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
    
    while True:
    
    # send data To Green
    s.setblocking(True)
    s.send('Hello green')
    
    # get any data received...
    s.setblocking(False)
    data = s.recv(64)
    print(data)
    
    # send Hello green once / 4 sec
    time.sleep(4)
    

    Receiver With version 1.6.5.b1

     from network import LoRa
     import socket
     import machine
     import time
     import pycom
    
    pycom.rgbled(0x007f00) # green
    
    #initialize LoRa in LORA mode
    lora = LoRa(mode=LoRa.LORA, frequency=863000000, power_mode=LoRa.ALWAYS_ON, tx_power=14, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8,
    coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False)
    
    #create a raw LoRa socket
    s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
    
    while True:
    
    # get any data received...
    s.setblocking(False)
    data = s.recv(64)
    print(data)
    
    # get data from lora every sec. 
    time.sleep(1)
    

    Sender = Red firmware = 1.6.0.b1
    Receiver = Green firmware 1.6.5.b1
    I'm expected data from Red every 4 seconds but nothing received on Green empty buffer.

    I swapped the software

    Sender = Red firmware = 1.6.5.b1
    Receiver = Green firmware 1.6.0.b1
    I received data from Red but sometimes i missed data not receiving every 4 sec but 8 sec 12 sec etc.

    I think there is something wrong with the Lora.Init parameters there is something chanced since release 1.6.4.b1

    Please Help me to find the solution

    Hello,

    What is Happened with Lora in Release 1.6.5.b1 and 1.6.4.b1
    I have a Working program that works in the previous versions.
    Now it send data but I have a lot of missing massages.

    I have Two LOPY boards with Extension Board. one with the latest version 1.6.5.b1 and one with version 1.6.0.b1 the newest firmware version missed a lot of messages

    import machine
    import socket
    import time
    import binascii
    import pycom

    from network import LoRa

    print("Initializing LoRa module...")

    lora = LoRa(mode=LoRa.LORA,
    frequency=868100000,
    tx_power=14,
    bandwidth=LoRa.BW_125KHZ,
    sf=7,
    coding_rate=LoRa.CODING_4_5,
    power_mode=LoRa.TX_ONLY)

    lora_sock = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
    lora_sock.setblocking(False)

    print("Ready to send data...")

    msg_elements = [0xff, 0xff, 0x00, 0x00, 75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]

    msg = bytearray(msg_elements)

    while (True):
    lora_sock.send(msg)
    print("Sent: ", binascii.hexlify(msg, ' '))
    time.sleep(4)

    I have stripped my software, above is working and give the same problem.
    why is above working with previous firmware versions and not with the newest version(1.6.4.b1 & 1.6.5.B1)?



  • Great!
    This is working for me...thanks for the update @daniel



  • SD card is running hazardous. If you run the below simple script second time the board is reset. You need to unpower in order to run the script again.

    from machine import SD
    import uos
    
    try:
        sd = SD(0)
    except Exception as e: 
        print ("Exception SDCard : %s " % (e)) 
        
    try:
        sd.init(0)
    except Exception as e: 
        print ("Exception SDCard init: %s " % (e)) 
        
    try:
        uos.mount(sd, '/sd')
    
    except Exception as e: 
        print ("Exception SDCard mount: %s " % (e)) 
        
    try:
        sd.deinit()
    
    except Exception as e: 
        print ("Exception SDCard deinit: %s " % (e)) 
        
    try:
        uos.unmount('/sd')
    except Exception as e: 
        print ("Exception SDCard unmount: %s " % (e)) 
    

    Soft resetting the LoPy
    /Users/danicampora/Code/Pycom/esp-idf/components/freertos/./queue.c:1444 (xQueueGenericReceive)- assert failed!
    abort() was called at PC 0x40085415
    Guru Meditation Error: Core 0 panic'ed (abort)

    Backtrace: 0x40008155:0x3ffc5950 0x40007d16:0x3ffc5970 0x40124f8d:0x3ffc59b0 0x4019e5e8:0x3ffc59e0 0x40197e68:0x3ffc5a00 0x4019825a:0x3ffc5a50 0x400e0c84:0x3ffc5a80 0x400df72a:0x3ffc5ad0 0x400f3272:0x3ffc5b10 0x400eb028:0x3ffc5b30 0x400f6ae8:0x3ffc5b50 0x400eeace:0x3ffc5bf0 0x400eb028:0x3ffc5c30 0x400eb055:0x3ffc5c50 0x400d8b99:0x3ffc5c70 0x400d8d07:0x3ffc5d10 0x400d7ee5:0x3ffc5d40

    ================= CORE DUMP START =================
    4CQAAAwAAABsAQAA
    aD38P5BY/D/QXvw/
    oFf8P3Be/D+oGwAAbDr8P2w6/D9oPfw/ZDr8PxQAAACg8Pw/oPD8P2g9/D8AAAAA
    BQAAANQ+/D9NaWNyb1B5AAAAAAAAAAAAAAAAANBe/D8AAAAAIQAGAAUAAAABAAAA
    AAAAAHRm/D8AAAAAAAAAAAAAAAB43/w/4N/8P0jg/D8AAAAAAAAAAAEAAAAAAAAA



  • @daniel yes this is code For sending.. the receiver part is a raspberry pi c file. I have two boards with different firmware the Python file is the same see text that i posted earlier. The problem is not my raspberry pi.. i think there is a change since version 1.6.4.b1. before IT works great!

    Regards, Mark



  • @daniel

    1. Is HALL sensor enabled in esp-idf?
      i see that it should be accessible -
      https://github.com/espressif/esp-idf/blob/dca0377e19c6e514c0c694b521c3495a6d46c3af/docs/api/peripherals/adc.rst
    2. Is pin touch function enabled?
    3. is telnet delete work ok? I suppose no - it delete wrong char.
      backspace work ok but del not


  • @rikkertmark just to make sure, the code posted above is for the "sending" LoPy, what about the one that receives? Can you post that one too?



  • @rikkertmark thanks for the report. I'll check tomorrow morning first thing and let you know.

    Cheers,
    Daniel



  • Hello,

    What is Happened with Lora in Release 1.6.5.b1 and 1.6.4.b1
    I have a Working program that works in the previous versions.
    Now it send data but I have a lot of missing massages.

    I have Two LOPY boards with Extension Board. one with the latest version 1.6.5.b1 and one with version 1.6.0.b1 the newest firmware version missed a lot of messages

    import machine
    import socket
    import time
    import binascii
    import pycom

    from network import LoRa

    print("Initializing LoRa module...")

    lora = LoRa(mode=LoRa.LORA,
    frequency=868100000,
    tx_power=14,
    bandwidth=LoRa.BW_125KHZ,
    sf=7,
    coding_rate=LoRa.CODING_4_5,
    power_mode=LoRa.TX_ONLY)

    lora_sock = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
    lora_sock.setblocking(False)

    print("Ready to send data...")

    msg_elements = [0xff, 0xff, 0x00, 0x00, 75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]

    msg = bytearray(msg_elements)

    while (True):
    lora_sock.send(msg)
    print("Sent: ", binascii.hexlify(msg, ' '))
    time.sleep(4)

    I have stripped my software, above is working and give the same problem.
    why is above working with previous firmware versions and not with the newest version(1.6.4.b1 & 1.6.5.B1)?



  • @daniel

    We have fixed that long annoying GC bug that was causing lots of unexplainable crashes.

    Now, my little script with DS18B20, Wifi and MQTT is up and running. gc.collect() do not crash as it did before. I'll let the script run for a longer time. We'll see how stable it has become :)
    Thanks for the update!



  • It is better this build... we should book it in the calendar and get drunk.

    There is a problem with the SD card functionality. Plug the board and then run the sample script (SD example).
    from machine import SD
    import os

            sd = SD()
            os.mount(sd, '/sd')
            f = open('/sd/a.cfg')
            data = f.read()
            f.close()
    

    Everything works fine on first run.
    Run again the script: [Errno 2] ENOENT is raising on SD card init and the board is hanging. It is funny that you press power reset button and the issue is still persistent after reset. Only if you unplug the usb cable and plug again will make it work.



  • @Colateral OK, I'll test that start/stop issue today. Thanks for the feedback.



  • @daniel Using LopY, gc.collect() seems that is solved. Also onewire Dallas sensor is working and we can read BMP180 for the first time. However we noticed that if we start / stop wifi many times the system hangs for awhile... then auto-reboot. Below is what we got without touching the reset button. Please note this code is running very well on 1.5.0. We will continue the tests today.

    I (179506) wifi: n:1 1, o:1 0, ap:255 255, sta:1 1, prof:6
    I (179507) wifi: state: init -> auth (b0)
    I (179509) wifi: state: auth -> assoc (0)
    I (179517) wifi: state: assoc -> run (10)
    I (179527) wifi: connected with Imalog, channel 1
    ets Jun 8 2016 00:22:57

    rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
    ets Jun 8 2016 00:22:57

    rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
    ets Jun 8 2016 00:22:57

    rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
    ets Jun 8 2016 00:2úýets Jun 8 2016 00:22:57

    òets Jun 8 2016 00:22:57

    rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
    ets Jun 8 2016 00:22:57

    rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
    ets Jun 8 2016 00:22:57

    rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (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:8
    load:0x3fff9018,len:248
    load:0x40078000,len:4056
    load:0x4009fc00,len:920
    entry 0x4009fde4


Log in to reply
 

Pycom on Twitter