From 9f596dccd0c46a38e114f7c11ec41ce627c78d96 Mon Sep 17 00:00:00 2001 From: nagumii Date: Thu, 19 Dec 2024 16:54:16 +0200 Subject: [PATCH] change method to determine nodeid --- .../sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/runonce.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/runonce.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/runonce.sh index b924d01..bf61776 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/runonce.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/runonce.sh @@ -15,7 +15,7 @@ hwaddress ether $(awk '/Serial/ {print $3}' /proc/cpuinfo | tail -c 11 | sed 's/ EOF # set meshtastic nodeid to derivative of CPU serial number (unique to this board). Check at boot in case of upgrade overwriting this. -seed=$(printf "%d\n" 0x$(awk '/Serial/ {print $3}' /proc/cpuinfo) | tail -c 9) +seed=$(echo "ibase=16; $(sudo echo $(awk '/Serial/ {print $3}' /proc/cpuinfo) | tr '[:lower:]' '[:upper:]')" | bc | tail -c 9) #seed=$((0x$(awk '/Serial/ {print $3}' /proc/cpuinfo) & 0x3B9AC9FF)) #alternate method for generating seed - not in use sed -i "/^ExecStart=/ s:$: -h $seed:" /usr/lib/systemd/system/meshtasticd.service msg="First boot: Using Luckfox CPU S/N to generate nodeid for Meshtastic."