Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    【FAQ】全志V853芯片 如何动态打开蓝牙kernel部分的log?

    其它全志芯片讨论区
    1
    1
    1346
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • q1215200171
      budbool LV 9 last edited by

      1.主题
      如何动态打开蓝牙kernel部分的log

      2.问题背景
      产品:扫描笔等Tina产品
      硬件:V853 + XR829
      软件:Tina linux4.9

      目的是为了分析问题,抓取kerne里面/net/bluetooth/、driver/bluetooth/目录下的BT_DBG打印。

      3.解决办法

      • 环境配置
      menuconfig选上CONFIG_DEBUG_FS、CONFIG_DYNAMIC_DEBUG
      
      • 小机端
      1. echo 8 > /proc/sys/kernel/printk  调整printk打印等级为7以上
      2. cat /sys/kernel/debug/dynamic_debug/control | grep bluetooth  查看目前能控制的打印
      3. echo 'file hci_core.c +p' > /sys/kernel/debug/dynamic_debug/control 指将hci_core.c文件的打印打开
      4. echo 'file hci_core.c -p' > /sys/kernel/debug/dynamic_debug/control 指将hci_core.c文件的打印关闭
      5. echo "file net/bluetooth/rfcomm/core.c line 1603 +p" > /sys/kernel/debug/dynamic_debug/control 指将文件net/bluetooth/rfcomm/core.c的第1603行的打印打开
      6. echo 'module $mod_name +p' > /sys/kernel/debug/dynaminc_debug/control 指将某个模块的打印打开。
      

      按照上面的方法配置好后,打开蓝牙调试就可以了,默认会输出到终端上或dmesg方式查看。

      1 Reply Last reply Reply Quote Share 1
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Moved from V Series by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策