黄山派bt_pan demo移植失败

黄山派的bt_pan demo跑通了,我把它移植到我的mp3项目上,Finsh也按照readme.md配置了,但是蓝牙就是启用不了,这是串口日志,实在解决不了了,怎么修改都没有,一直是超时连接不上蓝牙,然后蓝牙初始化失败

这是项目地址vertinenn/sifli-mp3

[15:16:05.923]收←◆[MSD] 1007 [err] wait ready timeout!
[MSD] 1007 [info] SD card goto IDLE mode OK!
[MSD] 1008 [info] CMD8 response : 0x01 0x00 0x00 0x01 0xAA
[MSD] 1009 [info] Ver2.00 or later or SDHC or SDXC memory card!
[MSD] 1010 SD_V2: READ_OCR
[MSD] 1010 response:1,0,ff,80
[MSD] 1011 [info] OCR is 0x00FF8000
[MSD] 1024 SD_V2 again: READ_OCR
[MSD] 1025 [info] OCR 2nd read is 0xC0FF8000
[MSD] 1025 [info] It is SD2.0 SDHC Card!!!
[MSD] 1027 [info] CSD Version 2.0
[MSD] 1028 [info] TRAN_SPEED: 0x32, 10Mbit/s.
[MSD] 1028 [info] CSD : C_SIZE : 119275
[MSD] 1029 [info] card capacity : 58.24 Gbyte
[MSD] 1029 [info] sector_count : 122138624
[SD]msd init ok
find sd0 ok ! 0x2003d850
e[32;22m[I/FAL] Flash Abstraction Layer (V0.5.99) initialize success.e[0m
e[32;22m[I/FAL] The FAL MTD NOR device (dfu) created successfullye[0m
e[32;22m[I/FAL] The FAL MTD NOR device (ble) created successfullye[0m
e[32m[35944] I/drv.rtc main: PSCLR=0x80000100 DivAI=128 DivAF=0 B=256
e[0me[32m[35973] I/drv.rtc main: RTC use LXT RTC_CR=00000001

e[0me[32m[35997] I/drv.rtc main: Init RTC, wake = 0

e[0me[32m[36163] I/drv.audprc main: init 00 ADC_PATH_CFG0 0x606

e[0me[32m[36188] I/drv.audprc main: HAL_AUDPRC_Init res 0

e[0me[32m[36213] I/drv.audcodec main: HAL_AUDCODEC_Init res 0

e[0me[32m[36238] I/TOUCH main: Regist touch screen driver, probe=0x12026db1
e[0mcall par CFG1(3313)
fc 9, xtal 2000, pll 2104
call par CFG1(3313)
fc 7, xtal 2000, pll 1687
e[32m[36417] I/audio audiosvr: audio server run
e[0me[32m[36439] I/audio bt_downv: audio_btdownlink run
e[0me[32m[36472] I/mp3_tf_player main: TF card detected.

e[0mmsh />e[32m[36578] I/mp3_tf_player main: mount fs on tf card to root success

e[0me[32m[36671] I/mp3_tf_player main: Found music name: moon halo

e[0me[32m[36699] I/audio main: mp3 open /music/moon halo.mp3
e[0me[32m[36722] I/audio main: mp3 open /music/moon halo.mp3
e[0me[32m[36870] I/audio main: ID3 len=0x87
e[0me[32m[37089] I/audio main: mp3: B=16 L=3 C=2 V=0 O=2304 S=44100
e[0mMusic Duration: 03:24
Sample Rate: 44100 Hz
Channels: 2
e[32m[37141] I/mp3_tf_player main: Found music file: /music/moon halo.mp3, duration: 204

e[0me[32m[37180] I/mp3_tf_player main: Found music name: hope is the thing with the features

e[0me[32m[37214] I/audio main: mp3 open /music/hope is the thing with the features.mp3
e[0me[32m[37247] I/audio main: mp3 open /music/hope is the thing with the features.mp3
e[0me[32m[37402] I/audio main: no ID3
e[0me[32m[37630] I/audio main: mp3: B=16 L=3 C=2 V=0 O=2304 S=44100
e[0mMusic Duration: 03:50
Sample Rate: 44100 Hz
Channels: 2
e[32m[37682] I/mp3_tf_player main: Found music file: /music/hope is the thing with the features.mp3, duration: 230

e[0me[32m[37728] I/audio main: private volume[4]=1
e[0mWeather service initialized
e[32m[37837] I/nvds mbox: read sleep time 4500
e[0m
[15:16:07.106]收←◆e[32m[73891] I/sibles main: enable BLE Core. Lib ver: bt.2.0.188f5931
e[0me[32m[73921] I/NO_TAG main: BT PAN initialized successfully
e[0me[32m[73948] I/NO_TAG main: BT PAN thread created successfully
e[0me[32m[73973] I/mp3_tf_player main: BT PAN and Weather services started successfully

e[0me[32m[74006] I/mp3_tf_player main: Available commands:

e[0me[32m[74029] I/mp3_tf_player main: weather_cmd - Get weather information

e[0me[32m[74060] I/mp3_tf_player main: pan_cmd - BT PAN commands (del_bond, conn_pan)

e[0me[32m[74101] I/drv.lcd lvgl_thr: [NONE] → [OPENING]
e[0me[32m[74125] I/drv.lcd lcd_task: open
e[0me[32m[74144] I/drv.epic lcd_task: drv_gpu opened.
e[0me[32m[74165] I/drv.lcd lcd_task: HW open
e[0me[32m[74203] I/drv.lcd lcd_task: Try registered LCD driver…
e[0m
[15:16:07.183]收←◆
CO5300_ReadID 0x331100
e[32m[76525] I/co5300 lcd_task: LCD module use CO5300 IC

e[0m
[15:16:07.378]收←◆
CO5300_ReadID 0x331100
e[32m[82762] I/co5300 lcd_task: LCD module use CO5300 IC

e[0me[32m[82786] I/drv.lcd lcd_task: Found lcd co5300 id:331100h
e[0me[32m[82811] I/drv.lcd lcd_task: HW open done.
e[0me[32m[82831] I/drv.lcd lcd_task: [OPENING] → [INITIALIZED]
e[0me[32m[82855] I/drv.lcd lcd_task: open done.
e[0me[32m[82877] I/drv.lcd_fb lvgl_thr: drv_lcd_fb_init
e[0me[32m[82901] I/drv.lcd_fb lvgl_thr: drv_lcd_fb_init done.
e[0me[32m[82944] I/TOUCH lvgl_thr: Open
e[0me[32m[82965] I/TOUCH lvgl_thr: Opened.
e[0me[32m[83050] I/LVGL lvgl_thr: [littlevgl2rtt] Welcome to the littlevgl2rtt lib.
e[0me[32m[83083] I/mp3_tf_player lvgl_thr: RTC device found, attempting to initialize…

e[0me[32m[83175] I/TOUCH tp_init: Find touch screen driver…
e[0me[32m[83199] I/TOUCH tp_init: Probe 12026db1
e[0me[32m[83221] I/TOUCH tp_init: touch screen found driver 0x2002919c, ft6146
e[0me[32m[83260] I/mp3_tf_player lvgl_thr: RTC initialized with time: 2025-01-27 19:00:00

e[0me[32m[83295] I/mp3_tf_player lvgl_thr: Initializing time sync…

e[0me[32m[83322] I/mp3_tf_player lvgl_thr: Syncing time from system…

e[0me[32m[83352] I/mp3_tf_player lvgl_thr: Current RTC time: 1738004400

e[0me[32m[83381] I/mp3_tf_player lvgl_thr: Current RTC time: year=2025, month=1, day=27, hour=19, min=0, sec=0

e[0me[32m[83423] I/mp3_tf_player lvgl_thr: Network time sync successful: 2025-01-27 19:30:00

e[0me[32m[83598] I/mp3_tf_player lvgl_thr: RTC time updated from network

e[0m
[15:16:07.434]收←◆e[32m[84562] I/mp3_tf_player lvgl_thr: Setting page created successfully

e[0me[32m[84720] I/mp3_tf_player lvgl_thr: Weather page created successfully

e[0m
[15:16:07.484]收←◆e[31m[86239] E/drv.ft6146 tp_init: ft6146 id_H=64
e[0me[31m[86290] E/drv.ft6146 tp_init: ft6146 id_L=56
e[0m
[15:16:07.524]收←◆e[32m[87523] I/drv.lcd lcd_task: Auto turn on display.
e[0me[32m[87548] I/drv.lcd lcd_task: set brightness 50
e[0me[32m[87572] I/drv.lcd lcd_task: display on
e[0me[32m[87592] I/drv.lcd lcd_task: [INITIALIZED] → [ON]
e[0m
[15:16:08.108]收←◆
######################################################

BTS2 Demo Main Menu

1. Generic Command

6. A2DP Sink

8. L2CAP bqb test

h. PAN

z. hid

s. Show Menu

q. Exit

######################################################

e[32m[106912] I/ble_cm mbox: read_bond_infor_from_flash: 1
e[0mle p256 nvds get 0

[15:16:15.097]收←◆e[32m[335577] I/NO_TAG bt_pan: BT/BLE stack and profile init failed
e[0me[32m[335615] I/btapp_intf bt_pan: set name
sifli_pan ?

e[0m
[15:16:33.007]发→◇pan_cmd conn_pan

[15:16:33.013]收←◆msh />msh />
[15:16:34.305]发→◇pan_cmd conn_pan

[15:16:34.305]收←◆msh />msh />
[15:16:55.086]发→◇weather_cmd

[15:16:55.092]收←◆Could not find api.seniverse.com, please check PAN connection
Failed to get weather data
msh />msh />
[15:16:59.462]发→◇weather_cmd

在你工程的sconsstruct文件里看看有这个吗,没有的话可以加上

感谢兄弟,真的一加上就成功了,感激不尽,虽然不知道为啥,难道这个文件Finsh不能配置吗

加的这个是蓝牙的lcpu工程,只会在使用蓝牙的工程里才默认加了这个,如果是往其他工程里移植蓝牙的话需要加上这个才能使用蓝牙

请问一下这个功能可以使用手机的网络来连接MQTT服务器吗:face_blowing_a_kiss:

可以使用mqtt的

好哒~ 感谢 :partying_face: