v.02 Resolved address error in SDP. Gave for time for SDP and TCP. Added docu. Fixed parameter bug.

This commit is contained in:
uhi22 2022-11-25 12:17:53 +01:00
parent 9a555df269
commit 6db498feb6
7 changed files with 22 additions and 6 deletions

View file

@ -908,7 +908,9 @@ class pyPlcHomeplug():
if ((not self.isEvseModemFound()) and (not self.isSimulationMode)):
self.nEvseModemMissingCounter+=1
self.addToTrace("[PEVSLAC] No EVSE seen (yet). Still waiting for it.")
if (self.nEvseModemMissingCounter>5):
# At the Alpitronic we measured, that it takes 7s between the SlacMatchResponse and
# the chargers modem reacts to GetKeyRequest. So we should wait here at least 10s.
if (self.nEvseModemMissingCounter>10):
if (self.isSimulationMode):
self.addToTrace("[PEVSLAC] No EVSE modem. But this is fine, we are in SimulationMode.")
else:

View file

@ -249,6 +249,8 @@ class ipv6handler():
self.IpRequest[5] = plen & 0xFF
self.IpRequest[6] = 0x11 # next level protocol, 0x11 = UDP in this case
self.IpRequest[7] = 0x0A # hop limit
# We are the PEV. So the EvccIp is our own link-local IP address.
self.EvccIp = self.addressManager.getLinkLocalIpv6Address("bytearray")
for i in range(0, 16):
self.IpRequest[8+i] = self.EvccIp[i] # source IP address
for i in range(0, 16):
@ -351,6 +353,7 @@ class ipv6handler():
# self.SeccIp = [ 0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0xe0, 0xad, 0x99, 0xac, 0x52, 0xeb, 0x85, 0xd3 ]
# 16 bytes, a default IPv6 address for the vehicle
# todo: On EVSE side, extract the vehicles IP address from the SDP communication
# Just a default, will be overwritten later:
self.EvccIp = [ 0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0x06, 0x65, 0x65, 0xff, 0xfe, 0, 0x64, 0xC3 ]
#self.ownMac = [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 ] # 6 bytes own MAC default. Should be overwritten before use.
self.ownMac = self.addressManager.getLocalMacAddress()

View file

@ -63,7 +63,7 @@ class pyPlcTcpClientSocket():
self.sock.setblocking(0) # make this socket non-blocking, so that the recv function will immediately return
self.isConnected = True
except socket.error as e:
self.addToTrace("connection failed", e)
self.addToTrace("connection failed" + str(e))
self.isConnected = False
def transmit(self, msg):

View file

@ -9,6 +9,7 @@ import fsmEvse
import fsmPev
from pyPlcModes import *
import addressManager
import time
class pyPlcWorker():
@ -43,6 +44,9 @@ class pyPlcWorker():
def callbackReadyForTcp(self, status):
if (status==1):
self.workerAddToTrace("[PLCWORKER] Network is established, ready for TCP.")
self.workerAddToTrace("[PLCWORKER] Waiting....")
time.sleep(5)
self.workerAddToTrace("[PLCWORKER] now...")
if (self.oldAvlnStatus==0):
self.oldAvlnStatus = 1
if (self.mode == C_PEV_MODE):

View file

@ -282,6 +282,15 @@ version request broadcast message, to find out, whether we have at least two hom
car and one for the charger). If this is fulfilled, we should use the SDP to discover the chargers IPv6 address. But this
is not yet implemented.
### 2022-11-25 v0.2 On ABB charger until ChargeParamDiscoveryRequest
- With Win10 notebook in PevMode, tested on Alpitronics HPC and ABB Triple charger. On the Alpi, the SLAC and SDP works. The TCP connection fails. On ABB, the SLAC, SDP and TCP works. Also the protocol negotiation works. We come until ChargeParamDiscoveryReqest.
- Log messages are sent via UDP port 514 as broadcast, like Syslog messages. The Wireshark shows them as readable text, so we have the actual communication between car and charger in the trace and also the debug log.
- Example pcap in results/2022-11-25_v0.2_ABB_until_ChargeParamDiscovery.pcapng
- With Win10 notebook in EvseMode, tested on the Ioniq car. It comes until the CurrentDemandRequest.
- For using Raspberry in PevMode without display, there is now the pevNoGui.py, which can be auto-started by configuring a service which calls starter.sh, and this calls starter.py (this is still expermental).
- The old Raspberry model B needs 90s from power-on until it sends the first log messages. Means, the boot is quite slow.
- Raspberry in PevMode and Win10 notebook in EvseMode work well together until the PreCharge.
## Biggest Challenges
- [*ListenMode*] Find a way to enable the sniffer mode or monitor mode in the AR7420. Seems to be not included in the public qca/open-plc-utils.
@ -294,12 +303,10 @@ functions Monitor() and Sniffer(), but these are included from a path ../nda/ wh
Any idea how to enable full-transparency of the AR7420?
- [all modes] replace the fix-configured addresses (MAC, IP) in the python script by the real one from the operating system
## Other open topics
- [*EvseMode*] [*PevMode*] Fill V2G messages as far as needed, to convince the car to accept it.
- [*PevMode*] Implement SDP to get the chargers IPv6 address
- [*PevMode*] Testing on real charger
- [*PevMode*] Find out TCP connection issue on Alpitronics
- [*PevMode*] Implement TCP connection retry
- improve docu (update layer diagram, improve hardware docu, add link to evse which provides the 5% PWM)
- Resolve the todo-markers in the code
- (and much more)

Binary file not shown.