BLE-Scanner icon indicating copy to clipboard operation
BLE-Scanner copied to clipboard

error: 'EEPROM' was not declared in this scope

Open haimbilia opened this issue 1 year ago • 15 comments

keep getting this error, i tried windows 10 windows 11, latest version of arduino ide and older versions, also tried older versions of the libraries, i tried vscode as well, i get the same error. Capture

haimbilia avatar Jul 31 '24 17:07 haimbilia

Please have a look at the discussion in the other thread about this topic: https://github.com/gromeck/BLE-Scanner/issues/24 It's a problem caused by the case insensitivity of windows. You need to rename the eeprom und wifi files as an ad hoc workaround.

wprinz avatar Jul 31 '24 17:07 wprinz

Please have a look at the discussion in the other thread about this topic: #24 It's a problem caused by the case insensitivity of windows. You need to rename the eeprom und wifi files as an ad hoc workaround.

i was just reading it, do you mean the files eeprom.h and wifi.h?

haimbilia avatar Jul 31 '24 17:07 haimbilia

Yes, you need to rename both, the .h and .cpp files to something like my_wifi.h/.cpp and my_eeprom.h/.cpp. Afterwards you need to find alle includes of the .h files in the other files and need to update these accordingly. It's not that many :-)

wprinz avatar Jul 31 '24 17:07 wprinz

thank you, i downloaded your fork and it worked

haimbilia avatar Jul 31 '24 18:07 haimbilia

Great! I removed it briefly after creation since I thought that I messed it up. But it's now back in place for the time beeing until this repro is updated: https://github.com/wprinz/BLE-Scanner/tree/main

wprinz avatar Aug 01 '24 06:08 wprinz

Could someone check if this is still a problem with v1.0?

gromeck avatar Jan 18 '25 08:01 gromeck

Hi, I just downloaded the new version and tried to compile. But the compilation error with eeprom and wifi remains (Win10, Arduino IDE v 2.3.4).

I was able to compile it after I modfied the names to my_wifi.cpp/.h and my_eeprom.cpp/.h and all the includes of these in the other files as with the last version. Maybe you can consider to update this in your code as well?

However, now the ESP 32 doesn't find any bluetooth devices anymore. Not sure, but do I need to perform something on the manufactorer list or is this caused by the major updates in the Nimble libs? I updated all libs to the newest version.

wprinz avatar Jan 29 '25 16:01 wprinz

Update: The device is working OK, i.e. it is recognizing other BLE devices - I just didn't recognize/remember that devices that do not send a stable adress are not listed :-) After adding this hack in bluetooth.cpp it is now listing many devices if (true || advertisedDevice->getAddressType() == BLE_ADDR_PUBLIC) { Would be nice to make this configurable.

To summarize : The only problem that still remains is that eeprom and wifi should be renamed to support compilation in windows. If you like I can add a branch that you may pull in your version.

wprinz avatar Jan 30 '25 07:01 wprinz

To summarize : The only problem that still remains is that eeprom and wifi should be renamed to support compilation in windows. If you like I can add a branch that you may pull in your version.

If compiling is only an issue unter Arduino IDE v2 on Windows because of a file name clash, this issue should be fixed in the IDE. I tried a quick search in https://github.com/arduino/arduino-ide/issues without a hit. I suggest that you create a simple sketch and open a ticket against the IDE v2.

gromeck avatar Feb 01 '25 10:02 gromeck

Update: The device is working OK, i.e. it is recognizing other BLE devices - I just didn't recognize/remember that devices that do not send a stable adress are not listed :-) After adding this hack in bluetooth.cpp it is now listing many devices if (true || advertisedDevice->getAddressType() == BLE_ADDR_PUBLIC) { Would be nice to make this configurable.

Than you should open another issue here -- we will not handle two different issues in one ticket.

gromeck avatar Feb 01 '25 10:02 gromeck

Update: The device is working OK, i.e. it is recognizing other BLE devices - I just didn't recognize/remember that devices that do not send a stable adress are not listed :-) After adding this hack in bluetooth.cpp it is now listing many devices if (true || advertisedDevice->getAddressType() == BLE_ADDR_PUBLIC) { Would be nice to make this configurable.

Than you should open another issue here -- we will not handle two different issues in one ticket.

You are right. This enhancement is already discussed here: https://github.com/gromeck/BLE-Scanner/issues/16

wprinz avatar Feb 03 '25 07:02 wprinz

To summarize : The only problem that still remains is that eeprom and wifi should be renamed to support compilation in windows. If you like I can add a branch that you may pull in your version.

If compiling is only an issue unter Arduino IDE v2 on Windows because of a file name clash, this issue should be fixed in the IDE. I tried a quick search in https://github.com/arduino/arduino-ide/issues without a hit. I suggest that you create a simple sketch and open a ticket against the IDE v2.

I believe it's a general issue of the case insensitivity of windows that is causing the problem. I moved the code to Visual Studio Code / PlatformIO and the compilation problem remains. After modifying the file names as described above it compiles ok.

Anyhow you may close this issue now as other windows user will find enough information about the problem and a possible solution in this discussion.

wprinz avatar Feb 03 '25 07:02 wprinz

Update: The device is working OK, i.e. it is recognizing other BLE devices - I just didn't recognize/remember that devices that do not send a stable adress are not listed :-) After adding this hack in bluetooth.cpp it is now listing many devices if (true || advertisedDevice->getAddressType() == BLE_ADDR_PUBLIC) { Would be nice to make this configurable.

Than you should open another issue here -- we will not handle two different issues in one ticket.

You are right. This enhancement is already discussed here: https://github.com/gromeck/BLE-Scanner/issues/16

Ooops, I wasn't aware of that ;-) So, than it's on the list ... give me some time to implement it.

gromeck avatar Feb 03 '25 11:02 gromeck