With the latest version of PAX counter from github I cannot compile the code.
I do get this error:
src\wifiscan.cpp: In function 'void wifi_sniffer_packet_handler(void*, wifi_promiscuous_pkt_type_t)':
src\wifiscan.cpp:16:9: error: 'wifi_ieee80211_packet_t' does not name a type
const wifi_ieee80211_packet_t *ipkt =
^
src\wifiscan.cpp:18:9: error: 'wifi_ieee80211_mac_hdr_t' does not name a type
const wifi_ieee80211_mac_hdr_t *hdr = &ipkt->hdr;
^
src\wifiscan.cpp:25:24: error: 'hdr' was not declared in this scope
mac_add((uint8_t *)hdr->addr2, ppkt->rx_ctrl.rssi, MAC_SNIFF_WIFI);
^
Compiling .pioenvs\ttgov2\lib666\U8g2_ID942\U8x8lib.cpp.o
*** [.pioenvs\ttgov2\src\wifiscan.cpp.o] Error 1
[ERROR] Took 19.74 seconds
Can anyone point me in a direction how to solve this?
Archiving .pioenvs\ttgov21new\libef6\libWire.a
sCrc\wifiscan.cpp: In function ‘void wifi_sniffer_packet_handler(void*, wifi_promiscuous_pkt_type_t)’:ompiling .pioenvs\ttgov21new\libb8e\U8g2_ID942\clib\u8g2_box.c.o
src\wifiscan.cpp:16:9: error: ‘wifi_ieee80211_packet_t’ does not name a type
const wifi_ieee80211_packet_t *ipkt =
^
src\wifiscan.cpp:18:9: error: ‘wifi_ieee80211_mac_hdr_t’ does not name a type
const wifi_ieee80211_mac_hdr_t *hdr = &ipkt->hdr;
^
src\wifiscan.cpp:25:24: error: ‘hdr’ was not declared in this scope
mac_add((uint8_t *)hdr->addr2, ppkt->rx_ctrl.rssi, MAC_SNIFF_WIFI);
^
*** [.pioenvs\ttgov21new\src\wifiscan.cpp.o] Error 1
I had to add the include path to wifiscan.h to remove these errors and produce new ones:
My addition to include to platformio.ini:
build_flags =
-include include/wifiscan.h
Now I get these errors:
Compiling .pioenvs\ttgov2\FrameworkArduino\WString.cpp.o
C:\Users\drasv\.platformio\packages\framework-arduinoespressif32\cores\esp32\WMath.cpp: In function 'unsigned int makeWord(unsigned char, unsigned char)':
C:\Users\drasv\.platformio\packages\framework-arduinoespressif32\cores\esp32\WMath.cpp:65:55: error: ambiguating new declaration of 'unsigned int makeWord(unsigned char, u
nsigned char)'
unsigned int makeWord(unsigned char h, unsigned char l)
^
In file included from ./include\hash.h:4:0,
from <command-line>:0:
C:\Users\drasv\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:162:10: note: old declaration 'uint16_t makeWord(byte, byte)'
uint16_t makeWord(byte h, byte l);
^
*** [.pioenvs\ttgov2\FrameworkArduino\WMath.cpp.o] Error 1
[ERROR] Took 71.92 seconds
Unfortunately i cannot reproduce this in my IDE (Windows 10, Visual studio code, Platformio), code in current repo master branch (commit b921731) compiles without errors.
I made some changes in platformio.ini, i assume that this causes trouble may be with IDEs using Linux or Atom?
Please open issue, maybe someone else can fix this. I think it’s a minor detail, maybe a path setting in platformio.ini
Sure, something is seriously messed-up and therefore the project is likely no more platform/IDE independant.
My workaround (dirty but effective):
1: In platformio.ini i added to the build_flags::
-include include/wifiscan.h
2: In the file WMath.cpp (my path: C:\Users<username>.platformio\packages\framework-arduinoespressif32\cores\esp32) I uncommented the following lines as these seem to conflict with the declaration and implementation of the arduino libraries:
Excuse me, is there a complete version that can be compiled without errors? The current one does not work. On none of my computers (IDE (Windows 10, Visual studio code, Platformio
Version: 1.29.1 (system setup)
Date: 2018-11-15T19: 13: 36.375Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64)?
wifiscan.cpp: 16: 9: error or newest with error in bme680…
I reverted a change made with one of latest commits in platformio.ini.
User which had compile errors, could you please try again with current version in master branch and report here? Thx.