Change WIFI Mode

If doesn't fit into any other category ....
Post Reply
Monki
Posts: 42
Joined: Mon Feb 27, 2023 12:56 pm
Location: Berlin
Has thanked: 6 times
Been thanked: 6 times

Change WIFI Mode

Post by Monki »

Is it possible to switch the Wifi mode in the program between AP/STA ?

Greating
Monki
User avatar
cicciocb
Site Admin
Posts: 2056
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 439 times
Been thanked: 1354 times
Contact:

Re: Change WIFI Mode

Post by cicciocb »

Yes, with these 2 commands :

Code: [Local Link Removed for Guests]

WIFI.APMODE SSID$, password$ [, channel] [, IP$ , MASK$]
Put the module in AP-Mode using the given SSID and Password.
Optionally it is possible to define the Radio Channel, the IP and the MASK address
and

Code: [Local Link Removed for Guests]

WIFI.CONNECT SSID$, password$ [, BSSID$] [, IP$ , MASK$ [, GATEWAY$]]
Connect the module to a WiFi network using the given SSID and password.
Using the optional parameter BSSID$ will start the connection to a specific WiFi access point.
It is possible to gather the connection status using the function WIFI.STATUS
The IP address configuration set in the config page will be used for the new connection; this may cause the module to fall outside the WIFI network IP range.
This can be avoided leaving the IP address blank in the config page relying on DHCP to assign them.
Optionally it is possible to define the IP, the MASK and the GATEWAY using the optional string parameters.
Monki
Posts: 42
Joined: Mon Feb 27, 2023 12:56 pm
Location: Berlin
Has thanked: 6 times
Been thanked: 6 times

Re: Change WIFI Mode

Post by Monki »

Many thanks for the quick help

Monki
Post Reply