Hi,
I am trying to run through a bluetooth LE nimble example I have managed to get the SPP Server up and running but the SPP Client example header file asks for a #include "esp_central.h" which doesn't seem to exist anywhere? Has anyone had any luck with this? Thanks!
https://github.com/espressif/esp-idf/tr ... le/ble_spp
NimBLE Bluetooth SPP Client Example Problem
-
- Posts: 20
- Joined: Thu Nov 02, 2017 12:40 am
Re: NimBLE Bluetooth SPP Client Example Problem
The file can be found at examples/bluetooth/nimble/common/nimble_central_utils/esp_central.h
Re: NimBLE Bluetooth SPP Client Example Problem
Hi, Thanks! I have solved this problem trouble is I get a different compilation error now? If anyone can successfully compile the below example sketch let me know (Blueooth LE SPP Client):-
https://github.com/espressif/esp-idf/tr ... spp_client
My compile error messages:-
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_set_handle+0x8): undefined reference to `peer_chr_find_uuid'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_connect_if_interesting+0x8): undefined reference to `addr_str'C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x34): undefined reference to `print_adv_fields'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x3c): undefined reference to `print_conn_desc'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x40): undefined reference to `peer_add'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x44): undefined reference to `peer_disc_all'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x48): undefined reference to `peer_delete'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.app_main+0x34): undefined reference to `peer_init'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o: in function `ble_spp_client_set_handle':
C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:35:(.text.ble_spp_client_set_handle+0x17): undefined reference to `peer_chr_find_uuid'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o: in function `ble_spp_client_connect_if_interesting':
C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:188:(.text.ble_spp_client_connect_if_interesting+0x56): undefined reference to `addr_str'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o: in function `ble_spp_client_gap_event':
C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:223:(.text.ble_spp_client_gap_event+0x42): undefined reference to `print_adv_fields'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:241:(.text.ble_spp_client_gap_event+0x9f): undefined reference to `print_conn_desc'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:244:(.text.ble_spp_client_gap_event+0xba): undefined reference to `peer_add'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:249:(.text.ble_spp_client_gap_event+0xe5): undefined reference to `peer_disc_all'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:262:(.text.ble_spp_client_gap_event+0x13d): undefined reference to `print_conn_desc'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:273:(.text.ble_spp_client_gap_event+0x17d): undefined reference to `peer_delete'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o: in function `app_main':
C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:430:(.text.app_main+0x86): undefined reference to `peer_init'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\denky32\firmware.elf] Error 1
https://github.com/espressif/esp-idf/tr ... spp_client
My compile error messages:-
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_set_handle+0x8): undefined reference to `peer_chr_find_uuid'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_connect_if_interesting+0x8): undefined reference to `addr_str'C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x34): undefined reference to `print_adv_fields'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x3c): undefined reference to `print_conn_desc'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x40): undefined reference to `peer_add'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x44): undefined reference to `peer_disc_all'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.ble_spp_client_gap_event+0x48): undefined reference to `peer_delete'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o:(.literal.app_main+0x34): undefined reference to `peer_init'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o: in function `ble_spp_client_set_handle':
C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:35:(.text.ble_spp_client_set_handle+0x17): undefined reference to `peer_chr_find_uuid'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o: in function `ble_spp_client_connect_if_interesting':
C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:188:(.text.ble_spp_client_connect_if_interesting+0x56): undefined reference to `addr_str'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o: in function `ble_spp_client_gap_event':
C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:223:(.text.ble_spp_client_gap_event+0x42): undefined reference to `print_adv_fields'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:241:(.text.ble_spp_client_gap_event+0x9f): undefined reference to `print_conn_desc'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:244:(.text.ble_spp_client_gap_event+0xba): undefined reference to `peer_add'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:249:(.text.ble_spp_client_gap_event+0xe5): undefined reference to `peer_disc_all'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:262:(.text.ble_spp_client_gap_event+0x13d): undefined reference to `print_conn_desc'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:273:(.text.ble_spp_client_gap_event+0x17d): undefined reference to `peer_delete'
C:/Users/Pee/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio\build\denky32\src\main.c.o: in function `app_main':
C:\Users\Pee\OneDrive\Documents\PlatformIO\Projects\Nimble_SPP_Client/src/main.c:430:(.text.app_main+0x86): undefined reference to `peer_init'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\denky32\firmware.elf] Error 1
Re: NimBLE Bluetooth SPP Client Example Problem
Files like examples/bluetooth/nimble/common/nimble_central_utils/misc.c and examples/bluetooth/nimble/common/nimble_central_utils/peer.c are also needed. Infact all files of the nimble_central_utils folder need to compiled. Guess you are missing them.
Who is online
Users browsing this forum: Baidu [Spider], Majestic-12 [Bot], rsimpsonbusa and 87 guests