logo资料库

SIM800 Series_Bluetooth_Application Note_V1.09.pdf

第1页 / 共101页
第2页 / 共101页
第3页 / 共101页
第4页 / 共101页
第5页 / 共101页
第6页 / 共101页
第7页 / 共101页
第8页 / 共101页
资料共101页,剩余部分请下载后查看
About Document
Version History
Scope
Contents
1 Introduction
1.1 Purpose of the document
1.2 Related documents
1.3 Conventions and abbreviations
2 Bluetooth Function
2.1 Bluetooth Introduction
2.2 Bluetooth Profile
2.3 Bluetooth Device Address
2.4 AT Interface for Bluetooth Function
2.5 Multi Device Connection
2.6 Function Differences
3 AT Command
3.1 AT+BTHOST Inquiry and Set Host Device Name
3.2 AT+BTSTATUS Inquiry Current BT Device Status
3.3 AT+BTPOWER Power on/off BT Radio
3.4 AT+BTLPWR Modify the Bluetooth Transmit Power
3.5 AT+BTPAIR Pair BT Device
3.6 AT+BTUNPAIR Un-pair BT Device
3.7 AT+BTSCAN Scan Surrounding BT Device
3.8 AT+BTCONNECT Connect Paired BT Device
3.9 AT+BTDISCONN Disconnect BT Connection
3.10 AT+BTGETPROF Get Profile Provided by Paired Device
3.11 AT+BTACPT Accept Connecting Request
3.12 AT+BTOPPACPT Accept OPP Service
3.13 AT+BTOPPPUSH Push OPP Object to Paired Device
3.14 AT+BTSPPGET Get Data Based on SPP Service
3.15 AT+BTSPPSEND Send Data Based on SPP Service
3.16 AT+BTATA Answer Incoming Call
3.17 AT+BTATDL Redial Last Number
3.18 AT+BTATH Hung up Voice Call
3.19 AT+BTVGS Configure Voice Volume
3.20 AT+BTVGM Configure MIC Gain Level
3.21 AT+BTATD Dial Voice Call
3.22 AT+BTRSSI Get RSSI of Connected BT Device
3.23 AT+BTVTS Send DTMF Tone
3.24 AT+BTCIND Get Status of Smart Phone
3.25 AT+BTCLCC Get Call Status of Smart Phone
3.26 AT+BTPBSYNC Sync Phonebook from Remote by BT
3.27 AT+BTPBF Find Name or Number from Remote by BT
3.28 AT+BTAVRCOP AVRCP Operation
3.29 AT+BTVIS Set Visibility of BT
3.30 AT+BTSPPCFG SPP Configuration
3.31 AT+BTPAIRCFG Set BT Pairing Mode
3.32 AT+CPBFEX Find Name or Number in Module Phonebook
3.33 AT+BTRING Control Ring Playing Transferred from Phone
3.34 AT+BTACI Set Report Mode of BT Audio Service State Change
3.35 AT+BTHFGOP Set Action Mode of MS When Earphone Button is Pressed During BT Link
3.36 AT+BTSPPURC Set the Report Format of Command +BTSPPSEND
3.37 AT+BTCLCCS Get Call Status of Smart Phone
3.38 AT+BTSPPCFD Set String of SPP Switching Work Mode
3.39 AT+BTCOD Set the Bluetooth Class of Device
3.40 AT+BLESREG Register GATT Server
3.41 AT+BLESDREG Deregister GATT Server
3.42 AT+BLESSAD Add a Service
3.43 AT+BLESSRM Remove a Service
3.44 AT+BLESSC Add a Characteristic to an Existed Service
3.45 AT+BLESSD Add a Descriptor to an Existed Service
3.46 AT+BLESSSTART Start a Service
3.47 AT+BLESSSTOP Stop a Service
3.48 AT+BLESLSTART Start Advertising
3.49 AT+BLESLSTOP Stop Advertising
3.50 AT+BLEADV Set Adverting Parameters
3.51 AT+BLESTATUS Inquiry Current BLE Connect Status
3.52 AT+BLEADDR Inquiry Current Ble Address
3.53 AT+BLEDISCONN Disconnect BLE Connection
3.54 AT+BLESIND Send an Indication to a Client
3.55 AT+BLESRSP Send a Response to a Client’S Read or Write Operation
3.56 +BLESCON Notify When a Connection’s Status Change
3.57 AT+BLECREG Register GATT Client
3.58 AT+BLECDREG Deregister GATT Client
3.59 AT+BLESCAN Scan Surrounding BLE Device
3.60 +BLESCANRST Notify When Find a BLE Device Comes
3.61 AT+BLECGDT Get Device Type Request
3.62 AT+BLECCON Connect GATT Client to Remote LE/Dual-mode Device
3.63 AT+BLECDISC Disconnect GATT Client to Remote Device
3.64 AT+BLECSS Search Peer’s Service Description
3.65 AT+BLECGC Search Peer’s Characteristic
3.66 AT+BLECGD Search Peer’s Descriptor
3.67 AT+BLECRC Read Peer’s Characteristic
3.68 +BLECRC Notify When Get a Value from Peer’s Device Comes
3.69 AT+BLECWC Write Peer’s Characteristic
3.70 AT+BLECRD Read Peer’s Descriptor
3.71 +BLECRD Notify When Get a Value From Peer’s Device Comes
3.72 AT+BLECWD Write Peer’s Descriptor
3.73 AT+BLECRN Register Notification Request
3.74 +BLECN Notify When Get a Value from Peer’s Device Comes
3.75 AT+BLEFMP Deregister a FMP Service
3.76 +BLEFMPCON Notify when a connection’s status change comes
3.77 +BLEFMPWREQ Notify When a Client’s Write Request Comes
3.78 AT+BLEPXP Deregister PXP Service
3.79 +BLEPXPCON Notify When a Connection Comes
3.80 +BLEPXPWREQ Notify When a Write Request Comes
3.81 +BLEPXPCON Notify When a Disconnection Alert Comes
3.82 AT+BLESPP Deregister a SPP Service
3.83 +BLESPPCON Notify When a Connection’s Status Change Comes
3.84 +BLESPPWREQ Notify When a Client’s Write Request Comes
3.85 AT+BLESPPSIND Send an Indication to SPP Server
4 CME Error Code
5 Bluetooth Examples
5.1 Accept request from other BT device
5.2 Send pairing request to other BT device
5.3 Get the profile provided by paired device
5.4 Connect service
5.5 Accept file from paired device
5.6 Send file to other paired BT device
5.7 Create SPP’s link as a client
5.8 SPP’s link be create as a server
5.9 Configure SPP
5.10 Send data as a SPP’s client
5.11 As a SPP’s server worked in AT mode
5.12 As a SPP’s server worked in APP mode and multi-connection
5.13 Sync phonebook from remote by BT
5.14 Find name or number from remote by BT
5.15 Play music and so on by AVRCP
5.16 Add phonebook records to ME or SM phonebook from VCARD file
5.17 Set BT pairing mode
5.18 Inquiry current ble address
5.19 Set Adverting Parameters
5.20 Setup GATT server
5.21 Data transmission between module and client
5.22 Setup FMP server
5.23 Setup PXP server
5.24 Setup SPP server
5.25 Inquiry current ble status
5.26 Module disconnect with APP
5.27 Module disconnect Start or stop advertising
5.28 BLE client
6 Differences between bluetooth version and standard Version
6.1 ATD
6.2 AT+CPBF
6.3 AT+CPBFEX
6.4 AT+CMUX
6.5 AT+CNUM
6.6 AT+CMGS
6.7 AT+CMSS
6.8 AT+CPMS
6.9 AT+CHFA
6.10 TTS function
SIM800 Series_Bluetooth _Application Note GPRS Module SIMCom Wireless Solutions Limited Building B, SIM Technology Building, No.633, Jinzhong Road Changning District, Shanghai P.R. China Tel: 86-21-31575100 support@simcom.com www.simcom.com
SIM800 Series_Bluetooth_Application Note_V1.09 SIM800 Series_Bluetooth_Application Note 1.09 2020.6.15 Release Document Title: Version: Date: Status: GENERAL NOTES SIMCOM OFFERS THIS INFORMATION AS A SERVICE TO ITS CUSTOMERS, TO SUPPORT APPLICATION AND ENGINEERING EFFORTS THAT USE THE PRODUCTS DESIGNED BY SIMCOM. THE INFORMATION PROVIDED IS BASED UPON REQUIREMENTS SPECIFICALLY PROVIDED TO SIMCOM BY THE CUSTOMERS. SIMCOM HAS NOT UNDERTAKEN ANY INDEPENDENT SEARCH FOR ADDITIONAL RELEVANT INFORMATION, INCLUDING ANY INFORMATION THAT MAY BE IN THE CUSTOMER’S POSSESSION. FURTHERMORE, SYSTEM VALIDATION OF THIS PRODUCT DESIGNED BY SIMCOM WITHIN A LARGER ELECTRONIC SYSTEM REMAINS THE RESPONSIBILITY OF THE CUSTOMER OR THE CUSTOMER’S SYSTEM INTEGRATOR. ALL SPECIFICATIONS SUPPLIED HEREIN ARE SUBJECT TO CHANGE. COPYRIGHT THIS DOCUMENT CONTAINS PROPRIETARY TECHNICAL INFORMATION WHICH IS THE PROPERTY OF SIMCOM WIRELESS SOLUTIONS LIMITED COPYING, TO OTHERS AND USING THIS DOCUMENT, ARE FORBIDDEN WITHOUT EXPRESS AUTHORITY BY SIMCOM. OFFENDERS ARE LIABLE TO THE PAYMENT OF INDEMNIFICATIONS. ALL RIGHTS RESERVED BY SIMCOM IN THE PROPRIETARY TECHNICAL INFORMATION ,INCLUDING BUT NOT LIMITED TO REGISTRATION GRANTING OF A PATENT , A UTILITY MODEL OR DESIGN. ALL SPECIFICATION SUPPLIED HEREIN ARE SUBJECT TO CHANGE WITHOUT NOTICE AT ANY TIME. SIMCom Wireless Solutions Limited Building B, SIM Technology Building, No.633 Jinzhong Road, Changning District, Shanghai P.R. China Tel: +86 21 31575100 Email: simcom@simcom.com For more information, please visit: https://www.simcom.com/download/list-863-en.html For technical support, or to report documentation errors, please visit: https://www.simcom.com/ask/ or email to: support@simcom.com Copyright © 2020 SIMCom Wireless Solutions Limited All Rights Reserved. www.simcom.com 2 / 101
SIM800 Series_Bluetooth_Application Note_V1.09 About Document Version History Version Date V1.00 Chapter 2013.11.07 Original 1.4 2.6 AT+BTSCAN 2.13 AT+BTSPPGET 2.14 AT+BTSPPSEND 2.22 AT+BTVTS 2.23 AT+BTCIND 2.24 AT+BTCLCC 2.25 AT+BTPBSYNC 2.26 AT+BTPBF 2.27 AT+BTAVRCOP 2.28 AT+BTVIS 2.29 AT+BTSPPCFG 2.30 AT+BTPAIRCFG 3 4 2.13 AT+BTSPPGET 2.31 AT+CPBFEX 2.32 AT+BTRING 4.12 5 2.14 AT+BTSPPSEND 2.25 2.29 AT+BTSPPCFG 2.3 AT+BTPOWER 2.31 AT+CPBFEX 2.32 AT+BTRING 2.33 AT+BTACI 2.34 AT+BTHFGOP 2.35 AT+BTSPPURC V1.01. 2014.03.26 V1.02 2014.06.30 V1.03 2015.01.12 What is new New version Add "power-saving mode" description add parameter Modify parameter Modify parameter Add command Add command Add command Add command Add command Add command Add command Add command Add command Add Error Code 1051,1056--1058,1060 Add 4.7--4.17 Modify description Add command Add command Modify demo Add Modify usage Modify description of Modify command Modify command note Modify command Modify command Add command Add command Add command command and www.simcom.com 3 / 101
SIM800 Series_Bluetooth_Application Note_V1.09 V1.04 2015.02.09 V1.05 2015.08.06 V1.06 2017.09.28 V1.07 2017.10.31 V1.08 2018.10.31 5.2 AT+CPBF 2.36 AT+BTCLCCS 1.5 1.6 2.37 AT+BTSPPCFD 2.38 AT+BTCOD 2.40 AT+BLESREG 2.41 AT+BLESDREG 2.42 AT+BLESSAD 2.43 AT+BLESSRM 2.44 AT+BLESSC 2.45 AT+BLESSD 2.46 AT+BLESSSTART 2.47 AT+BLESSSTOP 2.48 AT+BLESLSTART 2.49 AT+BLESLSTOP 2.50 AT+BLEADV 2.51 AT+BLECPU 2.52 AT+BLESIND 2.53 AT+BLESRSP 2.54 2.55 AT+BLEFMP 2.56 2.57 2.58 AT+BLEPXP 2.59 2.60 2.61 1.6 Appendix 2.59--2.85 4.28 2020.06.15 All V1.09 Modify command difference Add SIM800C Add command Add SIM800A,SIM800F Add Add Add command Add command Add command Add command Add command Add command Add command Add command Add command Add command Add command Add command Add command Add command Add command Add command Notify when connection’s status change Add command Notify when connection’s status change comes +BLEFMPCON Notify when a client’s write request comes +BLEFMPWREQ Add command Notify when connection’s status change comes +BLEPXPCON Notify when a Link loss alert comes +BLEPXPLLAT Notify when a disconnection alert comes +BLEPXPDISAT Add SIM868E Add BLE profiles Add BLE Client scan\connect\read\write remote devices BLE client example feature, module can www.simcom.com 4 / 101
SIM800 Series_Bluetooth_Application Note_V1.09 Scope The document can apply to all SIM800 series modules with Bluetooth function. www.simcom.com 5 / 101
SIM800 Series_Bluetooth_Application Note_V1.09 Contents About Document .................................................................................................................... 3 Version History ...................................................................................................................................... 3 Scope .................................................................................................................................................... 5 Contents ................................................................................................................................. 6 Introduction .................................................................................................................... 10 1 1.1 Purpose of the document .......................................................................................................... 10 1.2 Related documents ................................................................................................................... 10 1.3 Conventions and abbreviations ................................................................................................. 10 2 Bluetooth Function ........................................................................................................ 13 2.1 Bluetooth Introduction ............................................................................................................... 13 2.2 Bluetooth Profile ........................................................................................................................ 13 2.3 Bluetooth Device Address ......................................................................................................... 13 2.4 AT Interface for Bluetooth Function ........................................................................................... 14 2.5 Multi Device Connection ........................................................................................................... 14 Function Differences ................................................................................................................. 14 2.6 3 AT Command .................................................................................................................. 16 3.1 AT+BTHOST Inquiry and Set Host Device Name ................................................................... 18 3.2 AT+BTSTATUS Inquiry Current BT Device Status .................................................................. 18 3.3 AT+BTPOWER Power on/off BT Radio .................................................................................. 20 3.4 AT+BTLPWR Modify the Bluetooth Transmit Power ............................................................... 20 3.5 AT+BTPAIR Pair BT Device ................................................................................................... 21 3.6 AT+BTUNPAIR Un-pair BT Device ......................................................................................... 22 3.7 AT+BTSCAN Scan Surrounding BT Device .............................................................................. 22 3.8 AT+BTCONNECT Connect Paired BT Device ........................................................................ 23 3.9 AT+BTDISCONN Disconnect BT Connection ......................................................................... 24 3.10 AT+BTGETPROF Get Profile Provided by Paired Device ...................................................... 24 3.11 AT+BTACPT Accept Connecting Request .............................................................................. 25 3.12 AT+BTOPPACPT Accept OPP Service .................................................................................. 26 3.13 AT+BTOPPPUSH Push OPP Object to Paired Device ........................................................... 26 3.14 AT+BTSPPGET Get Data Based on SPP Service ................................................................. 27 3.15 AT+BTSPPSEND Send Data Based on SPP Service ............................................................ 28 3.16 AT+BTATA Answer Incoming Call ......................................................................................... 29 3.17 AT+BTATDL Redial Last Number ........................................................................................... 29 3.18 AT+BTATH Hung up Voice Call .............................................................................................. 30 3.19 AT+BTVGS Configure Voice Volume ...................................................................................... 30 3.20 AT+BTVGM Configure MIC Gain Level .................................................................................. 31 3.21 AT+BTATD Dial Voice Call ...................................................................................................... 31 www.simcom.com 6 / 101
SIM800 Series_Bluetooth_Application Note_V1.09 3.22 AT+BTRSSI Get RSSI of Connected BT Device .................................................................... 32 3.23 AT+BTVTS Send DTMF Tone ................................................................................................ 32 3.24 AT+BTCIND Get Status of Smart Phone ................................................................................ 33 3.25 AT+BTCLCC Get Call Status of Smart Phone ........................................................................ 34 3.26 AT+BTPBSYNC Sync Phonebook from Remote by BT .......................................................... 35 3.27 AT+BTPBF Find Name or Number from Remote by BT ......................................................... 37 3.28 AT+BTAVRCOP AVRCP Operation ........................................................................................ 38 3.29 AT+BTVIS Set Visibility of BT ................................................................................................. 39 3.30 AT+BTSPPCFG SPP Configuration ....................................................................................... 39 3.31 AT+BTPAIRCFG Set BT Pairing Mode ................................................................................... 40 3.32 AT+CPBFEX Find Name or Number in Module Phonebook ................................................... 41 3.33 AT+BTRING Control Ring Playing Transferred from Phone ................................................... 42 3.34 AT+BTACI Set Report Mode of BT Audio Service State Change ........................................... 42 3.35 AT+BTHFGOP Set Action Mode of MS When Earphone Button is Pressed During BT Link .. 43 3.36 AT+BTSPPURC Set the Report Format of Command +BTSPPSEND ................................... 44 3.37 AT+BTCLCCS Get Call Status of Smart Phone ..................................................................... 45 3.38 AT+BTSPPCFD Set String of SPP Switching Work Mode ...................................................... 46 3.39 AT+BTCOD Set the Bluetooth Class of Device ...................................................................... 47 3.40 AT+BLESREG Register GATT Server .................................................................................... 48 3.41 AT+BLESDREG Deregister GATT Server .............................................................................. 48 3.42 AT+BLESSAD Add a Service ................................................................................................. 49 3.43 AT+BLESSRM Remove a Service .......................................................................................... 50 3.44 AT+BLESSC Add a Characteristic to an Existed Service ....................................................... 50 3.45 AT+BLESSD Add a Descriptor to an Existed Service ............................................................. 52 3.46 AT+BLESSSTART Start a Service .......................................................................................... 53 3.47 AT+BLESSSTOP Stop a Service ........................................................................................... 53 3.48 AT+BLESLSTART Start Advertising ....................................................................................... 54 3.49 AT+BLESLSTOP Stop Advertising ......................................................................................... 55 3.50 AT+BLEADV Set Adverting Parameters ................................................................................. 55 3.51 AT+BLESTATUS Inquiry Current BLE Connect Status ........................................................... 56 3.52 AT+BLEADDR Inquiry Current Ble Address ........................................................................... 57 3.53 AT+BLEDISCONN Disconnect BLE Connection .................................................................... 58 3.54 AT+BLESIND Send an Indication to a Client .......................................................................... 58 3.55 AT+BLESRSP Send a Response to a Client’S Read or Write Operation ............................... 59 3.56 +BLESCON Notify When a Connection’s Status Change ...................................................... 60 3.57 AT+BLECREG Register GATT Client ..................................................................................... 61 3.58 AT+BLECDREG Deregister GATT Client ............................................................................... 61 3.59 AT+BLESCAN Scan Surrounding BLE Device ....................................................................... 62 3.60 +BLESCANRST Notify When Find a BLE Device Comes ...................................................... 63 3.61 AT+BLECGDT Get Device Type Request .............................................................................. 63 3.62 AT+BLECCON Connect GATT Client to Remote LE/Dual-mode Device ................................ 64 3.63 AT+BLECDISC Disconnect GATT Client to Remote Device ................................................... 65 3.64 AT+BLECSS Search Peer’s Service Description ................................................................... 65 3.65 AT+BLECGC Search Peer’s Characteristic ............................................................................ 66 3.66 AT+BLECGD Search Peer’s Descriptor ................................................................................. 67 3.67 AT+BLECRC Read Peer’s Characteristic ............................................................................... 68 www.simcom.com 7 / 101
SIM800 Series_Bluetooth_Application Note_V1.09 3.68 +BLECRC Notify When Get a Value from Peer’s Device Comes ........................................... 69 3.69 AT+BLECWC Write Peer’s Characteristic .............................................................................. 69 3.70 AT+BLECRD Read Peer’s Descriptor .................................................................................... 70 3.71 +BLECRD Notify When Get a Value From Peer’s Device Comes .......................................... 71 3.72 AT+BLECWD Write Peer’s Descriptor .................................................................................... 71 3.73 AT+BLECRN Register Notification Request ........................................................................... 72 3.74 +BLECN Notify When Get a Value from Peer’s Device Comes .............................................. 73 3.75 AT+BLEFMP Deregister a FMP Service ................................................................................. 74 3.76 +BLEFMPCON Notify when a connection’s status change comes ......................................... 74 3.77 +BLEFMPWREQ Notify When a Client’s Write Request Comes ............................................ 75 3.78 AT+BLEPXP Deregister PXP Service ..................................................................................... 75 3.79 +BLEPXPCON Notify When a Connection Comes................................................................. 76 3.80 +BLEPXPWREQ Notify When a Write Request Comes ......................................................... 76 3.81 +BLEPXPCON Notify When a Disconnection Alert Comes .................................................... 76 3.82 AT+BLESPP Deregister a SPP Service .................................................................................. 77 3.83 +BLESPPCON Notify When a Connection’s Status Change Comes ..................................... 77 3.84 +BLESPPWREQ Notify When a Client’s Write Request Comes ............................................ 77 3.85 AT+BLESPPSIND Send an Indication to SPP Server ............................................................ 78 4 CME Error Code ............................................................................................................. 79 5 Bluetooth Examples ...................................................................................................... 81 5.1 Accept request from other BT device ........................................................................................ 81 5.2 Send pairing request to other BT device ................................................................................... 81 5.3 Get the profile provided by paired device .................................................................................. 82 5.4 Connect service ........................................................................................................................ 83 5.5 Accept file from paired device ................................................................................................... 83 5.6 Send file to other paired BT device ........................................................................................... 83 5.7 Create SPP’s link as a client ..................................................................................................... 84 5.8 SPP’s link be create as a server ............................................................................................... 84 5.9 Configure SPP .......................................................................................................................... 84 5.10 Send data as a SPP’s client ...................................................................................................... 85 5.11 As a SPP’s server worked in AT mode ...................................................................................... 86 5.12 As a SPP’s server worked in APP mode and multi-connection ................................................. 86 5.13 Sync phonebook from remote by BT ......................................................................................... 88 5.14 Find name or number from remote by BT ................................................................................. 88 5.15 Play music and so on by AVRCP .............................................................................................. 89 5.16 Add phonebook records to ME or SM phonebook from VCARD file ......................................... 90 5.17 Set BT pairing mode ................................................................................................................. 91 5.18 Inquiry current ble address ....................................................................................................... 92 5.19 Set Adverting Parameters ......................................................................................................... 92 5.20 Setup GATT server ................................................................................................................... 92 5.21 Data transmission between module and client .......................................................................... 93 5.22 Setup FMP server ..................................................................................................................... 94 5.23 Setup PXP server ..................................................................................................................... 94 5.24 Setup SPP server ..................................................................................................................... 95 Inquiry current ble status ........................................................................................................... 95 5.25 www.simcom.com 8 / 101
分享到:
收藏