Subcategories

  • Gpy brownout operation corrupting flash.

    3
    0 Votes
    3 Posts
    49 Views
    S
    Hi Andreas, Thanks for your pointers. We have found through investigation that the issue is nothing to do with how we are using the filesystem (which is now not at all) but to do with the pycom firmware itself. With our code built with version 1.20 onwards any brownout condition rapidly causes the filesystem to be lost and subsequently causes the device to enter a continual watchdog reboot cycle. This is only recoverable by using the command line tools to erase the filesystem and then reflash the firmware and download the main.py file. With our code built with version 1.18 operation under brownout condition is completely stable. The filesystem is never lost and we never encounter the continual watchdog reboot state. Something significant has changed in regards to handling the flash memory between versions 1.18 and 1.20 that has caused this. This renders 1.20 unusable for our purposes. Going forward we'll have to remain with version 1.18 until this issue is fixed. Thanks for your help and the useful links you provided. Cheers Scott.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • Cannot create MQTT connection LoPy: Socket create error: -17168

    1
    0 Votes
    1 Posts
    37 Views
    No one has replied
  • An alternative to "nvram_save/restore" using the SD card?

    8
    1 Votes
    8 Posts
    108 Views
    robert-hhR
    @d-alvrzx Looking deeper in the code, it seems that these are on different name spaces. Strange. Normally I test before posting.
  • Cannot recover from continuous boot even when reflashing device.

    4
    0 Votes
    4 Posts
    48 Views
    S
    Thanks for your help. We've been able to recover these continual reboot devices by using the command line tools. Doing further testing with version 1.18.1.r2 I found I cannot recreate the continual boot issue caused by brownout conditions. However with 1.20.2.rc7 I saw a two stage process, first under brownout the filesystem was blanked and reset, then under further brownout conditions the device entered the continual reboot state. I'll close this issue, thanks for your help, will also be moving to LittleFS to see if that makes things more robust.
  • ssl.wrap_socket [Errno -1] ERR_MEM

    1
    1 Votes
    1 Posts
    18 Views
    No one has replied
  • Error to open a secure SSL/TLS connection ([Errno -1] ERR_MEM)

    2
    0 Votes
    2 Posts
    39 Views
    C
    Did you solve it?
  • pybytes Refresh Folder Hierarchy is missing files

    10
    1
    0 Votes
    10 Posts
    261 Views
    D
    @jirkakrepl What did you find out?
  • lora.stats() returns all zeros

    bugs
    5
    0 Votes
    5 Posts
    1k Views
    I
    @iosman123 said in lora.stats() returns all zeros: For flash erase, you too have to connecte G23 to GND and pusg reset. Erasing flash and reload should always work, as long as the device is not physically damaged. . . Thanks thanks my issue has been fixed.
  • 0 Votes
    5 Posts
    112 Views
    I
    @iosman123 said in Generate distinctive handlers for Pin.FALLING & Pin.RISING .. is this possible ?: I have a non PSM related problem with a continuously attached/connected GPY with 43818 modem firmware. I get the socket problem OSError: [Errno 118] EHOSTUNREACH if I haven't contacted to the server for more than about half a minute. I find the only way to fix this is to disconnect then reconnect the modem. Wondering why deinit(detach=False,reset=False) does not work in this situation? Thanks thanks my issue has been fixed.
  • GPy cannot attach - Germany Telekom / Vodafone

    bugs
    9
    0 Votes
    9 Posts
    69 Views
    H
    @nftylitak Hi, got no answer. I test it with this code: def send_at_cmd_pretty(cmd): response = lte.send_at_cmd(cmd).split('\r\n') for line in response: print(line) lte = LTE() lte.reset() lte.init() time.sleep(10) send_at_cmd_pretty('AT+CMEE=2') send_at_cmd_pretty('AT+CFUN=1') send_at_cmd_pretty('AT+COPS=?') #this will take some time to reply, ~1minute send_at_cmd_pretty('AT+COPS=1,2,"23450"') print('Wating.', end='') while 1: time.sleep(5) print('.', end='') Thats the output: OK OK Wating......................................................................................................................................................................
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Can bus between two pyboards

    3
    0 Votes
    3 Posts
    353 Views
    I
    @tom-mcadam said in Can bus between two pyboards: @iosman123 I haven't tried CANBUS on the Pycom. The filters look a bit concerning, is it possible to try it without filters to start with. They are generally used on a very busy bus were the micro is unable to cope with the rate of messages arriving. It is also worth checking some physical things. Do you have the 120ohm terminating resistors on your bus? Pin 8 to ground to take the MCP2562 out of standby mode? Also the MCP2562 needs 5V supply (but can operate at 3.3v logic level). I have used SN65HVD230DR with esp32 successfully, it has 3v3 supply and logic level. It might also be worth getting a chatavenue chatroulette ometv simple scope to look at what is happening on your bus, even a really cheap one will be okay, as you just need to see the pattern and levels are roughly okay. thanks for the information.
  • BLE advertisment ADVTypes issues

    bugs
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • SIPY + PYSENSE stops working below 0 degrees Celsius.

    5
    0 Votes
    5 Posts
    54 Views
    M
    @railmonitor Thank you very much, as soon as I can try it. Regards.
  • Lopy4 core panic crash while using as LoRA Nano Gateway

    1
    0 Votes
    1 Posts
    29 Views
    No one has replied
  • This topic is deleted!

    1
    2
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Cannot access FTP on GPy

    7
    0 Votes
    7 Posts
    46 Views
    D
    @guyc Be advised, my experience with rc6 was that the GPy broadcast the SSID only one time which was enough to get it in the cache device wanting to connect but not enough to connect. Downgrading to rc2 worked for me. Can you manually set it up as a station (I like to see the blinking lights and write progress to a log file) import machine import pycom import time pycom.heartbeat(False) # show that it's me by turning off heartbeat and pycom.rgbled(0x006000) # green (careful of sunlight) from network import WLAN wlan = WLAN(mode=WLAN.STA) # configure the WLAN subsystem in station mode (the default is AP) DROPS connection if run interactively # use fixed (not dhcp) IP settings (IP, Subnet, Gateway, DNS) wlan.ifconfig(config=('192.168.1.3', '255.255.255.0', '192.168.1.1', '192.168.1.1')) # UGLY use DHCPC (_) wlan.connect(ssid='zzbled', auth=(WLAN.WPA2, '5Caace')) time.sleep(3) # always takes a couple of seconds. If we're lucky dont complain at all for i in range(5): f = open('boot.log', 'a') # append f.write( 'wlan.isconnected:' + str(wlan.isconnected()) + ',' + str(wlan.ifconfig()) + '; ' + str(i) + '\n') f.close() if wlan.isconnected() == False: pycom.rgbled(0x100000) # faint RED time.sleep(.5) pycom.rgbled(0x800000) # RED if loop ends stays red time.sleep(.5) if wlan.isconnected() == True: pycom.rgbled(0x005000) # green main.py time.sleep(.5) # let him see it before heartbeat wipes it out pycom.heartbeat(True) # incase main.py is broken (or not there so we can get to REPL) it's kinda frequent break
  • Cannot Upgrade Sequans Modem Firmware - Bricked

    4
    0 Votes
    4 Posts
    51 Views
    N
    FINALLY GOT IT TO SUCCEED >> >>> <<< Welcome to the SQN3330 firmware updater [1.2.6] >>> >>> FiPy with firmware version 1.20.2.rc6 File /sd/updater.elf has size 430284 File /sd/CATM1-41065.dup has size 6160982 The current delay is 1000 Response (+++ #1): None Response (AT #1) None Response (AT #3) None Response (AT #4) None Response (AT #1 @ 115200) b'ERROR\r\n' Response (AT #2 @ 115200) b'OK\r\n' Response (AT+SMOD?) b'0\r\nOK\r\n' Converting response: 0 to int... Modem state: 0 Success1? True mirror? False recover? True resume? True direct? False atneg_only? False bootrom? False load_fff? False baudrate: 115200 target_baudrate: 921600 Initial prepartion complete... Loading /sd/updater.elf Entering recovery mode AT+SMOD? returned 0 Attempting AT auto-negotiation... with baudrate 115200 and target_baudrate 921600 b'OK\r\n' Setting baudrate to 921600 b'OK\r\n' Checking SMOD AT+SMOD? returned b'0' Starting STP code upload running m.wipe running m.reset magic=0x74736166, op=0x80, sid=0x0, plen=0x0, tid=0x0, hcrc=0x0, pcrc=0xFEEC Correct SRSP signature: 0x74736166 running m.open_session Session opened: version 1, max transfer 2048 bytes running push(m) Sending 430284 bytes: [########################################] 100% running dev.set_timeout(2) running m.reset(True) start returned True type <class 'bool'> Waiting for updater to load... [921600] b'\r\nOK\r\n' Upgrader loaded successfully, modem is in update mode Success2? True mirror? False recover? False resume? True direct? False atneg_only? False bootrom? False load_fff? False baudrate: 921600 target_baudrate: 921600 Initial prepartion complete... Loading /sd/CATM1-41065.dup Attempting AT wakeup... [921600] b'\r\nOK\r\n' Entering recovery mode AT+SMOD? returned 4 Starting STP ON_THE_FLY Sending AT+SMSTPU="ON_THE_FLY" Starting STP code upload running m.wipe running m.reset magic=0x74736166, op=0x80, sid=0x0, plen=0x0, tid=0x0, hcrc=0x0, pcrc=0x0 Correct SRSP signature: 0x74736166 running m.open_session Session opened: version 1, max transfer 8192 bytes running push(m) Sending 6160982 bytes: [########################################] 100% running dev.set_timeout(2) running m.reset(True) start returned True type <class 'bool'> Code download done, returning to user mode Waiting for modem to finish the update... <<<=== DO NOT DISCONNECT POWER ===>>> [921600] b'' count=1 b'\r\nOK\r\n\r\nOK\r\n' AT+SMUPGRADE? returned b'+SMUPGRADE: success\r\n\r\nOK\r\n' [timeout: 0] AT+SMSWBOOT? returned b'FFH\r\nOK\r\n' AT+SMUPGRADE? returned b'+SMUPGRADE: success\r\n\r\nOK\r\n' This is my result: success Resetting.AT+SMSWBOOT=1,1 returned b'+SMUPGRADE: success\r\n\r\nOK\r\n' ......................... Sending AT+SQNSUPGRADENTF="success" AT+SQNSUPGRADENTF="success" returned b'\r\nOK' Sending AT+FSRDFILE="/fs/crashdump" AT+FSRDFILE="/fs/crashdump" returned b'\r\nOK' Checking bootrom & application Checking line Checking line SYSTEM VERSION Checking line ============== Checking line FIRMWARE VERSION Checking line Bootloader0 : 5.1.1.0 [41065] old_br: False Checking line Bootloader1* : 5.1.1.0 [41065] Checking line Bootloader2 : 5.1.1.0 [41065] Checking line NV Info : 1.1,0,0 Checking line Software : 5.1.1.0 [41065] by robot-soft at 2018-12-17 13:03:40 old_sw: False Checking line UE : 5.0.0.0d Checking line COMPONENTS Checking line ZSP0 : 1.0.99-13616 Checking line ZSP1 : 1.0.99-12376 Checking line Checking line OK Checking line Returning: False Your modem has been successfully updated. Here is the current firmware version: mirror? False recover? False resume? True direct? True atneg_only? False bootrom? False load_fff? False baudrate: 921600 target_baudrate: 921600 SYSTEM VERSION ============== FIRMWARE VERSION Bootloader0 : 5.1.1.0 [41065] Bootloader1* : 5.1.1.0 [41065] Bootloader2 : 5.1.1.0 [41065] NV Info : 1.1,0,0 Software : 5.1.1.0 [41065] by robot-soft at 2018-12-17 13:03:40 UE : 5.0.0.0d COMPONENTS ZSP0 : 1.0.99-13616 ZSP1 : 1.0.99-12376 IMEI: 354346094393633 > Pycom MicroPython 1.20.2.rc6 [v1.11-01f49f7] on 2020-02-28; FiPy with ESP32 Pybytes Version: 1.3.1 Type "help()" for more information. >>> >>> Connecting to COM8... WMAC: 240AC4C829E0 Firmware: 1.20.2.rc6 Pybytes: 1.3.1 Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms WiFi connection established Pybytes connected successfully (using the built-in pybytes library) Pybytes configuration read from /flash/pybytes_config.json Pycom MicroPython 1.20.2.rc6 [v1.11-01f49f7] on 2020-02-28; FiPy with ESP32 Pybytes Version: 1.3.1 Type "help()" for more information. Not to try the NB version of the Modem Firmware
  • re.search RuntimeError: maximum recursion depth exceeded

    2
    0 Votes
    2 Posts
    44 Views
    K
    For what it's worth, I tried this on a generic esp32 running generic micropython and it works fine, so it seems likely it's a pycom specific bug: >>> import os >>> os.uname() (sysname='esp32', nodename='esp32', release='1.12.0', version='v1.12 on 2019-12-20', machine='ESP32 module with ESP32') >>> import re >>> x = """asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfdfasdfasdfasdfasdfasdfasdfasdfasdfas\n\nasdf\n""" >>> m = re.search('^(.*)\n\n(.*)$', x) >>> m <match num=3> >>> m.group(1), m.group(2) ('asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfdfasdfasdfasdfasdfasdfasdfasdfasdfas', 'asdf\n')

Pycom on Twitter