V3.1 Expansion board and Debian Linux
-
I'm new to pycom. I wonder if this is a good decision given I use linux, but oh well.
I am using this website as a reference. https://docs.pycom.io/gettingstarted/installation/firmwaretool/
I use glibc 2.28. I downloaded the pycom-fwtool for 2.18 and higher. ie. pycom_firmware_update_1.16.2-amd64.tar.gz
I attempted to run the pycom-fwtool but it segfaults. There aren't any usage instructions on this page so I have no idea how it works. It gives an error about "Cannot load default config file." There is another tool in the tgz file given on that page for linux. The other tool is pycom-fwtool-cli. There are no usage instructions on this tool either.
The remaining documentation on this page is for V3 and V2 expansion boards.
With that said, if you read the Expansion Board 3.0 documentation, which I am not sure applies to me since I have V3.1 board there is a reference which says you should visit this website https://docs.pycom.io/pytrackpysense/installation/firmware/ to update the pysense/pytrack/pyscan exanpansion board V3.
This website is also confusing. For Debian linux it says to install dfu-util which I did. It also mentions pressing the S1 button and plugin and then install pytrack. This fails. Ditto for pysense. This command does work. sudo dfu-util -VD expansion31_0.0.11.dfu
lsusb shows
Bus 003 Device 030: ID 04d8:ef98 Microchip Technology, Inc.
This does not match the docs which says
For exemple, a Pytrack board is visible as either:
Bus 020 Device 004: ID 04d8:f014 Microchip Technology Inc. Application Specific Device
this is bootloader mode (f014 is USB PID), active just for 7-8 seconds, if the reset button was just pressed before plugging USB connector.
Bus 020 Device 005: ID 04d8:f013 Microchip Technology Inc. Pytrack Serial: Pyabcde0
this is normal, application mode (f013 is USB PID), this means the bootloader verified application partition and it boot-up correctly.Is pytrack or pysense a board similar to an expansion board or something which is part of an expansion board?
With that said any idea how to get the pycom-fwtool working with the latest stable Debian?
-
@robert-hh I was able to flash both expansion boards using the dfu-util tool. I was able on osx to only update firmware with the pycom gui prebuilt code. Later I managed to get the github repo code to work for flashing both modules. I truly appreciate you showing me this repo. Many thanks.
-
Hmm. So I finally got that code to build for the fypy.
davis@twenty:~/progs/notmine/forpycom/pycom-micropython-sigfox/esp32$ make ESPPORT=/dev/ttyACM0 flash
Use make SECURE=on [optionally SECURE_KEY ?= secure_boot_signing_key.pem] to enable Secure Boot and Flash Encryption mechanisms.
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
BASE Variant
IDF Version OK!
checking size of image
1822368 bytes => Size OK
Creating release package in /home/davis/progs/notmine/forpycom/pycom-micropython-sigfox/esp32/build
Release package FiPy-1.20.2.rc6.tar.gz created successfully.
checking size of image
1822368 bytes => Size OK
Flashing project
python ./tools/fw_updater/updater.py --port /dev/ttyACM0 --speed 921600 flash -t build/FiPy-1.20.2.rc6.tar.gz
Running in PIC mode
Script Version: 2.1
Flash operation successful.
-
@netskink You can specify the USB port in the make command, e.g.:
make ESPPORT=/dev/ttyACM0 BOARD=LOPY4 flash
You can also edit Makefile to change the default BOARD and edit application.mk to change the default ESPPORT and ESPBAUD setting.
-
@netskink If updating works with the FiPy, then the expansion boards and cables are fine. Then something might be wrong with the LoPy4 board. With respect to firmware updates, all Pycom development boards behave identical (at least: the should). Besides not updating, does it work?
Sometimes
-
Ok some other info regarding osx and the firmware upgrade utility. I have two expansions boards, one fypy and one lopy4 and two USB cables. The firmware upgrade utility will update the firmware on the fypy board with either expansion board using either USB cable. The lopy4 board will not update the firmware using either expansion board or USB cable. Also, one of the expansion boards has updated firmware and the other is fresh from the factory.
-
@robert-hh said in V3.1 Expansion board and Debian Linux:
https://github.com/pycom/pycom-micropython-sigfox/tree/Dev/esp32/tools/fw_updater
FWIW, I tried this on OSX. With OSX, I can connect atom. I played with the LED. I tried to use the firmware update tool 1.16.2 to update the firmware. I played with legacy vs pybytes. I played with usb connection speed settings. I could never get the firmware to update. I kept getting this message.
Changed baud rate to 230400 Read 4 KiB from config in 0.18 seconds Device ID : FCF5C40E185C
Any advice is appreciated.
-
hmm.
I have used esp32 before with a regular esp32 chip so the repo you mentioned is interesting.
With that said, I did as documented on the sigfox repo you gave. I tried to flash the tool using the commands they give for a lopy4. ie. make BOARD=LOPY4 flash however I don't have a /dev/ttyUSB0 device. If I am in atom it shows its connecting via /dev/ttyACM0.
Interesting if I try to run the updater script you mentioned, it seems to be very terse. I can list the device, but nothing else.
davis@twenty:~/progs/notmine/forpycom/pycom-micropython-sigfox/esp32/tools/fw_updater$ python updater.py list /dev/ttyACM0 [Expansion3 - Expansion3] [USB VID:PID=04D8:EF98 SER=Pycb57e4 LOCATION=1-1:1.0]
This shows the board is present on the /dev/ttyACM0 also, but it only shows the expansion board and not the LOPY4.
Any info on how to update the flash using this tool or where to file a bug on the regular fw update tool for Debian 10?
-
Hmm. I talked to the #debian channel on openprojects.net. It appears that my errors are because the tool is using an older version of fontconfig. Do you have fontconfig loaded?
Lastly, I am trying to use the github repot you specified. I'm working on that now.
-
@robert-hh Hmm. I tried using the ubuntu 18 debian package you mentioned.
which pycom-fwtool /usr/local/bin/pycom-fwtool
As you can see, its not the one I downloaded via the .tgz file. Sadly it also segfaults.
Here is some of the error log.
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules" Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule" .... Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 5: invalid attribute 'translate' Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 5: invalid attribute 'selector' Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'xmlns:its' Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'version' Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf Segmentation fault
I understand now that pysense, pytrack and expansion board are all boards. And, the docs for that page are on how you can update either of these boards using the dfu-util tool. So hey, that is a good thing, right? I'm making progress with this tool. ;-)
-
@netskink I use the Ubuntu version of pyupgrade on my debian 10 system. The command line versions which I used before seem to be broken. There is also a python script call updater.py, which is used for uploading in the build environment. It is here: https://github.com/pycom/pycom-micropython-sigfox/tree/Dev/esp32/tools/fw_updater. You will need also the other scripts in that directory. For Usage, call python2 updater.py --help
Updating the expansion boards is tricky. You have to be fast and you need at least three hands.