mirror of
https://github.com/femtofox/femtofox.git
synced 2026-11-20 15:06:36 -05:00
Merge pull request #49 from noon92/working
change method to determine nodeid
This commit is contained in:
commit
bbf4db0849
1 changed files with 1 additions and 1 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue