Skip to content

WiFi101OTA not working with ConnectionHandler #2

@brentbrooks70

Description

@brentbrooks70

Just added WiFiConnectionHandler to code that previously used WiFi101 for MKR1000 board but now the WiFiOTA does not register the board in the ports selection. If I remove ConnectionHandler and revert back to WiFI101 natively (I know ConnectionHandler just calls this library after testing for ARCH of hardware) it works normally. This does not make any sense, any help would be greatly appreciated.

#include <Arduino_WiFiConnectionHandler.h>
#include <WiFi101OTA.h>

const char* ssid = "_SSID_";
const char* password = "_PASSWORD_";

WiFiConnectionHandler net(ssid, password);

void onNetworkConnect(void *_arg) {Serial.println(">>>> CONNECTED to network");}
void onNetworkDisconnect(void *_arg) {Serial.println(">>>> DISCONNECTED from network");}

void setup() 
{
  delay(5000);
  Serial.begin(115200);
  setDebugMessageLevel(2);
  net.addConnectCallback(onNetworkConnect);
  net.addDisconnectCallback(onNetworkDisconnect);
  WiFiOTA.begin("_HostName_", "_Password_", InternalStorage);
}

void loop() 
{
  net.update();
  WiFiOTA.poll();
}

VERSION INFO
MKR1000 Firmware v19.6.1
Arduino IDE v1.8.9
Arduino SAMD (32-bits ARM Cortex-M0+) v1.8.3
WiFi101OTA v1.0.2
Arduino_ConnectionHandler v0.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions