Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update scripts for firmware 3.3 and 4.3 on POSIX OSes #15

Open
ThomasWaldmann opened this issue May 4, 2024 · 1 comment
Open

update scripts for firmware 3.3 and 4.3 on POSIX OSes #15

ThomasWaldmann opened this issue May 4, 2024 · 1 comment

Comments

@ThomasWaldmann
Copy link
Contributor

ThomasWaldmann commented May 4, 2024

I finally updated my devices to the current firmware and had to make scripts for macOS due to the different executable name, usb-serial port name, UNIX style line endings, different needs for argument quoting, etc.

Guess if one changes the port name (which one has to check anyway), they would also work on Linux, BSD, etc.

I successfully tested them on a MacBook Pro with Apple Silicon here, but guess they also work on Intel. The scripts are based on the original update*.bat for Windows.

I also added some docs at the top of the scripts.

I had some v2.x devices, first upgraded to v3.3 (not sure if necessary), then upgraded to v4.3 using these scripts and a USB-C cable.

To upgrade to v4.4, I then used the OTA web-based firmware upload method via WiFi.

update_fw_3.3_wifi_macos.sh

## Updating the OpenCO2 sensor to firmware release 3.3 (with wifi) on macOS.
# 0. download all the .bin files of the 3.3 release from github releases page and put them into current directory.
# 1. brew install esptool    (or somehow else have a working esptool.py)
# 2. OpenCO2 sensor: press and hold the button close to the usb port, then shortly press the reset button on the other side.
# 3. execute this script.
esptool.py --chip esp32s2 --port /dev/tty.usbmodem01 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 OpenCO2_Sensor.ino.bootloader.bin 0x8000 OpenCO2_Sensor.ino.partitions.bin 0xe000 boot_app0.bin 0x10000 wifi.bin

update_fw_4.3_wifi_macos.sh

## Updating the OpenCO2 sensor to firmware release 4.3 (with wifi) on macOS.
# 0. download all the .bin files of the 4.3 release from github releases page and put them into current directory.
# 1. brew install esptool    (or somehow else have a working esptool.py)
# 2. OpenCO2 sensor: press and hold the button close to the usb port, then shortly press the reset button on the other side.
# 3. execute this script.
esptool.py --chip esp32s2 --port /dev/tty.usbmodem01 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 OpenCO2_Sensor.ino.bootloader.bin 0x8000 OpenCO2_Sensor.ino.partitions.bin 0xe000 boot_app0.bin 0x10000 OpenCO2_Sensor.ino.bin
@ThomasWaldmann ThomasWaldmann changed the title update scripts for firmware 3.3 and 4.3 on macOS update scripts for firmware 3.3 and 4.3 on POSIX OSes May 4, 2024
@davidkreidler
Copy link
Owner

Thank you very much for sharing the details on how to update under macOS using esptool.
This process was not scalable at none tech enthusiastic costumers. For all (new) devices running V4.4+ when they get connected via USB to a computer they emulate an USB flash drive to enable copy pasting of FIRMWARE.BIN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants