THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, YOU ARE USING THIS AT YOUR OWN RISK. PATCHING THE FIRMWARE MIGHT VOID YOUR TRANSEIVER WARRANTY. ENSURE MAKING A BACKUPS AND THINK OF WHAT ACTIONS YOU ARE PERFORMING. NONE OF THE AUTHORS, CONTRIBUTORS, ADMINISTRATORS, OR ANYONE ELSE CONNECTED WITH THIS REPOSITORY, IN ANY WAY WHATSOEVER, CAN BE RESPONSIBLE FOR YOUR USE OF THE SOFTWARE BELOW.
File will be created from EMPTY.ICF template, if not provided.
See =./ic_f300_patcher.sh -h= to see the list of supported values for changing.
Help and fallback is not yet stable, so follow the available values:
| %channel_numeber% | 1-30 |
| %power_setting% | l1, l2, h (default) |
| %modulation_depth%= | w (default) |
Example:
#+NAME: example
#+BEGIN_SRC sh :eval never
./ic_f300_patcher.sh -s 1=172867 -p l1 -m n
#+END_SRC
As soon as this script substitutes the existing values inside the binary, provided values shoud have the same bit-length as default. Otherwise it may lead to the segmentation fault. Remember to backup the firmware.
** Theory behind
Well, it needs a bit of a hex-magic. But valuables are easy find-and-replaceable in hexeditor. Here are some offsets to remember:
Start offset of the Rx freq of the first Channel of the first bank - =0000050b=
Length of channel record is 44 bytes?
#+NAME: theoretical chan mapping
#+BEGIN_SRC bash
#!/bin/bash
result=$(( 0x50b - 0x2c ))
for i in {0..30}; do
result=$(($result + 0x2c))
if [ "$i" -eq 9 ]; then
result=$(( $result + 0x8 ))
elif [ "$i" -eq 14 ]; then
result=$(( $result + 0x8))
elif [ "$i" -eq 23 ]; then
result=$(( $result + 0x8))
fi
printf "%d, 0x%X\n" "$((i + 1))" "$result"
done
#+END_SRC
Here is the comparison of calculated channel offsetts and the real one, obtained from the incremental changes diffing