summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMikhail Zhilkin <csharper2005@gmail.com>2023-11-12 07:46:11 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2023-11-25 01:11:18 +0100
commit28d32244e122051ec88551e831fb9cf34da7cd76 (patch)
treef0a58e18d15da270d962538cd13935bc46611206 /scripts
parent58df088d75b0a809bc89fcb45e6c53945899d7ad (diff)
downloadopenwrt-28d32244e122051ec88551e831fb9cf34da7cd76.tar.gz
openwrt-28d32244e122051ec88551e831fb9cf34da7cd76.tar.bz2
openwrt-28d32244e122051ec88551e831fb9cf34da7cd76.zip
scripts: sercomm-pid.py: use uppercase hwid in pid
Sercomm uses uppercase for hexadecimal representation of the device hardware IDs in factory image PID. This commit brings the sercomm-pid.py script into compliance with the original Sercomm algorithm. Example ------- +--------+-------------+-----------+-------------+ | Device | PID (before | PID | PID (after | | HWID | the commit) | (Sercomm) | the commit) | +--------+-------------+-----------+-------------+ | CPJ | 43 50 4a | 43 50 4A | 43 50 4A | +--------+-------------+-----------+-------------+ Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sercomm-pid.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/sercomm-pid.py b/scripts/sercomm-pid.py
index 4d88a67839..2c246fc298 100755
--- a/scripts/sercomm-pid.py
+++ b/scripts/sercomm-pid.py
@@ -34,7 +34,7 @@ def get_pid(args):
enc = args.hw_version.rjust(8, '0').encode('ascii')
struct.pack_into('>8s', buf, 0x0, enc)
- enc = binascii.hexlify(args.hw_id.encode())
+ enc = binascii.hexlify(args.hw_id.encode()).upper()
struct.pack_into('>6s', buf, 0x8, enc)
enc = args.sw_version.rjust(4, '0').encode('ascii')