arduino-libraries / ArduinoBLE

ArduinoBLE library for Arduino
GNU Lesser General Public License v2.1
291 stars 198 forks source link

UNO R4 WIFI: 'SerialHCI' was not declared in this scope when compiled on a Windows 10 machine. #317

Closed MrYsLab closed 11 months ago

MrYsLab commented 11 months ago

I get no errors when I compile this sketch on Linux using IDE 2.1.1. If I try to do this same on a Windows 10 computer, I get the following error:

C:\Users\ayori\OneDrive\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:35:2: error: #error "Unsupported board selected!"
 #error "Unsupported board selected!"
  ^~~~~
C:\Users\ayori\OneDrive\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:101:40: error: 'SerialHCI' was not declared in this scope
 HCIUartTransportClass HCIUartTransport(SerialHCI, 912600);
                                        ^~~~~~~~~
C:\Users\ayori\OneDrive\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:101:40: note: suggested alternative: 'SerialUSB'
 HCIUartTransportClass HCIUartTransport(SerialHCI, 912600);
                                        ^~~~~~~~~
                                        SerialUSB

exit status 1

I am not very knowledgable about Windows
Compilation error: exit status 1
per1234 commented 11 months ago

Hi @MrYsLab. This error indicates that you are compiling for the UNO R4 WiFi board, but not using the beta test version of the library that is compatible with the board. The release version of this library does not support the UNO R4 WiFi board so this error is expected when using that version of the library.

Instructions for installing the beta tester version of the library are available here:

https://forum.arduino.cc/t/radio-module-firmware-version-0-2-0-is-now-available/1147361#arduinoble-library-5