Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
// MAC address of our PLC modem (EV side)
uint8_t plc_mac[ETH_ALEN] = {0x00, 0xB0, 0x52, 0x00, 0x00, 0x01};

// MAC address to use for SET KEY req
uint8_t plc_mac_chip_commands[ETH_ALEN] = {0x00, 0xB0, 0x52, 0x00, 0x00, 0x01};

Check warning on line 67 in lib/everest/slac/fsm/ev/include/everest/slac/fsm/ev/context.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

lib/everest/slac/fsm/ev/include/everest/slac/fsm/ev/context.hpp#L67

struct member 'Context::plc_mac_chip_commands' is never used.

// event specific payloads
// FIXME (aw): due to the synchroneous nature of the fsm, this could be even a ptr/ref
slac::messages::HomeplugMessage slac_message;
Expand Down
2 changes: 1 addition & 1 deletion lib/everest/slac/fsm/ev/src/states/others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void JoinNetworkState::enter() {
msg.new_eks = slac::defs::CM_SET_KEY_REQ_PEKS_NMK_KNOWN_TO_STA;
memcpy(msg.new_key, nmk, sizeof(msg.new_key));

ctx.send_slac_message(ctx.plc_mac, msg);
ctx.send_slac_message(ctx.plc_mac_chip_commands, msg);

timeout = std::chrono::steady_clock::now() + std::chrono::milliseconds(SET_KEY_TIMEOUT_MS);
}
Expand Down
4 changes: 4 additions & 0 deletions modules/EV/EvSlac/main/ev_slacImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ void ev_slacImpl::run() {
callbacks.log_error = [](const std::string& text) { EVLOG_error << "EvSlac: " << text; };

auto fsm_ctx = slac::fsm::ev::Context(callbacks);

// Copy correct MAC address
memcpy(fsm_ctx.plc_mac, slac_io.get_mac_addr(), sizeof(fsm_ctx.plc_mac));

// fsm_ctx.slac_config.set_key_timeout_ms = config.set_key_timeout_ms;
// fsm_ctx.slac_config.ac_mode_five_percent = config.ac_mode_five_percent;
// fsm_ctx.slac_config.sounding_atten_adjustment = config.sounding_attenuation_adjustment;
Expand Down