bvanheu / stratatools

Stratasys EEPROM tool
BSD 3-Clause "New" or "Revised" License
88 stars 40 forks source link

Check sum error #79

Closed mateosar closed 4 years ago

mateosar commented 4 years ago

I made a bash script to automate the proccess but even doing it manual I get the same error code. The files are not being decrypted even though I check the UID many times and have it so that when I decrypt de eeprom it checks it adds the UID directly. Is there any way I can fix this?

mateosar commented 4 years ago

This is the scrypt I made

!/bin/bash

if [ -d /sys/bus/w1/devices/w1_bus_master1/23-000* ] then echo "The Foler exists."

echo /sys/bus/w1/devices/w1_bus_master1/23-00*

folder=/sys/bus/w1/devices/w1_bus_master1/23-00*

if [ -f $folder/id ]
then        
    file=$folder/id
    echo $file
    xxd -p $file 
    sudo cp -fr $folder/eeprom ~/eprom1
    stratatools eeprom_decode --machine-type prodigy --eeprom-uid $(xxd -p $file) eprom1 > eprom1.txt
    sed -i '11s/.*/current_material_quantity: 56.3/' eprom1.txt
    stratatools eeprom_encode --machine-type prodigy --eeprom-uid $(xxd -p $file) eprom1.txt eeprom
    ( cd $folder ; sudo chmod 777 eeprom )
    cp -fr /home/pi/eeprom $folder/eeprom
    cp /home/pi/eeprom $folder/eeprom
    ( cd $folder ; stratatools eeprom_decode --machine-type prodigy --eeprom-uid $(xxd -p $file) eeprom )
else
    echo "No file"
fi