gmy800101的笔记 https://bbs.21ic.com/?392771 [收藏] [复制] [RSS]

日志

新鲜出炉的蓝牙模块调试流程之AT指令

已有 2154 次阅读2009-11-5 09:09 |系统分类:通信网络

就是怎么操作,流程,刚学的,特总结如下,对没有调试过BT,无从下手的新手们提供点素材。我也是现学现卖,原来没碰过,突然让调,就一头雾水,幸亏是个模块,只用AT指令就能搞定。


AT command deion


AT+BTIN  查找BT


AT+BTK=”8888” is the pair code 配对密码


ATS102?


ATS102=$0180   will allow A2DP and AVRCP   禁止SPP,使能A2DP AVRCP


AT+BTC?


001F00


AT+BTN?


“LAIRD BTMMP 000151”


AT&F0 设置UART波特率


ATS512=4  连接并查找


ATS0=1  自动应答


ATZ  硬件复位


AT+BTN  读模块的名字


PIN


AT+BTT                                                                       


0005C9000000 读对方BT的地址


ATI4


0016A4000161 读自己的BT地址


AT+APD 0005C9000000 to control your phone A2DP


CONNECT 0005C9000000,110D


AT+AVD 0005C9000000 to control your phone  AVRCP


CONNECT 0005C9000000,110E


AT+AVC44    play


AT+AVC45    stop


AT+AVC46    pause


AT+AVC4B    last song


AT+AVC4C    next song


AT+BTN=”GMY”  设置缺省连接name


ATI4    BT设备地址


 


Phone ->A2DP -> module #1 -> Speaker(J7)


Flow:


at&F* reset all setting on the module


atz will reboot the module


ats102=$0180 allows A2DP, and AVRCP


at+btk="8888" - is the pair code


aT+BTT will save the pairing setting


ATI4?


0016A4000161


At+btt?


0005C9000000


AT+APD0005C9000000     A2DP connect your phone


AT+AVD0005C9000000    AVRCPremote control


AT+AVC44    play


AT+AVC45    stop


AT+AVC46    pause


AT+AVC4B    last song


AT+AVC4C    next song


 


Audio in(J4) -> module #2 ----- A2DP -> module #1 -> Speaker(J7)


Flow:


Source, audio in:


AT


AT&F*


ATZ


ATS300=2     source


ATS102=$0180


ATS301=2   as AVRCP target


ATS512=4


AT&W


ATZ


ATI4


0016A4000151


Sink speaker:


AT+APD0016A4000151


AT+AVD0016A4000151  there is one bug on the firmware, so ACRVP might not work


Another example:


Flow:


Source, audio in:


ATI3


AT&F*


ATZ


ATS300=2


ATS301=2


AT+BTK=”8888”


ATS512=4


AT&W


ATZ


AT+BTP


ATI4


0016A4000025


Sink speaker:


AT+APD0016A4000025


AT+AVD0016A4000025


AT+AVC44   play the song


 


 


路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)