# RTK Surveryor Firmware not compiling

**URL:** <https://community.sparkfun.com/t/rtk-surveryor-firmware-not-compiling/43116>\
**Category:** Development Tools\
**Created:** [November 26, 2021, 8:49pm UTC](https://community.sparkfun.com/t/rtk-surveryor-firmware-not-compiling/43116 "2021-11-26T20:49:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mettaelectronics](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mettaelectronics](https://community.sparkfun.com/u/mettaelectronics)\
**Post date:** [November 26, 2021, 8:49pm UTC](https://community.sparkfun.com/t/rtk-surveryor-firmware-not-compiling/43116/1 "2021-11-26T20:49:10Z")

</div>

Hi there,

We recently purchased the RTK Surveyor for testing reasons. We were trying to compile the Arduino firmware but it returns some errors. Please could you give us some suggestions in order to finally compile the Arduino firmware? It seems like some macros are not defined, they are not found in the whole project, is it something we need to add?

Error Message:

* * *

WARNING: library JC\_Button claims to run on avr architecture(s) and may be incompatible with your current board which runs on esp32 architecture(s).

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp: In function ‘void esp\_spp\_cb(esp\_spp\_cb\_event\_t, esp\_spp\_cb\_param\_t\*)’:

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:268:34: error: ‘ESP\_BT\_CONNECTABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:268:54: error: ‘ESP\_BT\_GENERAL\_DISCOVERABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp: In member function ‘bool BluetoothSerial::connect(String)’:

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:861:34: error: ‘ESP\_BT\_CONNECTABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:861:54: error: ‘ESP\_BT\_GENERAL\_DISCOVERABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp: In member function ‘bool BluetoothSerial::connect()’:

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:905:34: error: ‘ESP\_BT\_CONNECTABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:905:54: error: ‘ESP\_BT\_GENERAL\_DISCOVERABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp: In member function ‘BTScanResults\* BluetoothSerial::discover(int)’:

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:971:30: error: ‘ESP\_BT\_CONNECTABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:971:50: error: ‘ESP\_BT\_GENERAL\_DISCOVERABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp: In member function ‘bool BluetoothSerial::discoverAsync(BTAdvertisedDeviceCb, int)’:

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:996:30: error: ‘ESP\_BT\_CONNECTABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

C:\Users\LENOVO\Documents\Arduino\Projects\RTK\_Surveyor\src\BluetoothSerial\BluetoothSerial.cpp:996:50: error: ‘ESP\_BT\_GENERAL\_DISCOVERABLE’ was not declared in this scope

esp\_bt\_gap\_set\_scan\_mode(ESP\_BT\_CONNECTABLE, ESP\_BT\_GENERAL\_DISCOVERABLE);

^

exit status 1

Error compiling for board ESP32 Dev Module.

* * *

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [December 1, 2021, 5:57am UTC](https://community.sparkfun.com/t/rtk-surveryor-firmware-not-compiling/43116/2 "2021-12-01T05:57:22Z")

</div>

The hookup guide [https://learn.sparkfun.com/tutorials/sp … tomization](https://learn.sparkfun.com/tutorials/sparkfun-rtk-surveyor-hookup-guide/all?_ga=2.47598119.1064951729.1638169036-1853259630.1615791300#firmware-updates-and-customization) mentions that “esp32 dev module” need to be the selected board for configuring the arduino side of things…is it selected?

---

<div class="post-metadata">

**Author:** ![mettaelectronics](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mettaelectronics](https://community.sparkfun.com/u/mettaelectronics)\
**Post date:** [December 1, 2021, 1:46pm UTC](https://community.sparkfun.com/t/rtk-surveryor-firmware-not-compiling/43116/3 "2021-12-01T13:46:41Z")

</div>

Yes, of course. The versions mentioned in the README file are selected too.

---

<div class="post-metadata">

**Author:** ![YellowDog](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/yellowdog/32/1782_2.png) [@YellowDog](https://community.sparkfun.com/u/YellowDog)\
**Post date:** [December 1, 2021, 4:29pm UTC](https://community.sparkfun.com/t/rtk-surveryor-firmware-not-compiling/43116/4 "2021-12-01T16:29:27Z")

</div>

> was not declared in this scope

That generally means you haven't installed one or more libraries required by the code you're trying to compile.
