diff --git a/fsmPev.py b/fsmPev.py index 332a417..57f79bf 100644 --- a/fsmPev.py +++ b/fsmPev.py @@ -286,6 +286,7 @@ class fsmPev(): self.sessionId = strSessionId except: self.addToTrace("ERROR: Could not decode the sessionID") + if ((strResponseCode!="OK_NewSessionEstablished") and (strResponseCode!="OK")): # According to the standard, the only valid response code is OK_NewSessionEstablished. # But the ABB chargers use "OK", so we need to accept this, too. Discussed diff --git a/hardwareInterface.py b/hardwareInterface.py index 534fa19..968b1f8 100644 --- a/hardwareInterface.py +++ b/hardwareInterface.py @@ -12,8 +12,8 @@ from time import sleep, time from configmodule import getConfigValue, getConfigValueBool import sys # For exit_on_session_end hack -PinCp = "P8_18" -PinPowerRelay = "P8_16" +PinCp = "P9_41" +PinPowerRelay = "P9_17" if (getConfigValue("digital_output_device")=="beaglebone"): # In case we run on beaglebone, we want to use GPIO ports. diff --git a/starter.sh b/starter.sh index ee38ce4..2fc5136 100755 --- a/starter.sh +++ b/starter.sh @@ -39,9 +39,11 @@ sysctl net.ipv6.conf.eth0.keep_addr_on_down=1 # Todo: Why this needed? On raspberry, where the NetworkManager is not runnning, this disturbs, because # afterwards the pyPlc does not see the interfaces IPv6 address. # Todo: make this configurable, for the cases we need this. -# ip link set eth0 down +ip link set eth0 down +ip link set can0 down sleep 1 -# ip link set eth0 up +ip link set eth0 up +ip link set can0 up type can restart-ms 100 bitrate 500000 sleep 1 # show the addresses @@ -53,17 +55,25 @@ pwd # create directory for the log files. mkdir -p log # prepare the file names for the log files +pushd log +gzip *.log || true +popd date=$(date "+%Y-%m-%d_%H%M%S") -logfile=./log/"$date"_pevNoGui.log -tcpdump_logfile=./log/"$date"_tcpdump.pcap +#logfile=./log/"$date"_pevNoGui.log +#logfile=./log/pevNoGui.log +index=`cat log/logindex` +logfile=`printf "log/%04d_pevNoGui.log" $index` +tcpdump_logfile=`printf "log/%04d_tcpdump.pcap" $index` +index=$(($index + 1)) +echo $index > log/logindex echo "logfile: $logfile" echo "tcpdump_logfile: $tcpdump_logfile" # start the tcpdump -start_tcpdump "$tcpdump_logfile" +#start_tcpdump "$tcpdump_logfile" -echo "$date" >> "$logfile" +echo "$date" > "$logfile" git log --oneline -1 >> "$logfile" || echo "Not a git repo" >> "$logfile" ip addr >> "$logfile" pwd >> "$logfile"