You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sigmon command results in output in which the RSSI values are presented as single characters instead of the negative decimal values that are used in the rest of the UI. This makes them very difficult to interpret.
To Reproduce
Flash firmware to a board; connect using cu or some other terminal app. Run sigmon and observe the output:
iay RSSI: ?
iay-temp RSSI: ?
Expected behavior
I'd have expected consistent human-readable values across the (serial) UI.
I'm using an ESP32-WROOM-32D based development board flashed with the latest "mini" firmware. I'm looking at the output using cu from a Mac.
I think the reason for this is that the code in WiFiScan.cpp (about line 3454) that generates this output is casting the rssi field from the AccessPoint structure to String for output. The field (defined in EvilPortal.h) is a char and casting it to String makes it a single character with that (positive) value.
I put the following in an Arduino sketch to check this finding:
// The rssi field in AccessPoint is a char.// Found in EviPortal.hchar r = -86;
Serial.println("What the Marauder code does:");
Serial.println("RSSI: " + (String)r);
Serial.println("What the code should perhaps do instead:");
// Pull out an RSSI value for display.// Note that char is an unsigned type.int rssi = -(256-(int)r);
Serial.println("RSSI: " + (String)rssi);
// Or, store in a more appropriate fieldint8_t rs = -86;
Serial.println("RSSI: " + (String)rs);
Output was as follows:
RSSI: �
What the code should perhaps do instead:
RSSI: -86
RSSI: -86
I think this probably used to work. There's another definition of AccessPoint commented out in WiFiScan.h which uses int rssi and I think that would have avoided the issue as well.
I see a couple of other issues in this repo which are probably the same underlying problem.
The text was updated successfully, but these errors were encountered:
Describe the bug
The
sigmon
command results in output in which the RSSI values are presented as single characters instead of the negative decimal values that are used in the rest of the UI. This makes them very difficult to interpret.To Reproduce
Flash firmware to a board; connect using
cu
or some other terminal app. Runsigmon
and observe the output:Expected behavior
I'd have expected consistent human-readable values across the (serial) UI.
I'm using an ESP32-WROOM-32D based development board flashed with the latest "mini" firmware. I'm looking at the output using
cu
from a Mac.I think the reason for this is that the code in
WiFiScan.cpp
(about line 3454) that generates this output is casting therssi
field from theAccessPoint
structure toString
for output. The field (defined inEvilPortal.h
) is achar
and casting it toString
makes it a single character with that (positive) value.I put the following in an Arduino sketch to check this finding:
Output was as follows:
I think this probably used to work. There's another definition of
AccessPoint
commented out inWiFiScan.h
which usesint rssi
and I think that would have avoided the issue as well.I see a couple of other issues in this repo which are probably the same underlying problem.
The text was updated successfully, but these errors were encountered: