espressif / esp-at

AT application for ESP32/ESP32-C2/ESP32-C3/ESP32-C6/ESP8266
Apache License 2.0
868 stars 757 forks source link

+CWLAP Response contains brackets which break the API convention #856

Open JHedgesBartec opened 1 month ago

JHedgesBartec commented 1 month ago

Answers checklist

AT+GMR

Source built from v3.2.0.0 release branch with BT Classic enabled, hence the modified BIN version.

AT+GMR
AT+GMR
AT version:3.2.0.0(s-ec2dec2 - ESP32 - Jul 28 2023 07:05:28)
SDK version:v5.0.2-376-g24b9d38a24-dirty
compile time(5c1d4b67):Jul 16 2024 17:06:45
Bin version:v4.0.0.0(WROOM-32)

OK

ESP-AT Firmware Source

v3.2.0.0 release branch, compiled locally to enable BT Classic on the ESP32-WROOM-32

Hardware Information

ESP32-WROOM-32

Power Supply used

USB

What is the expected behavior?

The +CWLAP response conforms to the documented format here

+CWLAP:<ecn>,<ssid>,<rssi>,<mac>,<channel>,<freq_offset>,<freqcal_val>,<pairwise_cipher>,<group_cipher>,<bgn>,<wps>

What is the actual behavior?

The +CWLAP response contains () brackets around all parameters. This does not match the documentation and breaks the general API format of <cmd>: followed by comma separated parameters. Having the parameters bracketed means it does not conform to the format of other API commands and has to be custom parsed.

Example: +CWLAP:(3,"TEST_NETGEAR26",-54,"22:6d:34:30:7f:72",11,-1,-1,4,4,7,0)

Probability of recurrence

100% repeatable

AT+SYSRAM?

AT+SYSRAM? AT+SYSRAM? +SYSRAM:151140,144872 OK

Steps to reproduce

Initialise Wi-Fi in station mode with AT+CWMODE=1 and then perform a list of access points using AT+CWLAP

AT command port output

AT+GMR
AT+GMR
AT version:3.2.0.0(s-ec2dec2 - ESP32 - Jul 28 2023 07:05:28)
SDK version:v5.0.2-376-g24b9d38a24-dirty
compile time(5c1d4b67):Jul 16 2024 17:06:45
Bin version:v4.0.0.0(WROOM-32)

OK
AT+CWMODE=1
AT+CWMODE=1

OK
AT+CWLAP
AT+CWLAP
+CWLAP:(3,"TEST_NETGEAR26",-52,"22:6d:34:30:7f:72",11,-1,-1,4,4,7,0)

OK
AT+SYSRAM?
AT+SYSRAM?
+SYSRAM:151140,144872
OK

AT log port output

Compiled with silence mode so no log output.

More Information.

No response

JAndrassy commented 1 month ago

it is this way a very long time now. it would be a breaking change if the {} are removed

JHedgesBartec commented 1 month ago

Authorised personnel should then update the documentation to reflect actual behaviour

ustccw commented 1 month ago

@JHedgesBartec @JAndrassy Thanks a lot! We should update the ESP-AT document.