『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 1825|回复: 3

[求助] esp32c3 +蓝牙不成功,帮忙看看

[复制链接]

3

主题

30

帖子

259

积分

中级会员

Rank: 3Rank: 3

积分
259
金钱
229
HASS币
0
发表于 2023-3-20 15:32:11 | 显示全部楼层 |阅读模式
合宙的esp32c3简版,看板上印着wifi+BLE,想弄个蓝牙网关,可以一直编译不通过。配置文件为:
esphome:
  name: esp32c3
  name_add_mac_suffix: true

  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32c3

esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3
  framework:
    type: esp-idf
logger:
  hardware_uart: USB_SERIAL_JTAG
  level: DEBUG # defaults to DEBUG, NONE ERROR WARN INFO DEBUG VERBOSE VERY_VERBOSE
api:
  encryption:
    key: "+="
ota:
  password: "7"
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "Lu"
    password: "G4"
  fast_connect: on  
esp32_ble_tracker:
  scan_parameters:
    interval: 120ms
    window: 100ms
binary_sensor:
  - platform: ble_presence
    mac_address: CB:41:25:2D:CE:77
    name: "xiaomi bracelet"




出错信息为:
Archiving .pioenvs/esp32c3/lib761/libnoise-c.a
Linking .pioenvs/esp32c3/firmware.elf/config/.esphome/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32c3/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o: in function `esphome::esp32_ble_tracker::ESP32BLETracker::stop_scan()':/config/.esphome/build/esp32c3/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:234: undefined reference to `esp_ble_gap_stop_scanning'/config/.esphome/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32c3/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o: in function `esphome::esp32_ble_tracker::ESP32BLETracker::start_scan_(bool)':/config/.esphome/build/esp32c3/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:256: undefined reference to `esp_ble_gap_set_scan_params'/config/.esphome/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32c3/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:259: undefined reference to `esp_ble_gap_start_scanning'/config/.esphome/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32c3/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o: in function `esphome::esp32_ble_tracker::ESP32BLETracker::loop()':/config/.esphome/build/esp32c3/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:222: undefined reference to `esp_ble_gap_stop_scanning'/config/.esphome/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32c3/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:185: undefined reference to `esp_ble_gap_stop_scanning'collect2: error: ld returned 1 exit status*** [.pioenvs/esp32c3/firmware.elf] Error 1

回复

使用道具 举报

3

主题

30

帖子

259

积分

中级会员

Rank: 3Rank: 3

积分
259
金钱
229
HASS币
0
 楼主| 发表于 2023-3-20 15:34:38 | 显示全部楼层
编译是web方式,选install
屏幕截图 2023-03-20 153342.jpg
回复

使用道具 举报

3

主题

30

帖子

259

积分

中级会员

Rank: 3Rank: 3

积分
259
金钱
229
HASS币
0
 楼主| 发表于 2023-3-21 11:43:50 | 显示全部楼层
翻遍了esphome的论坛,看到一条建议:将CONFIG_BT_BLE_50_FEATURES_SUPPORTED设为n,ok了
esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_BT_BLE_50_FEATURES_SUPPORTED: n
回复

使用道具 举报

4

主题

100

帖子

818

积分

高级会员

Rank: 4

积分
818
金钱
718
HASS币
0
发表于 2023-3-22 10:02:57 | 显示全部楼层
alonewoo 发表于 2023-3-21 11:43
翻遍了esphome的论坛,看到一条建议:将CONFIG_BT_BLE_50_FEATURES_SUPPORTED设为n,ok了
esp32:
  board ...

不一定是这个,你也可以试试编译前先“Clean Build Files”,说不定也能成功。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 23:40 , Processed in 0.281088 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表