Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-pico
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-pico
Commits
7be47293
Unverified
Commit
7be47293
authored
Aug 20, 2022
by
Earle F. Philhower, III
Committed by
GitHub
Aug 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ESP8266 compat functions for AP mode (#777)
Fixes #767
parent
d019f31e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
libraries/WiFi/src/WiFiClass.h
libraries/WiFi/src/WiFiClass.h
+51
-0
No files found.
libraries/WiFi/src/WiFiClass.h
View file @
7be47293
...
...
@@ -91,6 +91,57 @@ public:
uint8_t
beginAP
(
const
char
*
ssid
,
const
char
*
passphrase
);
uint8_t
beginAP
(
const
char
*
ssid
,
const
char
*
passphrase
,
uint8_t
channel
);
// ESP8266 compatible calls
bool
softAP
(
const
char
*
ssid
,
const
char
*
psk
=
NULL
,
int
channel
=
1
,
int
ssid_hidden
=
0
,
int
max_connection
=
4
)
{
(
void
)
ssid_hidden
;
(
void
)
max_connection
;
return
beginAP
(
ssid
,
psk
,
channel
)
==
WL_CONNECTED
;
}
bool
softAP
(
const
String
&
ssid
,
const
String
&
psk
=
""
,
int
channel
=
1
,
int
ssid_hidden
=
0
,
int
max_connection
=
4
)
{
(
void
)
ssid_hidden
;
(
void
)
max_connection
;
if
(
psk
!=
""
)
{
return
beginAP
(
ssid
.
c_str
(),
psk
.
c_str
(),
channel
)
==
WL_CONNECTED
;
}
else
{
return
beginAP
(
ssid
.
c_str
(),
channel
)
==
WL_CONNECTED
;
}
}
bool
softAPConfig
(
IPAddress
local_ip
,
IPAddress
gateway
,
IPAddress
subnet
)
{
config
(
local_ip
,
gateway
,
subnet
);
return
true
;
}
bool
softAPdisconnect
(
bool
wifioff
=
false
)
{
(
void
)
wifioff
;
end
();
return
true
;
}
uint8_t
softAPgetStationNum
();
IPAddress
softAPIP
()
{
return
localIP
();
}
uint8_t
*
softAPmacAddress
(
uint8_t
*
mac
)
{
return
macAddress
(
mac
);
}
String
softAPmacAddress
(
void
)
{
uint8_t
mac
[
8
];
macAddress
(
mac
);
char
buff
[
32
];
sprintf
(
buff
,
"%02x:%02x:%02x:%02x:%02x:%02x"
,
mac
[
5
],
mac
[
4
],
mac
[
3
],
mac
[
2
],
mac
[
1
],
mac
[
0
]);
return
String
(
buff
);
}
String
softAPSSID
()
{
return
String
(
SSID
());
}
// TODO - EAP is not supported by the driver. Maybe some way of user-level wap-supplicant in the future?
//uint8_t beginEnterprise(const char* ssid, const char* username, const char* password);
//uint8_t beginEnterprise(const char* ssid, const char* username, const char* password, const char* identity);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment