Skip to content

Commit d37deb1

Browse files
committed
Config ddns wifi AP
1 parent 80b39e6 commit d37deb1

File tree

1,096 files changed

+78756
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,096 files changed

+78756
-10
lines changed

libraries/WiFi/src/WiFiAP.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,12 @@ String WiFiAPClass::softAPSSID() const
162162
* @param gateway gateway IP
163163
* @param subnet subnet mask
164164
*/
165-
bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet)
165+
bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns)
166166
{
167-
168167
if(!WiFi.enableAP(true)) {
169-
// enable AP failed
170168
return false;
171169
}
172-
173170
esp_wifi_start();
174-
175171
tcpip_adapter_ip_info_t info;
176172
info.ip.addr = static_cast<uint32_t>(local_ip);
177173
info.gw.addr = static_cast<uint32_t>(gateway);
@@ -182,20 +178,22 @@ bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress
182178
lease.enable = true;
183179
lease.start_ip.addr = static_cast<uint32_t>(local_ip) + (1 << 24);
184180
lease.end_ip.addr = static_cast<uint32_t>(local_ip) + (11 << 24);
185-
181+
tcpip_adapter_dns_info_t dns_info;
182+
dns_info.ip.u_addr.ip4.addr = static_cast<uint32_t>(dns);
183+
dns_info.ip.type = IPADDR_TYPE_V4;
184+
tcpip_adapter_set_dns_info(TCPIP_ADAPTER_IF_AP, TCPIP_ADAPTER_DNS_MAIN, &dns_info);
185+
dhcps_offer_t opt_val = OFFER_DNS; // supply a dns server via dhcps
186+
tcpip_adapter_dhcps_option(TCPIP_ADAPTER_OP_SET, TCPIP_ADAPTER_DOMAIN_NAME_SERVER, &opt_val, 1);
186187
tcpip_adapter_dhcps_option(
187188
(tcpip_adapter_option_mode_t)TCPIP_ADAPTER_OP_SET,
188189
(tcpip_adapter_option_id_t)REQUESTED_IP_ADDRESS,
189190
(void*)&lease, sizeof(dhcps_lease_t)
190191
);
191-
192192
return tcpip_adapter_dhcps_start(TCPIP_ADAPTER_IF_AP) == ESP_OK;
193193
}
194194
return false;
195195
}
196196

