Skip to content

Commit cec7846

Browse files
committed
fix provisioning sketch for opta lite
1 parent 39ead2e commit cec7846

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/utility/Provisioning_2.0/ClaimingHandler.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <ArduinoBLE.h>
1313
#include "utility/HCI.h"
1414
#include <Arduino_HEX.h>
15+
#include "ANetworkConfigurator_Config.h"
1516

1617
#define SLOT_BOARD_PRIVATE_KEY 1
1718

@@ -150,6 +151,9 @@ void ClaimingHandlerClass::resetStoredCredReqHandler() {
150151
void ClaimingHandlerClass::getBLEMacAddressReqHandler() {
151152
uint8_t mac[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
152153

154+
#ifdef ARDUINO_OPTA
155+
if(_getPid_() == OPTA_WIFI_PID) {
156+
#endif
153157
bool activated = false;
154158
ConfiguratorAgent * connectedAgent = _agentManager.getConnectedAgent();
155159
if(!_agentManager.isAgentEnabled(ConfiguratorAgent::AgentTypes::BLE) || (connectedAgent != nullptr &&
@@ -168,7 +172,9 @@ void ClaimingHandlerClass::getBLEMacAddressReqHandler() {
168172
if (activated) {
169173
BLE.end();
170174
}
171-
175+
#ifdef ARDUINO_OPTA
176+
}
177+
#endif
172178
ProvisioningOutputMessage outputMsg;
173179
outputMsg.type = MessageOutputType::BLE_MAC_ADDRESS;
174180
outputMsg.m.BLEMacAddress = mac;

0 commit comments

Comments
 (0)