Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLAC: ISO 15118-3 PEV fixes #116

Merged
merged 3 commits into from
Jan 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion slac/pev.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
#define PEV_STATE_UNMATCHED 2
#define PEV_STATE_MATCHED 3

#define PEV_VID "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" // VehicleIdentifier
#define PEV_VID "0000000000000000000000000000000000" // VehicleIdentifier
#define PEV_NMK "50D3E4933F855B7040784DF815AA8DB7" // HomePlugAV
#define PEV_NID "B0F2E695666B03" // HomePlugAV

Expand Down
2 changes: 1 addition & 1 deletion slac/pev_cm_slac_match.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ signed pev_cm_slac_match (struct session * session, struct channel * channel, st
request->MVFLength = HTOLE16 (sizeof (request->MatchVarField));
memcpy (request->MatchVarField.PEV_ID, session->PEV_ID, sizeof (request->MatchVarField.PEV_ID));
memcpy (request->MatchVarField.PEV_MAC, session->PEV_MAC, sizeof (request->MatchVarField.PEV_MAC));
memcpy (request->MatchVarField.EVSE_MAC, session->EVSE_MAC, sizeof (request->MatchVarField.EVSE_MAC));
memcpy (request->MatchVarField.RunID, session->RunID, sizeof (request->MatchVarField.RunID));
if (sendmessage (channel, message, sizeof (* request)) <= 0)
{
Expand Down Expand Up @@ -108,7 +109,6 @@ signed pev_cm_slac_match (struct session * session, struct channel * channel, st
#endif

memcpy (session->EVSE_ID, confirm->MatchVarField.EVSE_ID, sizeof (session->EVSE_ID));
memcpy (session->EVSE_MAC, confirm->MatchVarField.EVSE_MAC, sizeof (session->EVSE_MAC));
memcpy (session->NMK, confirm->MatchVarField.NMK, sizeof (session->NMK));
memcpy (session->NID, confirm->MatchVarField.NID, sizeof (session->NID));
return (0);
Expand Down
6 changes: 3 additions & 3 deletions slac/slac.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
#define SLAC_NID_LEN 7
#define SLAC_NMK_LEN 16

#define SLAC_MSOUNDS 8
#define SLAC_TIMETOSOUND 8
#define SLAC_MSOUNDS 10
#define SLAC_TIMETOSOUND 6
#define SLAC_TIMEOUT 1000
#define SLAC_APPLICATION_TYPE 0
#define SLAC_SECURITY_TYPE 0
Expand All @@ -115,7 +115,7 @@
#define SLAC_SOUNDONLY (1 << 4)

#define SLAC_CM_SETKEY_KEYTYPE 0x01
#define SLAC_CM_SETKEY_PID 0x02
#define SLAC_CM_SETKEY_PID 0x04
#define SLAC_CM_SETKEY_PRN 0x00
#define SLAC_CM_SETKEY_PMN 0x00
#define SLAC_CM_SETKEY_CCO 0x00
Expand Down