197-
198-
199197
/**
200198
* Disconnect from the network (close AP)
201199
* @param wifioff disable mode?

libraries/WiFi/src/WiFiAP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class WiFiAPClass
3838
public:
3939

4040
bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);
41-
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
41+
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns = IPAddress(0, 0, 0, 0));
4242
bool softAPdisconnect(bool wifioff = false);
4343

4444
uint8_t softAPgetStationNum();

tools/esp_rfc2217_server.exe

6.15 MB
Binary file not shown.

tools/espefuse.exe

9.07 MB
Binary file not shown.

tools/espsecure.exe

8.85 MB
Binary file not shown.
518 KB
Binary file not shown.

tools/openocd-esp32/bin/openocd.exe

3.47 MB
Binary file not shown.

tools/openocd-esp32/bin/zlib1.dll

105 KB
Binary file not shown.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
This is openocd.info, produced by makeinfo version 6.3 from
2+
openocd.texi.
3+
4+
This User's Guide documents release , dated 5 July 2022, of the Open
5+
On-Chip Debugger (OpenOCD).
6+
7+
* Copyright (C) 2008 The OpenOCD Project
8+
* Copyright (C) 2007-2008 Spencer Oliver <[email protected]>
9+
* Copyright (C) 2008-2010 Oyvind Harboe <[email protected]>
10+
* Copyright (C) 2008 Duane Ellis <[email protected]>
11+
* Copyright (C) 2009-2010 David Brownell
12+
13+
Permission is granted to copy, distribute and/or modify this
14+
document under the terms of the GNU Free Documentation License,
15+
Version 1.2 or any later version published by the Free Software
16+
Foundation; with no Invariant Sections, no Front-Cover Texts, and
17+
no Back-Cover Texts. A copy of the license is included in the
18+
section entitled "GNU Free Documentation License".
19+
INFO-DIR-SECTION Development
20+
START-INFO-DIR-ENTRY
21+
* OpenOCD: (openocd). OpenOCD User's Guide
22+
END-INFO-DIR-ENTRY
23+
24+

25+
Indirect:
26+
openocd.info-1: 976
27+
openocd.info-2: 338973
28+

29+
Tag Table:
30+
(Indirect)
31+
Node: Top976
32+
Node: About3423
33+
Node: Developers7755
34+
Node: Debug Adapter Hardware11095
35+
Node: About Jim-Tcl23393
36+
Node: Running25538
37+
Node: OpenOCD Project Setup30934
38+
Ref: OpenOCD Project Setup-Footnote-150886
39+
Ref: OpenOCD Project Setup-Footnote-251226
40+
Ref: OpenOCD Project Setup-Footnote-351494
41+
Node: Config File Guidelines51822
42+
Ref: theinitboardprocedure63001
43+
Ref: definecputargetsworkinginsmp69861
44+
Ref: theinittargetsprocedure74341
45+
Ref: theinittargeteventsprocedure76160
46+
Ref: translatingconfigurationfiles78013
47+
Ref: Config File Guidelines-Footnote-179264
48+
Node: Server Configuration79339
49+
Ref: configurationstage79661
50+
Ref: enteringtherunstage81136
51+
Ref: tcpipports84589
52+
Ref: gdb_port85084
53+
Ref: gdbconfiguration87342
54+
Ref: gdbbreakpointoverride87657
55+
Ref: gdbflashprogram88032
56+
Ref: eventpolling89541
57+
Node: Debug Adapter Configuration91977
58+
Ref: adapter_usb_location94292
59+
Ref: hla_interface122518
60+
Ref: st_link_dap_interface124077
61+
Ref: swimtransport149411
62+
Ref: jtagspeed150178
63+
Node: Reset Configuration153140
64+
Ref: srstandtrstissues156068
65+
Ref: reset_config160250
66+
Node: TAP Declaration168162
67+
Ref: enablinganddisablingtaps180076
68+
Ref: autoprobing182723
69+
Ref: dapdeclaration185378
70+
Ref: dap_create185892
71+
Ref: DAP subcommand apreg188718
72+
Ref: TAP Declaration-Footnote-1191965
73+
Node: CPU Configuration192165
74+
Ref: targettypes195059
75+
Ref: targetconfiguration199519
76+
Ref: rtostype205313
77+
Ref: gdbportoverride206572
78+
Ref: targetcurstate211599
79+
Ref: targetevents213587
80+
Node: Flash Commands220633
81+
Ref: norconfiguration222166
82+
Ref: flashprogrammingcommands225403
83+
Ref: flashprotect233183
84+
Ref: program234009
85+
Ref: flashdriverlist234289
86+
Ref: at91samd253869
87+
Ref: at91sam3257550
88+
Ref: atsame5260906
89+
Ref: nandconfiguration322882
90+
Ref: nanddriverlist333268
91+
Node: Flash Programming338973
92+
Node: PLD/FPGA Commands340586
93+
Node: General Commands342750
94+
Ref: debuglevel345722
95+
Ref: targetstatehandling347027
96+
Ref: resetcommand352852
97+
Ref: memoryaccess355271
98+
Ref: imageaccess357139
99+
Node: Architecture and Core Commands364878
100+
Ref: armhardwaretracing365348
101+
Ref: traceportdrivers373262
102+
Ref: armcrosstrigger374993
103+
Ref: arm9vectorcatch384600
104+
Ref: xscalevectorcatch392505
105+
Ref: add-reg-type-struct433515
106+
Ref: softwaredebugmessagesandtracing445238
107+
Node: JTAG Commands448707
108+
Node: Boundary Scan Commands456197
109+
Node: Utility Commands461907
110+
Node: GDB and OpenOCD463752
111+
Ref: programmingusinggdb468864
112+
Ref: gdbmeminspect470510
113+
Ref: gdbrtossupport472447
114+
Ref: usingopenocdsmpwithgdb474889
115+
Node: Tcl Scripting API475563
116+
Node: FAQ479046
117+
Ref: faqrtck479156
118+
Ref: faqtaporder491047
119+
Node: Tcl Crash Course492813
120+
Node: License504821
121+
Node: OpenOCD Concept Index527233
122+
Node: Command and Driver Index551295
123+

124+
End Tag Table

0 commit comments

Comments
 (0)