Skip to content

Commit

Permalink
fix for #24: ignore SLAC and SDP while high level communication is on…
Browse files Browse the repository at this point in the history
…going
  • Loading branch information
uhi22 committed Jul 13, 2024
1 parent f953bd8 commit a705ebd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ccs/homeplug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,13 @@ static void evaluateGetKeyCnf(void) {}

void evaluateReceivedHomeplugPacket(void)
{
if (connMgr_getConnectionLevel()==100) {
/* we have TCP traffic running, so we ignore all homeplug management packets. This
makes us robust against cross-talk from other charging cables.
Discussion here: https://github.com/uhi22/ccs32clara/issues/24 */
addToTrace(MOD_HOMEPLUG, "[HOMEPLUG] Ignoring homeplug message, because high level communication is ongoing.");
return;
}
switch (getManagementMessageType())
{
case CM_GET_KEY + MMTYPE_CNF:
Expand Down
7 changes: 7 additions & 0 deletions ccs/ipv6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ void evaluateUdpPayload(void) {
udpPayload[7];
if (v2gptPayloadLen == 20) {
//# 20 is the only valid length for a SDP response.
if (connMgr_getConnectionLevel()==100) {
/* we have TCP traffic running, so we ignore additional SDP messages. This
makes us robust against cross-talk from other charging cables.
Discussion here: https://github.com/uhi22/ccs32clara/issues/24 */
addToTrace(MOD_SDP, "[SDP] Ignoring SDP response, because high level communication is ongoing.");
return;
}
addToTrace(MOD_SDP, "[SDP] Checkpoint203: Received SDP response");
setCheckpoint(203);
//# at byte 8 of the UDP payload starts the IPv6 address of the charger.
Expand Down

0 comments on commit a705ebd

Please sign in to comment.