Just a side project


Author Message
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 550
Posted: 07:11am 05 Jun 2026      

Bryan,

if you happen to use a Fritzbox as WIFI-router you may find that connections from the WebMite to the router olny succeeds every 2nd time and this is repeatable. Dunno if other routers have the same or a similar behaviour. So simply a CPU RESTART after a failed connect solves this situation here.

With the V6.03.RC7 versions Peter has introduced an additional parameter on OPTION WIFI to specifiy the country you live in. This deals with frequency restrictions in WIFI based on local regulations. This means that the Pico then will not try to talk to the router on frequencies the router is not allowed to operate on, thus preventing connect failures.
This applies to all routers properly configured to your local regulations (they usually are) and not only to Fritzbox.

  Quote  
Improved error detection in WEB versions
Additional parameter in OPTION WIFI
If set correctly this will overcome issues with things like channel 12,13 usage by a router in countires where that is legal

OPTION WIFI ssid$, passwd$ [,name$] [, COUNTRY$]
OPTION WIFI ssid$, passwd$ [, name$] [, ipaddress$, mask$, gateway$] [, COUNTRY$]
Configures the firmware to automatically connect to a WiFi network on
restart.
'ssid$' is the name of the network and 'password$' is the access
password. Both are strings and if string constants are used they should
be quoted.
Optionally a name for the device can be specified 'name$', otherwise a
name is created from the unique device ID.
Optionally, a static IP address, IP mask, and gateway address can be
specified as 'ipaddress$', 'mask$', 'gateway$'.
Optionally a 2-letter ISO COUNTRY code 'COUNTRY$' can be specified to
set the WiFi regulatory domain. The default is "XX" (worldwide), which
restricts the device to the most conservative subset of channels and
transmit power. Setting the local COUNTRY code is recommended and is
often required to associate with EU routers (for example AVM Fritzbox)
which may use channels 12 or 13. If 'COUNTRY$' is omitted the
previously stored value is preserved; "" or "WW" both select
worldwide. The COUNTRY code is a regulatory setting and must match
the COUNTRY in which the device is operated.

Supported COUNTRY codes:
AU AT BE BR CA CH CL CN CO CZ DE DK EE ES FI FR GB GR HK HU IL IN
IS IT JP KE KR LI LT LU LV MT MX MY NG NL NO NZ PE PH PL PT SE SG
SI SK TH TR TW US ZA
XX or WW (worldwide, default)

eg. OPTION WIFI "mysid","mypassword","myPico","DE"

eg. OPTION WIFI "mysid","mypassword","myPico",
 "192.168.1.111","255.255.255.0","192.168.1.1","DE"


Maybe you should give it a try.

Gerald
Edited 2026-06-05 17:14 by ville56