Firmware Update Fails



  • I am using a linux desktop (Debian (jessie) + python 2.7.9) without a wireless network interface.

    I can connect to my WiPy 2.0 using USB, but when trying to update the firmware the updater fails to connect after I select the device path and the speed. Am I right in guessing that the updater is trying to connect to the default IP address advertised by the WiPy (192.168.1.1)?

    I wouldn't worry about updating at this stage if it wasn't for the fact that I can connect to my wireless AP from the WiPy, but when trying to connect to my WiPy using ftp or telnet if I specified a username or password when setting up the server all incoming connections are rejected which doesn't seem right.

    print (os.uname())
    (sysname='ESP32', nodename='ESP32', release='0.9.0b', version='1f7bdfd on 2016-10-09', machine='WiPy with ESP32')

    Mike T.



  • @bucknall
    Thanks for your help the other evening - I'm up and running now, though I'm no closer to being able to update the firmware myself.

    For linux users I have a (useful?) bash script that beings up a console window and then waits up to 15s for me to plugin the device (that way I see any boot messages). I don't know if this will work on OSX as I don't have a Mac.

    I need to update my blog post as I've recently modified the script to allows me to select the which serial device to connect to and baud rate to use.

    Mike T.



  • @bucknall Found this post https://forum.pycom.io/post/5716

    I assume it will work for upgrades as well as downgrades..?


  • administrators

    @mike632t Sure! I'll be there to help you out! Interested in chatting about your experience and where you want to take your project!

    See you on Thursday!

    Cheers



  • @bucknall
    Still no change (tried on a separate machine the other day), plan on attending the meetup on Thurdsay - hopefully there will be someone there with a laptop and a working updater! Not fussed if there isn't, should be an interesting evening - I hope.

    Mike T.



  • Thank you very much for your patience again!!
    Have a nice day!



  • @szatmari60 To be honest, I 've fallen in that trap too once. The numbering scheme of Pycom is VERY CONFUSING!



  • Thanks a lot!
    I am an IDIOT!
    I mismatched G23 with P23

    Is OK!!! '1.6.9.b1'



  • @szatmari60 P23 is not G23. Actuall you have to connect GPIO0 and GND.
    0_1490690060795_index.jpg



  • @szatmari60
    Can you follow the example @robert-hh posted please, it's more reliable in case the wire is broken because his example sets the pin as PULL_UP.



  • @jmarcelino

    thank you for conversation

    I figured out

    from machine import Pin
    p_in = Pin('P23', mode=Pin.IN)
    p_in()

    0



  • @szatmari60 You can use any USB or WiFi terminal which gives you a REPL prompt, like screen, minicom, picocom, telnet, putty,...
    Once you have that prompt, enter:

    from machine import Pin
    g23 = Pin("G23", mode=Pin.IN, pull=Pin.PULL_UP)
    g23.value()
    

    It should tell you the level of the Port. If it is not 0, when connected to GND, then something is wrong.



  • @szatmari60
    What "terminal program" can I us to detect if the P 23 is actually "DOWN" ?
    I change the wires, also the bredboard...



  • @szatmari60
    Are you sure the jumper cable connecting G23 and GND is working? Can you check continuity or try another one. I had a broken jumper cable last week in prototype - it was a nightmare.

    I'm just saying that if you do have G23 and GND connected and nothing else it's nearly impossible that you are getting those regular boot messages. It's a really low level feature of the chip.



  • Hello jmarcelino !
    I checked and rechecked and rechecked with may two board, I folloed the regulations, no cure in may case until now.



  • @szatmari60

    You should not be getting those messages if you really have GND and G23 connected.

    When you have GND+G23 the board goes into a special loader mode. In this mode if you use a terminal program on that port (at 115200) you'll see:

    rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
    waiting for download
    

    Make sure your connections are OK, maybe even replace the jumper cable to make sure there is a connection.

    Also make sure there is nothing else connected to the other pins on the board.



  • Hello Robert!

    YES! And I managed to upgrade my another WiPy 2.0 two or three weaks ago. On original firmware I do not get working ADC.
    Upgraded one booting:
    ""
    PORT OPEN 115200

    Communication with MCU..Got answer! Communication with MCU established.
    AutoDetect firmware...

    Can't autodetect firmware, because proper answer not received (may be unknown firmware).
    Please, reset module or continue.
    Jun 8 2016 00:22:57

    rst:0x1 (POWERON_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:8
    load:0x3fff9018,len:248
    load:0x40078000,len:4056
    load:0x4009fc00,len:920
    entry 0x4009fde4
    I (1515) wifi: wifi firmware version: 90b1b8b
    I (1516) wifi: config NVS flash: disabled
    I (1516) wifi: config nano formating: disabled
    I (1531) wifi: Init dynamic tx buffer num: 32
    I (1532) wifi: wifi driver task: 3ffbd714, prio:23, stack:3584
    I (1532) wifi: Init static rx buffer num: 10
    I (1534) wifi: Init dynamic rx buffer num: 0
    I (1538) wifi: Init rx ampdu len mblock:7
    I (1542) wifi: Init lldesc rx ampdu entry mblock:4
    I (1546) wifi: wifi power manager task: 0x3ffd99a8 prio: 21 stack: 2560
    I (1553) wifi: sleep disable
    I (2542) wifi: wifi timer task: 3ffdaa3c, prio:22, stack:3584
    I (2559) wifi: Init ampdu: 0
    I (2559) wifi: mode : softAP (24:0a:c4:00:68:b1)
    MicroPython v1.8.6-504-gff1098f6 on 2017-03-13; WiPy with ESP32
    Type "help()" for more information.
    import os
    os.uname().release

    '1.6.8.b1'

    """



  • @szatmari60 Even with the manual updater, have you installed the wire between GND and GP23, and Reset after that?



  • Hello, and thank you!
    YES I get a REPL prompt using USB (FTDI chip FT232RL), the basic communication works with Pymkr, screen, ESPlorer, I also can upload files with "ftp"
    Booting process:
    """
    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:8
    load:0x3fff9018,len:248
    load:0x40078000,len:4056
    load:0x4009fc00,len:920
    entry 0x4009fde4
    I (1577) wifi: frc2_timer_task_hdl:3ffd4a2c, prio:22, stack:2048
    I (1592) wifi: Init lldesc rx mblock:10
    I (1593) wifi: Init lldesc rx ampdu len mblock:7
    I (1593) wifi: Init lldesc rx ampdu entry mblock:4
    I (1594) wifi: pp_task_hdl : 3ffdbb68, prio:23, stack:8192
    I (1599) wifi: sleep disable
    I (2588) wifi: mode : softAP (24:0a:c4:00:b4:93)
    MicroPython v1.8.6-463-g468b9d27 on 2017-02-16; WiPy with ESP32
    Type "help()" for more information.
    ">>>import os
    ">>>os.uname().release
    ">>>'1.6.3.b1'
    """
    But the "uploader" cannot communicate with WiPy 2.0. I tried to run manualy on terminal "updater.py" file.
    This is the result:
    """
    ...:~/pyupgrade$ ./bin/updater.py --port "/dev/ttyUSB0 --speed 19200 wmac
    Connecting...........................................
    Exception: Failed to connect to ESP32: Invalid head of packet ('\x08'), on line 161
    """
    I am runnig out of ideas !!



  • @szatmari60
    That seeme like the error I got before I installed the python-serial package.


Log in to reply
 

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