advertisement
Melody 6.0.39
Melody 6.0.39
4. Connection parameters
The BLE connections parameters can be modified by changing the values in the parameter
BLE_CONN_PARAM. Theses parameters are used by Melody to set the following:
- Advertising parameters. This will control how Melody advertises (fast advertisements or slow advertisements). While fast advertisements allow remote devices to see and connect to melody faster (melody will be consuming more power), slow advertisements will reduce the power consumption and make the scanning and connection slower.
- Scanning parameters. This will control melody scanning intervals. As in advertising, fast scanning will find more devices with higher power consumption, and slow scanning will require more time to find the required device, but with lower power consumption.
- Connection parameters. Once a BLE link is established, the connection parameters control how often and quick the data transfer is. For example to achieve a higher data rate or lower the power consumption.
The parameters are the following:
scan_interval: The time interval from when BC-127 started its last LE scan until it begins the subsequent LE scan.
scan_window: Amount of time for the duration of the LE scan. LE Scan Window shall be less than or equal to LE Scan Interval.
conn_interval_min: Minimum value for the connection event interval. This shall be less than or equal to Connection Interval Max.
conn_interval_max: Maximum value for the connection event interval. This shall be greater than or equal to Connection Interval Min.
conn_latency: Slave latency for the connection in number of connection events.
supervision_timeout: The timeout before disconnecting when no communication is present on the lower layers.
conn_attempt_timeout: Time to wait for connection to be fully established. Changing this value can reduce the number of successful connection.
adv_interval_min: Minimum advertising interval for non-directed advertising. (Melody does not support directed advertisements)
adv_interval_max: Maximum advertising interval for non-directed advertising.
conn_latency_max: Maximum allowed slave latency
supervision_timeout_min: Minimum allowed supervision timeout. The minimum allowed supervision timeout that is accepted if slave requests connection parameter update once connected.
supervision_timeout_max: Maximum allowed supervision timeout. The maximum allowed supervision timeout that is accepted if slave requests connection parameter update once connected.
5. BC Smart service
The BC Smart service can be used to send easily data and commands over BLE. See BC Smart example .
The UUIDs of the BC Smart service and its Data characteristic are store in the parameter
BC_SMART_CONFIG.
Blue Creation
.
St John’s Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t .
+44 (0)1223 420 252 e .
[email protected] www.bluecreation.com
Page 42 of 83
Melody 6.0.39
Melody 6.0.39
4. HID
The HID profile is a generic implementation of HID, this gives better control of the HID capabilities and the supported hid descriptors.
HID host will connect to any HID device, and to identify the HID device, it is possible to use
HID_READ {BD ADDR} command to read the HID descriptor of the remote device.
In HID device mode, Melody starts with the default descriptor. The default descriptor is for a simple keyboard without any extra keys (e.g. media keys).
To modify the descriptor, the HID_DESC {size} command should be used.
>DESC {size}
> {binary data}
Size is the number of octets of binary data following. Make sure you set the descriptor before opening the HID connection.
The
When HID reports are received over hid, an event will be received:
> RECV HID {size} {data}
Size is the number of octets of binary data following. Melody simply outputs the received data without processing. It is the responsibility of the host to handle it.
To send data:
>SEND {link id} {size}
> {binary data}
"link id" is the id of the HID connection (can be retrieved by sending STATUS command). "size" is the length of binary data to send. Similarly to receive data, any data sent is not parsed or processed by Melody, only sent to the remote device.
Blue Creation
.
St John’s Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t .
+44 (0)1223 420 252 e .
[email protected] www.bluecreation.com
Page 43 of 83
Melody 6.0.39
Melody 6.0.39
5. iAP
This profile is only on MFI builds. iAP1 and iAP2 protocols are available to Apple MFI Licensees.
Contact BlueCreation for more information.
Please refer to the iAP Application Note to configure iAP.
Once configured it is possible to open the iAP profile and send data using the SEND command.
significantly faster with iAP2 when using the High Speed feature (IAP_HIGH_SPEED config).
The IAP_APP_REQ command can be used to send a request to open a application.
6. MAP
Melody 6 includes a generic access to receiving messages over MAP(v1.1) profile. When MAP is connected, a notification service is registered and the phone notifies Melody when a new message is arrived.
When notified, Melody notifies the host with the following event:
MAP_NEW_SMS [link id]
After receiving the notification the full message will be received and passed on to the host without any modification. The full message is surrounded with
MAP_MSG_BEGIN [link id]
And
MAP_MSG_ENG [link Id]
Note that in cases where a message is big, it can arrive inside multiple MAP_MSG_BEGIN and
MSP_MSG_END events, and in this case, different events might come between the different MAP messages.
When using MAP with an iOS device, iOS requires the user to enable notification for the paired device from the Bluetooth menu.
Blue Creation
.
St John’s Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t .
+44 (0)1223 420 252 e .
[email protected] www.bluecreation.com
Page 44 of 83
Melody 6.0.39
Melody 6.0.39
7. PBAP
Melody 6 includes a generic access to downloading the phonebook with PBAP(v1.1.1). To download the phonebook the following command can be used.
PB_PULL (link_id) [repository] [phonebook] [max_list] [start] [filter]
LINK ID
Melody PBAP link id, this will be 16, 26, 36, etc., and it be retrieved from the STATUS command.
REPOSITORY
Value Description
0 Not used, will default to 1
1
2
Local repository: the phonebook will be retrieved from the phones local memory
Sim repository: the phonebook will be retrieved from the SIM card
3 Any: the phone will select which repository to select.
PHONEBOOK
Value Description
0 Not used, will default to 1
1
2
3
Main Phonebook folder
Incoming calls history
Outgoing calls history
4
5
MAX LIST
Missed calls history
Combined call history:
The maximum number of entries to download from the remote device. If the remote device number of entries is lower than MAX LIST, then the download will finish.
START
The index of the entry to start download from. To download the whole phonebook, this should be set to 0.
Blue Creation
.
St John’s Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t .
+44 (0)1223 420 252 e .
[email protected] www.bluecreation.com
Page 45 of 83
Melody 6.0.39
Melody 6.0.39
FILTER
The filter defines what information to download. The filter is a 32 bit value where each bit represents a phonebook entry attribute (bits 29-31 are ignored).
TEL
MAILER
TZ
GEO
TITLE
ROLE
LOGO
Name
VERSION
FN
N
PHOTO
DAY
ADR
LABEL
AGENT
ORG
NOTE
REV
SOUND
URL
UID
KEY
11
12
13
14
7
8
9
10
5
6
3
4
1
2
Bit
0
19
20
21
22
15
16
17
18
Description
vCard Version
Formatted Name
Structured Presentation of Name
Associated Image or Photo
Birthday
Delivery Address
Delivery
Telephone Number
Electronic Mail Address
Electronic Mail
Time Zone
Geographic Position
Job
Role within the Organization
Organization Logo vCard of Person Representing
Name of Organization
Comments
Revision
Pronunciation of Name
Uniform Resource Locator
Unique ID
Public Encryption Key
Blue Creation
.
St John’s Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t .
+44 (0)1223 420 252 e .
[email protected] www.bluecreation.com
Page 46 of 83
Melody 6.0.39
23
Melody 6.0.39
NICKNAME
24
25
26
27
28
Nickname
Categories CATEGORIES
PROID Product ID
Class information CLASS
SORT-STRING String used for sorting operations
X-IRMC-CALL-DATETIME Time stamp
Mandatory attributes that should be enabled all the time are:
VERSION, N, and TEL.
Melody defaults are:
VERSION, N, FN, TEL which from the table are bits 0, 1, 2, and 7. This turns into 135 decimal, 0x87 hex or
10000111 binary.
Note that the phonebook download requires a baud rate of 115200 or above. Lower baud rates can cause the
UART to stall and lose phonebook data.
8. SPP
The SPP(v1.1) profile emulates a serial cable to provide a simple substitute for existing RS-232.
It is possible to open up to two SPP connections.
Once connected, you can send data using the SEND or SEND_RAW commands or you can enter in Data
It is also possible to send commands over SPP, you need to add a Carriage Return character add the end of
Data received over SPP are showed with the RECV notification.
Blue Creation
.
St John’s Innovation Centre, Cowley Road, Cambridge, CB4 0WS, United Kingdom t .
+44 (0)1223 420 252 e .
[email protected] www.bluecreation.com
Page 47 of 83
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement
Table of contents
- 1 Key Specifications
- 1 Description
- 1 Applications
- 5 Introduction
- 5 Getting started
- 5 Setting up - Equipment
- 6 Default behavior
- 7 Link ID management
- 8 Operating Modes
- 9 Melody Commands
- 21 Melody Configuration
- 29 Power management
- 29 Battery configuration
- 30 PIO functionalities
- 30 GPIO control enabled
- 31 GPIO control disabled
- 31 Audio Enable PIO
- 31 Restoring the default configuration
- 31 Capacitive touch sensors
- 31 Class 1 device
- 32 LED Indications
- 33 Pairing and connection
- 33 Secure Simple Pairing capabilities
- 33 Pairing commands
- 33 Connection
- 34 Link Loss
- 35 Audio configuration
- 35 Analog interface
- 35 Digital interface
- 39 Bluetooth profiles
- 39 A2DP / AVRCP
- 39 True Wireless Stereo
- 41 General BLE functionalities
- 42 Connection parameters
- 42 BC Smart service
- 48 Features
- 48 Speech Recognition
- 48 Device Firmware Upgrade
- 49 Appendix A: Event Notifications
- 52 Appendix B: Tone parameters and flags
- 55 Appendix C: Examples
- 56 Pairing and connection with Melody
- 61 Incoming call
- 61 Outgoing call
- 61 Call answer/reject
- 62 Call transfer
- 62 End call
- 62 Three way calling
- 66 Music source (A2DP & AVRCP)
- 70 Multi-connection and audio routing
- 71 True Wireless Stereo (TWS)
- 72 BLE (BC Smart Service)
- 73 BLE central (Generic commands)
- 74 Beacons
- 75 Tones
- 76 Link Policy
- 77 Appendix D: Error codes
- 78 Terms and definitions
- 79 General Notes
- 80 Change Log