Andrik45719 / ZY-M100

ZY-M100/WZ-M100 solving network spamming
49 stars 0 forks source link

ZY-M100-L/S_1/S_2/24G/24GV2 solving network spamming problem by disabling Target Distance reporting

Mods:

Suppoted models:

ZY-M100-S_2 ceiling mount

Connect to JLink

Signal ZY-M100-L J-Link GD32
VCC (square pad) 1 (Vref) 1
GND 2 4
SWDIO 3 7 19
SWCLK 4 9 20

JLink ZY-M100-L wall mount JLink ZY-M100-L ceiling mount

Backup original firmware

JLink.exe -device GD32E230F8 -if SWD -speed 4000 -autoconnect 1 
savebin ZY-M100_bkup.bin 0x08000000 0x10000
exit

Flash modified firmware

JLink.exe -device GD32E230F8 -if SWD -speed 4000 -autoconnect 1 
loadfile ZY-M100-{your_model_here}-TargetDistance_disable.bin 0x08000000 reset
VerifyBin ZY-M100-{your_model_here}-TargetDistance_disable.bin  0x08000000
exit

Restore backuped firmware

JLink.exe -device GD32E230F8 -if SWD -speed 4000 -autoconnect 1 
loadfile ZY-M100_bkup.bin 0x08000000 reset
VerifyBin ZY-M100_bkup.bin  0x08000000
exit

Connect to ST-Link V2 clone

Signal ZY-M100-L ST-Link V2 GD32
VCC (square pad) 1 2
GND 2 7
SWDIO 3 6 19
SWCLK 4 4 20

Be careful check adapter pinout! Some clones have different one.

JLink ZY-M100-L ceiling mount JLink ZY-M100-L wall mount

Backup original firmware using OpenOCD

openocd -f interface/stlink.cfg -f target/gd32e23x.cfg -c init -c "reset halt" -c "flash read_bank 0 ZY-M100_bkup.bin" -c "reset" -c shutdown

Flash modified firmware

openocd -f interface/stlink.cfg -f target/gd32e23x.cfg -c init -c "reset halt" -c "flash erase_sector 0 0 last" -c "flash write_bank 0 ZY-M100-{your_model_here}-TargetDistance_disable.bin" -c "flash verify_bank 0 ZY-M100-{your_model_here}-TargetDistance_disable.bin" -c "reset" -c shutdown

Restore backuped firmware

openocd -f interface/stlink.cfg -f target/gd32e23x.cfg -c init -c "reset halt" -c "flash erase_sector 0 0 last" -c "flash write_bank 0 ZY-M100_bkup.bin" -c "flash verify_bank 0 ZY-M100_bkup.bin" -c "reset" -c shutdown

Step by step guide by @tandarra

Software