Closed MrFrangipane closed 10 months ago
Maybe your library version is old. The latest release is fixed, as you suggested.
WiFi.status() == WL_CONNECTED
is for Station Mode. It checks if the board is connected to the WiFi AP. WiFi.getMode() != WIFI_STA
is for AP Mode.
Ah, sorry you modified from WiFi.getMode() != WIFI_STA
to WiFi.getMode() == WIFI_STA
? I think your board is not correctly connected to WiFi AP (WiFi.status() == WL_CONNECTED
is false) or the bug of WiFi library of Pi Pico
Hi,
Thank you for your response :)
I'm not sure to understand: the mode should not be station after connection is successful ? I don't want the Pico to be an Access Point, I want it to connect to an already existing Wifi network
Anyways, I have switched the project to C/C++ SDK and use this library https://github.com/madskjeldgaard/PicoOSC
All the best !
I'm not sure to understand: the mode should not be station after connection is successful ?
No. The meaning of this if
statement is:
WiFi.status() == WL_CONNECTED
is for Station Mode. It checks if the board is connected to the WiFi APWiFi.getMode() != WIFI_STA
is for AP Mode. Does not care about if the board is connected to WiFi AP or not (because ESP32 itself is AP)So, if you use station mode, it checks if the board is connected to an existing AP. But it doesn't care if you use AP mode.
I'll confirm with Pi Pico W later :)
Hi,
Thank you very much !
Hi,
Thank you for this very nice library.
I wanted to connect to an OSC server (desktop computer with Python OSC server) through Wifi with a Raspberry Pi Pico (being the client).
I copied some parts of your example https://github.com/hideakitai/ArduinoOSC/blob/main/examples/arduino/OscWiFi/OscWiFi.ino but kept getting "wifi is not connected" messages in the log.
I modified lines
71
,90
, and102
ofArduinoOSCCommon.h
as followsinstead of
and now it works.
I'm not really sure why mode should not be
WIFI_STA
at all times, especially when line56
of the example sets it toWIFI_STA
?Thank you for your help, All the best