Firmware update without expansion board



  • hi
    How do I update the firmware on the Sipy without an expansion board?>
    I am able to connect to Atom and my pc via Wifi, but this is the first time i am using a Pycom device and the first time using mycropython

    Cheers
    Bruce



  • @robert-hh Thanks for the info
    I have so much to learn I don't know where to start!!
    Best would be to find a good micro python training course and starting from scratch



  • @sandking You can set your device to station mode to be just a unit in out network, with a code in main.py or boot.py like:

    import network
    import time
    
    wlan = network.WLAN(network.STA_IF) # create station interface
    wlan.active(True)       # activate the interface
    if not wlan.isconnected():      # check if the station is connected to an AP
        wlan.connect('your_ap', 'your_ap_password') # connect to an AP
        for _ in range(10):
            if wlan.isconnected():      # check if the station is connected to an AP
                break
            print('.', end='')
            time.sleep(1)
        else:
            print("Connect attempt timed out\n")
            return
    print('\nnetwork config:', wlan.ifconfig())
    


  • @robert-hh my problem was that I could not connect to my internet wifi and the board at the same time
    I just plugged straight into the router and by passed the problem
    Now to start learning python and getting to work on the project!!!
    thanks for all your help



  • @sandking Sorry, I'm not using pymakr at all. From the few tests I made I recall, that instead of the IP address you would simply enter the name of the serial port, like /dev/ttyUSB0 on Linux, or COM3 on windows, ..
    Omn windows it may be difficult to tell, which COM port is used. The windows device manager can tell you.



  • @robert-hh i got the expansion board and got the software uploaded
    now i can get the usb to connect, only the wifi.
    I am using Atom and i am trying to follow the instructions but clearly i am out of my league today!!
    I have the pymkr plugin installed on atom
    How do i change the device address so that i can upload via usb?



  • @sandking Looks like you need run an USB update then.



  • @robert-hh yes i did
    no flashing LED on the board either, but i did have it when i started with this process



  • @sandking Did you push the reset button? That's the brand new start.



  • @robert-hh I got the appimg.bin file and used the ftp to transfer.
    I did the restart and now there is no wifi connection showing for the Sipy
    Will i need to do a hard reset?
    Or what might have gone wrong?



  • @sandking For ftp update you do not need to connect G23 (aka GPIO0, aka P2) to GND, for Serial update you have to.
    Reboot is either a power cycle or pushing the reset button.



  • Thanks,
    do i still need to connect pin 23 to ground before linking the device?
    and what is the reboot procedure ?



  • @sandking If the actual firmware is sufficiently recent (beyond 1.12.0b1), then you can update by ftp. It is a little bit inconvenient to get the file for uploading, since it is inside the archive used for "normal" update. For the actual version it is https://software.pycom.io/downloads/SiPy-1.16.0.b1.tar.gz. In this archive, look for the file appimg.bin.
    Then use an ftp client and configure it accoring to section https://docs.pycom.io/chapter/toolsandfeatures/FTP.html of the instructions.
    Then copy appimg.bin to /flash/sys
    After reboot, you shoudl get the new version.
    This will however not update the bootloader. So there are situations where you still have to update via USB/serial. For that purpose, get a USB/Serial adapter, set it to 3.3V output level and connect it to GND, RX0 (P0), TX0 (P1) of your device. You might also be able to supply the SiPy from that adapter though Vin. Could be tricky since not all adapters can deliver the required current at 3.3V, and switching to 5V would also change the logical levels of TX and RX, which is NOT reccomended.



Pycom on Twitter