1#![allow(unused)]
2
3use heapless::{String, Vec};
4
5#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
8#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9pub(crate) struct ScanResult {
10 #[noproto(tag = "1")]
11 pub ssid: String<32>,
12 #[noproto(tag = "2")]
13 pub chnl: u32,
14 #[noproto(tag = "3")]
15 pub rssi: u32,
16 #[noproto(tag = "4")]
17 pub bssid: String<32>,
18 #[noproto(tag = "5")]
19 pub sec_prot: CtrlWifiSecProt,
20}
21
22#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
23#[cfg_attr(feature = "defmt", derive(defmt::Format))]
24pub(crate) struct ConnectedStaList {
25 #[noproto(tag = "1")]
26 pub mac: String<32>,
27 #[noproto(tag = "2")]
28 pub rssi: u32,
29}
30#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
33#[cfg_attr(feature = "defmt", derive(defmt::Format))]
34pub(crate) struct CtrlMsgReqGetMacAddress {
35 #[noproto(tag = "1")]
36 pub mode: u32,
37}
38
39#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
40#[cfg_attr(feature = "defmt", derive(defmt::Format))]
41pub(crate) struct CtrlMsgRespGetMacAddress {
42 #[noproto(tag = "1")]
43 pub mac: String<32>,
44 #[noproto(tag = "2")]
45 pub resp: u32,
46}
47
48#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
49#[cfg_attr(feature = "defmt", derive(defmt::Format))]
50pub(crate) struct CtrlMsgReqGetMode {}
51
52#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
53#[cfg_attr(feature = "defmt", derive(defmt::Format))]
54pub(crate) struct CtrlMsgRespGetMode {
55 #[noproto(tag = "1")]
56 pub mode: u32,
57 #[noproto(tag = "2")]
58 pub resp: u32,
59}
60
61#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
62#[cfg_attr(feature = "defmt", derive(defmt::Format))]
63pub(crate) struct CtrlMsgReqSetMode {
64 #[noproto(tag = "1")]
65 pub mode: u32,
66}
67
68#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
69#[cfg_attr(feature = "defmt", derive(defmt::Format))]
70pub(crate) struct CtrlMsgRespSetMode {
71 #[noproto(tag = "1")]
72 pub resp: u32,
73}
74
75#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
76#[cfg_attr(feature = "defmt", derive(defmt::Format))]
77pub(crate) struct CtrlMsgReqGetStatus {}
78
79#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
80#[cfg_attr(feature = "defmt", derive(defmt::Format))]
81pub(crate) struct CtrlMsgRespGetStatus {
82 #[noproto(tag = "1")]
83 pub resp: u32,
84}
85
86#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
87#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88pub(crate) struct CtrlMsgReqSetMacAddress {
89 #[noproto(tag = "1")]
90 pub mac: String<32>,
91 #[noproto(tag = "2")]
92 pub mode: u32,
93}
94
95#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
96#[cfg_attr(feature = "defmt", derive(defmt::Format))]
97pub(crate) struct CtrlMsgRespSetMacAddress {
98 #[noproto(tag = "1")]
99 pub resp: u32,
100}
101
102#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
103#[cfg_attr(feature = "defmt", derive(defmt::Format))]
104pub(crate) struct CtrlMsgReqGetApConfig {}
105
106#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
107#[cfg_attr(feature = "defmt", derive(defmt::Format))]
108pub(crate) struct CtrlMsgRespGetApConfig {
109 #[noproto(tag = "1")]
110 pub ssid: String<32>,
111 #[noproto(tag = "2")]
112 pub bssid: String<32>,
113 #[noproto(tag = "3")]
114 pub rssi: u32,
115 #[noproto(tag = "4")]
116 pub chnl: u32,
117 #[noproto(tag = "5")]
118 pub sec_prot: CtrlWifiSecProt,
119 #[noproto(tag = "6")]
120 pub resp: u32,
121}
122
123#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
124#[cfg_attr(feature = "defmt", derive(defmt::Format))]
125pub(crate) struct CtrlMsgReqConnectAp {
126 #[noproto(tag = "1")]
127 pub ssid: String<32>,
128 #[noproto(tag = "2")]
129 pub pwd: String<32>,
130 #[noproto(tag = "3")]
131 pub bssid: String<32>,
132 #[noproto(tag = "4")]
133 pub is_wpa3_supported: bool,
134 #[noproto(tag = "5")]
135 pub listen_interval: u32,
136}
137
138#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
139#[cfg_attr(feature = "defmt", derive(defmt::Format))]
140pub(crate) struct CtrlMsgRespConnectAp {
141 #[noproto(tag = "1")]
142 pub resp: u32,
143 #[noproto(tag = "2")]
144 pub mac: String<32>,
145}
146
147#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
148#[cfg_attr(feature = "defmt", derive(defmt::Format))]
149pub(crate) struct CtrlMsgReqGetSoftApConfig {}
150
151#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
152#[cfg_attr(feature = "defmt", derive(defmt::Format))]
153pub(crate) struct CtrlMsgRespGetSoftApConfig {
154 #[noproto(tag = "1")]
155 pub ssid: String<32>,
156 #[noproto(tag = "2")]
157 pub pwd: String<32>,
158 #[noproto(tag = "3")]
159 pub chnl: u32,
160 #[noproto(tag = "4")]
161 pub sec_prot: CtrlWifiSecProt,
162 #[noproto(tag = "5")]
163 pub max_conn: u32,
164 #[noproto(tag = "6")]
165 pub ssid_hidden: bool,
166 #[noproto(tag = "7")]
167 pub bw: u32,
168 #[noproto(tag = "8")]
169 pub resp: u32,
170}
171
172#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
173#[cfg_attr(feature = "defmt", derive(defmt::Format))]
174pub(crate) struct CtrlMsgReqStartSoftAp {
175 #[noproto(tag = "1")]
176 pub ssid: String<32>,
177 #[noproto(tag = "2")]
178 pub pwd: String<32>,
179 #[noproto(tag = "3")]
180 pub chnl: u32,
181 #[noproto(tag = "4")]
182 pub sec_prot: CtrlWifiSecProt,
183 #[noproto(tag = "5")]
184 pub max_conn: u32,
185 #[noproto(tag = "6")]
186 pub ssid_hidden: bool,
187 #[noproto(tag = "7")]
188 pub bw: u32,
189}
190
191#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
192#[cfg_attr(feature = "defmt", derive(defmt::Format))]
193pub(crate) struct CtrlMsgRespStartSoftAp {
194 #[noproto(tag = "1")]
195 pub resp: u32,
196 #[noproto(tag = "2")]
197 pub mac: String<32>,
198}
199
200#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
201#[cfg_attr(feature = "defmt", derive(defmt::Format))]
202pub(crate) struct CtrlMsgReqScanResult {}
203
204#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
205#[cfg_attr(feature = "defmt", derive(defmt::Format))]
206pub(crate) struct CtrlMsgRespScanResult {
207 #[noproto(tag = "1")]
208 pub count: u32,
209 #[noproto(repeated, tag = "2")]
210 pub entries: Vec<ScanResult, 16>,
211 #[noproto(tag = "3")]
212 pub resp: u32,
213}
214
215#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
216#[cfg_attr(feature = "defmt", derive(defmt::Format))]
217pub(crate) struct CtrlMsgReqSoftApConnectedSta {}
218
219#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
220#[cfg_attr(feature = "defmt", derive(defmt::Format))]
221pub(crate) struct CtrlMsgRespSoftApConnectedSta {
222 #[noproto(tag = "1")]
223 pub num: u32,
224 #[noproto(repeated, tag = "2")]
225 pub stations: Vec<ConnectedStaList, 16>,
226 #[noproto(tag = "3")]
227 pub resp: u32,
228}
229
230#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
231#[cfg_attr(feature = "defmt", derive(defmt::Format))]
232pub(crate) struct CtrlMsgReqOtaBegin {}
233
234#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
235#[cfg_attr(feature = "defmt", derive(defmt::Format))]
236pub(crate) struct CtrlMsgRespOtaBegin {
237 #[noproto(tag = "1")]
238 pub resp: u32,
239}
240
241#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
242#[cfg_attr(feature = "defmt", derive(defmt::Format))]
243pub(crate) struct CtrlMsgReqOtaWrite {
244 #[noproto(tag = "1")]
245 pub ota_data: Vec<u8, 1024>,
246}
247
248#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
249#[cfg_attr(feature = "defmt", derive(defmt::Format))]
250pub(crate) struct CtrlMsgRespOtaWrite {
251 #[noproto(tag = "1")]
252 pub resp: u32,
253}
254
255#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
256#[cfg_attr(feature = "defmt", derive(defmt::Format))]
257pub(crate) struct CtrlMsgReqOtaEnd {}
258
259#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
260#[cfg_attr(feature = "defmt", derive(defmt::Format))]
261pub(crate) struct CtrlMsgRespOtaEnd {
262 #[noproto(tag = "1")]
263 pub resp: u32,
264}
265
266#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
267#[cfg_attr(feature = "defmt", derive(defmt::Format))]
268pub(crate) struct CtrlMsgReqVendorIeData {
269 #[noproto(tag = "1")]
270 pub element_id: u32,
271 #[noproto(tag = "2")]
272 pub length: u32,
273 #[noproto(tag = "3")]
274 pub vendor_oui: Vec<u8, 8>,
275 #[noproto(tag = "4")]
276 pub vendor_oui_type: u32,
277 #[noproto(tag = "5")]
278 pub payload: Vec<u8, 64>,
279}
280
281#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
282#[cfg_attr(feature = "defmt", derive(defmt::Format))]
283pub(crate) struct CtrlMsgReqSetSoftApVendorSpecificIe {
284 #[noproto(tag = "1")]
285 pub enable: bool,
286 #[noproto(tag = "2")]
287 pub r#type: CtrlVendorIeType,
288 #[noproto(tag = "3")]
289 pub idx: CtrlVendorIeid,
290 #[noproto(optional, tag = "4")]
291 pub vendor_ie_data: Option<CtrlMsgReqVendorIeData>,
292}
293
294#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
295#[cfg_attr(feature = "defmt", derive(defmt::Format))]
296pub(crate) struct CtrlMsgRespSetSoftApVendorSpecificIe {
297 #[noproto(tag = "1")]
298 pub resp: u32,
299}
300
301#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
302#[cfg_attr(feature = "defmt", derive(defmt::Format))]
303pub(crate) struct CtrlMsgReqSetWifiMaxTxPower {
304 #[noproto(tag = "1")]
305 pub wifi_max_tx_power: u32,
306}
307
308#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
309#[cfg_attr(feature = "defmt", derive(defmt::Format))]
310pub(crate) struct CtrlMsgRespSetWifiMaxTxPower {
311 #[noproto(tag = "1")]
312 pub resp: u32,
313}
314
315#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
316#[cfg_attr(feature = "defmt", derive(defmt::Format))]
317pub(crate) struct CtrlMsgReqGetWifiCurrTxPower {}
318
319#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
320#[cfg_attr(feature = "defmt", derive(defmt::Format))]
321pub(crate) struct CtrlMsgRespGetWifiCurrTxPower {
322 #[noproto(tag = "1")]
323 pub wifi_curr_tx_power: u32,
324 #[noproto(tag = "2")]
325 pub resp: u32,
326}
327
328#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
329#[cfg_attr(feature = "defmt", derive(defmt::Format))]
330pub(crate) struct CtrlMsgReqConfigHeartbeat {
331 #[noproto(tag = "1")]
332 pub enable: bool,
333 #[noproto(tag = "2")]
334 pub duration: u32,
335}
336
337#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
338#[cfg_attr(feature = "defmt", derive(defmt::Format))]
339pub(crate) struct CtrlMsgRespConfigHeartbeat {
340 #[noproto(tag = "1")]
341 pub resp: u32,
342}
343#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
346#[cfg_attr(feature = "defmt", derive(defmt::Format))]
347pub(crate) struct CtrlMsgEventEspInit {
348 #[noproto(tag = "1")]
349 pub init_data: Vec<u8, 64>,
350}
351
352#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
353#[cfg_attr(feature = "defmt", derive(defmt::Format))]
354pub(crate) struct CtrlMsgEventHeartbeat {
355 #[noproto(tag = "1")]
356 pub hb_num: u32,
357}
358
359#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
360#[cfg_attr(feature = "defmt", derive(defmt::Format))]
361pub(crate) struct CtrlMsgEventStationDisconnectFromAp {
362 #[noproto(tag = "1")]
363 pub resp: u32,
364}
365
366#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
367#[cfg_attr(feature = "defmt", derive(defmt::Format))]
368pub(crate) struct CtrlMsgEventStationDisconnectFromEspSoftAp {
369 #[noproto(tag = "1")]
370 pub resp: u32,
371 #[noproto(tag = "2")]
372 pub mac: String<32>,
373}
374
375#[derive(Debug, Default, Clone, Eq, PartialEq, noproto::Message)]
376#[cfg_attr(feature = "defmt", derive(defmt::Format))]
377pub(crate) struct CtrlMsg {
378 #[noproto(tag = "1")]
380 pub msg_type: CtrlMsgType,
381 #[noproto(tag = "2")]
383 pub msg_id: CtrlMsgId,
384 #[noproto(
386 oneof,
387 tags = "101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 301, 302, 303, 304"
388 )]
389 pub payload: Option<CtrlMsgPayload>,
390}
391
392#[derive(Debug, Clone, Eq, PartialEq, noproto::Oneof)]
394#[cfg_attr(feature = "defmt", derive(defmt::Format))]
395pub(crate) enum CtrlMsgPayload {
396 #[noproto(tag = "101")]
398 ReqGetMacAddress(CtrlMsgReqGetMacAddress),
399 #[noproto(tag = "102")]
400 ReqSetMacAddress(CtrlMsgReqSetMacAddress),
401 #[noproto(tag = "103")]
402 ReqGetWifiMode(CtrlMsgReqGetMode),
403 #[noproto(tag = "104")]
404 ReqSetWifiMode(CtrlMsgReqSetMode),
405 #[noproto(tag = "105")]
406 ReqScanApList(CtrlMsgReqScanResult),
407 #[noproto(tag = "106")]
408 ReqGetApConfig(CtrlMsgReqGetApConfig),
409 #[noproto(tag = "107")]
410 ReqConnectAp(CtrlMsgReqConnectAp),
411 #[noproto(tag = "108")]
412 ReqDisconnectAp(CtrlMsgReqGetStatus),
413 #[noproto(tag = "109")]
414 ReqGetSoftapConfig(CtrlMsgReqGetSoftApConfig),
415 #[noproto(tag = "110")]
416 ReqSetSoftapVendorSpecificIe(CtrlMsgReqSetSoftApVendorSpecificIe),
417 #[noproto(tag = "111")]
418 ReqStartSoftap(CtrlMsgReqStartSoftAp),
419 #[noproto(tag = "112")]
420 ReqSoftapConnectedStasList(CtrlMsgReqSoftApConnectedSta),
421 #[noproto(tag = "113")]
422 ReqStopSoftap(CtrlMsgReqGetStatus),
423 #[noproto(tag = "114")]
424 ReqSetPowerSaveMode(CtrlMsgReqSetMode),
425 #[noproto(tag = "115")]
426 ReqGetPowerSaveMode(CtrlMsgReqGetMode),
427 #[noproto(tag = "116")]
428 ReqOtaBegin(CtrlMsgReqOtaBegin),
429 #[noproto(tag = "117")]
430 ReqOtaWrite(CtrlMsgReqOtaWrite),
431 #[noproto(tag = "118")]
432 ReqOtaEnd(CtrlMsgReqOtaEnd),
433 #[noproto(tag = "119")]
434 ReqSetWifiMaxTxPower(CtrlMsgReqSetWifiMaxTxPower),
435 #[noproto(tag = "120")]
436 ReqGetWifiCurrTxPower(CtrlMsgReqGetWifiCurrTxPower),
437 #[noproto(tag = "121")]
438 ReqConfigHeartbeat(CtrlMsgReqConfigHeartbeat),
439 #[noproto(tag = "201")]
441 RespGetMacAddress(CtrlMsgRespGetMacAddress),
442 #[noproto(tag = "202")]
443 RespSetMacAddress(CtrlMsgRespSetMacAddress),
444 #[noproto(tag = "203")]
445 RespGetWifiMode(CtrlMsgRespGetMode),
446 #[noproto(tag = "204")]
447 RespSetWifiMode(CtrlMsgRespSetMode),
448 #[noproto(tag = "205")]
449 RespScanApList(CtrlMsgRespScanResult),
450 #[noproto(tag = "206")]
451 RespGetApConfig(CtrlMsgRespGetApConfig),
452 #[noproto(tag = "207")]
453 RespConnectAp(CtrlMsgRespConnectAp),
454 #[noproto(tag = "208")]
455 RespDisconnectAp(CtrlMsgRespGetStatus),
456 #[noproto(tag = "209")]
457 RespGetSoftapConfig(CtrlMsgRespGetSoftApConfig),
458 #[noproto(tag = "210")]
459 RespSetSoftapVendorSpecificIe(CtrlMsgRespSetSoftApVendorSpecificIe),
460 #[noproto(tag = "211")]
461 RespStartSoftap(CtrlMsgRespStartSoftAp),
462 #[noproto(tag = "212")]
463 RespSoftapConnectedStasList(CtrlMsgRespSoftApConnectedSta),
464 #[noproto(tag = "213")]
465 RespStopSoftap(CtrlMsgRespGetStatus),
466 #[noproto(tag = "214")]
467 RespSetPowerSaveMode(CtrlMsgRespSetMode),
468 #[noproto(tag = "215")]
469 RespGetPowerSaveMode(CtrlMsgRespGetMode),
470 #[noproto(tag = "216")]
471 RespOtaBegin(CtrlMsgRespOtaBegin),
472 #[noproto(tag = "217")]
473 RespOtaWrite(CtrlMsgRespOtaWrite),
474 #[noproto(tag = "218")]
475 RespOtaEnd(CtrlMsgRespOtaEnd),
476 #[noproto(tag = "219")]
477 RespSetWifiMaxTxPower(CtrlMsgRespSetWifiMaxTxPower),
478 #[noproto(tag = "220")]
479 RespGetWifiCurrTxPower(CtrlMsgRespGetWifiCurrTxPower),
480 #[noproto(tag = "221")]
481 RespConfigHeartbeat(CtrlMsgRespConfigHeartbeat),
482 #[noproto(tag = "301")]
484 EventEspInit(CtrlMsgEventEspInit),
485 #[noproto(tag = "302")]
486 EventHeartbeat(CtrlMsgEventHeartbeat),
487 #[noproto(tag = "303")]
488 EventStationDisconnectFromAp(CtrlMsgEventStationDisconnectFromAp),
489 #[noproto(tag = "304")]
490 EventStationDisconnectFromEspSoftAp(CtrlMsgEventStationDisconnectFromEspSoftAp),
491}
492
493#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
495#[repr(u32)]
496#[cfg_attr(feature = "defmt", derive(defmt::Format))]
497pub(crate) enum CtrlVendorIeType {
498 #[default]
499 Beacon = 0,
500 ProbeReq = 1,
501 ProbeResp = 2,
502 AssocReq = 3,
503 AssocResp = 4,
504}
505
506#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
507#[repr(u32)]
508#[cfg_attr(feature = "defmt", derive(defmt::Format))]
509pub(crate) enum CtrlVendorIeid {
510 #[default]
511 Id0 = 0,
512 Id1 = 1,
513}
514
515#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
516#[repr(u32)]
517#[cfg_attr(feature = "defmt", derive(defmt::Format))]
518pub(crate) enum CtrlWifiMode {
519 #[default]
520 None = 0,
521 Sta = 1,
522 Ap = 2,
523 Apsta = 3,
524}
525
526#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
527#[repr(u32)]
528#[cfg_attr(feature = "defmt", derive(defmt::Format))]
529pub(crate) enum CtrlWifiBw {
530 #[default]
531 BwInvalid = 0,
532 Ht20 = 1,
533 Ht40 = 2,
534}
535
536#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
537#[repr(u32)]
538#[cfg_attr(feature = "defmt", derive(defmt::Format))]
539pub(crate) enum CtrlWifiPowerSave {
540 #[default]
541 PsInvalid = 0,
542 MinModem = 1,
543 MaxModem = 2,
544}
545
546#[allow(missing_docs)]
548#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
549#[repr(u32)]
550#[cfg_attr(feature = "defmt", derive(defmt::Format))]
551pub enum CtrlWifiSecProt {
552 #[default]
553 Open = 0,
554 Wep = 1,
555 WpaPsk = 2,
556 Wpa2Psk = 3,
557 WpaWpa2Psk = 4,
558 Wpa2Enterprise = 5,
559 Wpa3Psk = 6,
560 Wpa2Wpa3Psk = 7,
561}
562
563#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
565#[repr(u32)]
566#[cfg_attr(feature = "defmt", derive(defmt::Format))]
567pub(crate) enum CtrlStatus {
568 #[default]
569 Connected = 0,
570 NotConnected = 1,
571 NoApFound = 2,
572 ConnectionFail = 3,
573 InvalidArgument = 4,
574 OutOfRange = 5,
575}
576
577#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
578#[repr(u32)]
579#[cfg_attr(feature = "defmt", derive(defmt::Format))]
580pub(crate) enum CtrlMsgType {
581 #[default]
582 MsgTypeInvalid = 0,
583 Req = 1,
584 Resp = 2,
585 Event = 3,
586 MsgTypeMax = 4,
587}
588
589#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord, noproto::Enumeration)]
590#[repr(u32)]
591#[cfg_attr(feature = "defmt", derive(defmt::Format))]
592pub(crate) enum CtrlMsgId {
593 #[default]
594 MsgIdInvalid = 0,
595 ReqBase = 100,
597 ReqGetMacAddress = 101,
598 ReqSetMacAddress = 102,
599 ReqGetWifiMode = 103,
600 ReqSetWifiMode = 104,
601 ReqGetApScanList = 105,
602 ReqGetApConfig = 106,
603 ReqConnectAp = 107,
604 ReqDisconnectAp = 108,
605 ReqGetSoftApConfig = 109,
606 ReqSetSoftApVendorSpecificIe = 110,
607 ReqStartSoftAp = 111,
608 ReqGetSoftApConnectedStaList = 112,
609 ReqStopSoftAp = 113,
610 ReqSetPowerSaveMode = 114,
611 ReqGetPowerSaveMode = 115,
612 ReqOtaBegin = 116,
613 ReqOtaWrite = 117,
614 ReqOtaEnd = 118,
615 ReqSetWifiMaxTxPower = 119,
616 ReqGetWifiCurrTxPower = 120,
617 ReqConfigHeartbeat = 121,
618 ReqMax = 122,
621 RespBase = 200,
623 RespGetMacAddress = 201,
624 RespSetMacAddress = 202,
625 RespGetWifiMode = 203,
626 RespSetWifiMode = 204,
627 RespGetApScanList = 205,
628 RespGetApConfig = 206,
629 RespConnectAp = 207,
630 RespDisconnectAp = 208,
631 RespGetSoftApConfig = 209,
632 RespSetSoftApVendorSpecificIe = 210,
633 RespStartSoftAp = 211,
634 RespGetSoftApConnectedStaList = 212,
635 RespStopSoftAp = 213,
636 RespSetPowerSaveMode = 214,
637 RespGetPowerSaveMode = 215,
638 RespOtaBegin = 216,
639 RespOtaWrite = 217,
640 RespOtaEnd = 218,
641 RespSetWifiMaxTxPower = 219,
642 RespGetWifiCurrTxPower = 220,
643 RespConfigHeartbeat = 221,
644 RespMax = 222,
647 EventBase = 300,
649 EventEspInit = 301,
650 EventHeartbeat = 302,
651 EventStationDisconnectFromAp = 303,
652 EventStationDisconnectFromEspSoftAp = 304,
653 EventMax = 305,
656}