Skip to content

Commit 35993a0

Browse files
committed
Merge remote-tracking branch 'origin/wifi_leven_dev' into modem_fix
Former-commit-id: a6aaa88
2 parents 59c7ec4 + 6c48d2e commit 35993a0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

libraries/WiFiS3/src/Modem.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ bool ModemClass::buf_read(const string &prompt, string &data_res) {
5656
while(_serial->available()){
5757
char c = _serial->read();
5858
data_res += c;
59-
//Serial.print(c);
6059
if(string::npos != data_res.rfind(PROMPT_OK)){
6160
found = true;
6261
data_res = data_res.substr(0, data_res.length() - sizeof(PROMPT_OK));

libraries/WiFiS3/src/WiFi.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ uint8_t CWifi::encryptionType() {
300300
/* -------------------------------------------------------------------------- */
301301
uint8_t CWifi::status() {
302302
/* -------------------------------------------------------------------------- */
303-
return 0;
303+
string res = "";
304+
if(modem.write(string(PROMPT(_GETSTATUS)), res, CMD_READ(_GETSTATUS))) {
305+
return atoi(res.c_str());
306+
}
307+
return 0;
304308
}
305309

306310
/* -------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)