Smart Home Automation Forum

Full Version: Flash A16 from Linux CLI
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,  please can you link to a guide that describes how to flash KC868-A16 using idf.py or similar Linux CLI tool ?

I think reading the forum that the source for "firmware 2.1.9" is not available - please advise if I got this wrong.

thanks!

(10-29-2023, 04:36 AM)kramd Wrote: [ -> ]Hi,  please can you link to a guide that describes how to flash KC868-A16 using idf.py or similar Linux CLI tool ?

I think reading the forum that the source for "firmware 2.1.9" is not available - please advise if I got this wrong.

thanks!

Specifically, flash KCS_KC868_A16_V2.1.9.bin ...
you can use esp download tool , here is online guide: https://www.kincony.com/esp32-kcsv2-firmware.html
if you want use esp32 python tool, see here : https://esphome.io/guides/installing_esphome
installed python, then use command line to download firmware.
(10-29-2023, 08:09 AM)admin Wrote: [ -> ]you can use esp download tool , here is online guide: https://www.kincony.com/esp32-kcsv2-firmware.html
if you want use esp32 python tool, see here : https://esphome.io/guides/installing_esphome
installed python, then use command line to download firmware.

I do not have a windows computer, so I cannot use the windows tool.  I can program the board using the esp32 tools (https://docs.espressif.com/projects/esp-...setup.html)

However, these tools are expecting a build environment and don't describe how to flash a single file, without the environment.

What is the command you recommend to "use command line to download firmware" ?

thanks
https://github.com/espressif/esptool/releases
i think you can use this, that have Linux version.
(10-29-2023, 08:27 AM)admin Wrote: [ -> ]https://github.com/espressif/esptool/releases
i think you can use this, that have Linux version.

I will try this and confirm.  Thanks for your help and quick response.
you are welcome.
(10-29-2023, 09:04 AM)admin Wrote: [ -> ]you are welcome.

I built an environment, and I can program the board with:

esptool.py --chip esp32 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin

I (316) main_task: Calling app_main()

Hello world!
This is esp32 chip with 2 CPU core(s), WiFi/BTBLE, silicon revision v3.0, 2MB external flash

To flash KCS_KC868_A16_V2.1.9.bin - what are the correct parameters to use ?

I am wondering if the bin file provided includes bootloader.bin, application.bin and partition_table.bin in a single file, but do I use 0x1000 offset ?

thanks
without any other files, the BIN file is ALL IN ONE. download by address 0x0
(10-30-2023, 11:07 AM)admin Wrote: [ -> ]without any other files, the BIN file is ALL IN ONE. download by address 0x0

Thanks, that was successful - appreciate your help.

$ esptool.py --chip esp32 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x0000 KCS_KC868_A16_V2.1.9.bin
esptool.py v4.7.dev2
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 90:38:0c:a4:38:c8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x001fbfff...
Compressed 2078016 bytes to 782618...
Wrote 2078016 bytes (782618 compressed) at 0x00000000 in 24.3 seconds (effective 682.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
ok, good.