Skip to content

How to use C/C++ PlatformIO/Arduino Framework (Not MaixPy) to use wifi #126

@marcusobrien

Description

@marcusobrien

Hi,

How can I use the ESP32 Wifi module from C/C++ ? It only seems to work using the MaixPy wifi example. When I run the default ESP32 firmware, and this C++ application code

` Serial.begin(115200); // initialize serial for debugging
WiFi.init(); // initialize ESP32 WiFi module

if (WiFi.status() == WL_NO_SHIELD)
{
Serial.println("No WiFi HW - Halting FW");
while (true);
}

int8_t numberNetworks = WiFi.scanNetworks();
Serial.print("Scan Wifi Found : ");
Serial.println(numberNetworks);`

This just prints the following output....

Error 4
Scan Wifi Found: 0

Note that the wifi works if I use MaixPy firmware and the example code. Also I have 2 Maixduinos both of them dont work with the C++ SDK, but both work with the Python way.

Where is the ESP32 FW that will allow me to use the wifi from the Maixduino C/C++ application ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions