PebbleOS v4.47.0-505-g4bbc630fa
Loading...
Searching...
No Matches

The Apple Media Service: its values and formats. More...

Data Structures

struct  pbl_bt_ams_update
 The value of an attribute, as the Entity Update tells it. More...
 

Enumerations

enum  pbl_bt_ams_command {
  PBL_BT_AMS_COMMAND_PLAY = 0 , PBL_BT_AMS_COMMAND_PAUSE = 1 , PBL_BT_AMS_COMMAND_TOGGLE_PLAY_PAUSE = 2 , PBL_BT_AMS_COMMAND_NEXT_TRACK = 3 ,
  PBL_BT_AMS_COMMAND_PREVIOUS_TRACK = 4 , PBL_BT_AMS_COMMAND_VOLUME_UP = 5 , PBL_BT_AMS_COMMAND_VOLUME_DOWN = 6 , PBL_BT_AMS_COMMAND_ADVANCE_REPEAT_MODE = 7 ,
  PBL_BT_AMS_COMMAND_ADVANCE_SHUFFLE_MODE = 8 , PBL_BT_AMS_COMMAND_SKIP_FORWARD = 9 , PBL_BT_AMS_COMMAND_SKIP_BACKWARD = 10 , PBL_BT_AMS_COMMAND_LIKE_TRACK = 11 ,
  PBL_BT_AMS_COMMAND_DISLIKE_TRACK = 12 , PBL_BT_AMS_COMMAND_BOOKMARK_TRACK = 13
}
 Commands for the media player. More...
 
enum  pbl_bt_ams_entity { PBL_BT_AMS_ENTITY_PLAYER = 0 , PBL_BT_AMS_ENTITY_QUEUE = 1 , PBL_BT_AMS_ENTITY_TRACK = 2 }
 What the service tells about. More...
 
enum  pbl_bt_ams_player_attr { PBL_BT_AMS_PLAYER_ATTR_NAME = 0 , PBL_BT_AMS_PLAYER_ATTR_PLAYBACK_INFO = 1 , PBL_BT_AMS_PLAYER_ATTR_VOLUME = 2 , PBL_BT_AMS_PLAYER_ATTR_BUNDLE_IDENTIFIER = 3 }
 Attributes of the media player. More...
 
enum  pbl_bt_ams_playback_state { PBL_BT_AMS_PLAYBACK_STATE_PAUSED = 0 , PBL_BT_AMS_PLAYBACK_STATE_PLAYING = 1 , PBL_BT_AMS_PLAYBACK_STATE_REWINDING = 2 , PBL_BT_AMS_PLAYBACK_STATE_FAST_FORWARDING = 3 }
 Playback states, as the playback info gives them. More...
 
enum  pbl_bt_ams_queue_attr { PBL_BT_AMS_QUEUE_ATTR_INDEX = 0 , PBL_BT_AMS_QUEUE_ATTR_COUNT = 1 , PBL_BT_AMS_QUEUE_ATTR_SHUFFLE_MODE = 2 , PBL_BT_AMS_QUEUE_ATTR_REPEAT_MODE = 3 }
 Attributes of the playback queue: each an integer. More...
 
enum  pbl_bt_ams_shuffle_mode { PBL_BT_AMS_SHUFFLE_MODE_OFF = 0 , PBL_BT_AMS_SHUFFLE_MODE_ONE = 1 , PBL_BT_AMS_SHUFFLE_MODE_ALL = 2 }
 Shuffle modes of the queue. More...
 
enum  pbl_bt_ams_repeat_mode { PBL_BT_AMS_REPEAT_MODE_OFF = 0 , PBL_BT_AMS_REPEAT_MODE_ONE = 1 , PBL_BT_AMS_REPEAT_MODE_ALL = 2 }
 Repeat modes of the queue. More...
 
enum  pbl_bt_ams_track_attr { PBL_BT_AMS_TRACK_ATTR_ARTIST = 0 , PBL_BT_AMS_TRACK_ATTR_ALBUM = 1 , PBL_BT_AMS_TRACK_ATTR_TITLE = 2 , PBL_BT_AMS_TRACK_ATTR_DURATION = 3 }
 Attributes of the track. More...
 

UUIDs

As their bytes in the order they go over the air: for BLE_UUID128_INIT() or advertising data.

#define PBL_BT_AMS_UUID_SERVICE    0xdc, 0xf8, 0x55, 0xad, 0x02, 0xc5, 0xf4, 0x8e, 0x3a, 0x43, 0x36, 0x0f, 0x2b, 0x50, 0xd3, 0x89
 The service: 89D3502B-0F36-433A-8EF4-C502AD55F8DC.
 
#define PBL_BT_AMS_UUID_REMOTE_COMMAND    0xc2, 0x51, 0xca, 0xf7, 0x56, 0x0e, 0xdf, 0xb8, 0x8a, 0x4a, 0xb1, 0x57, 0xd8, 0x81, 0x3c, 0x9b
 Remote Command: 9B3C81D8-57B1-4A8A-B8DF-0E56F7CA51C2.
 
#define PBL_BT_AMS_UUID_ENTITY_UPDATE    0x02, 0xc1, 0x96, 0xba, 0x92, 0xbb, 0x0c, 0x9a, 0x1f, 0x41, 0x8d, 0x80, 0xce, 0xab, 0x7c, 0x2f
 Entity Update: 2F7CABCE-808D-411F-9A0C-BB92BA96C102.
 
#define PBL_BT_AMS_UUID_ENTITY_ATTRIBUTE    0xd7, 0xd5, 0xbb, 0x70, 0xa8, 0xa3, 0xab, 0xa6, 0xd8, 0x46, 0xab, 0x23, 0x8c, 0xf3, 0xb2, 0xc6
 Entity Attribute: C6B2F38C-23AB-46D8-A6AB-A3A870BBD5D7.
 

Flags of an update

#define PBL_BT_AMS_FLAG_TRUNCATED   PBL_BIT(0)
 The value did not fit and was cut: the Entity Attribute has all of it.
 

ATT error codes of the service

#define PBL_BT_AMS_ERR_INVALID_STATE   0xA0
 E.g.
 
#define PBL_BT_AMS_ERR_INVALID_COMMAND   0xA1
 
#define PBL_BT_AMS_ERR_ABSENT_ATTRIBUTE   0xA2
 The attribute is empty.
 

Detailed Description

The Apple Media Service: its values and formats.


Data Structure Documentation

◆ pbl_bt_ams_update

struct pbl_bt_ams_update

The value of an attribute, as the Entity Update tells it.

Data Fields
uint8_t attr The attribute of the entity.
uint8_t entity An enum pbl_bt_ams_entity.
uint8_t flags PBL_BT_AMS_FLAG_*, with the bits the specification reserves as they came.
uint16_t len Length of the value.
const uint8_t * value The value: UTF-8, not terminated.

Macro Definition Documentation

◆ PBL_BT_AMS_ERR_ABSENT_ATTRIBUTE

#define PBL_BT_AMS_ERR_ABSENT_ATTRIBUTE   0xA2

The attribute is empty.

◆ PBL_BT_AMS_ERR_INVALID_COMMAND

#define PBL_BT_AMS_ERR_INVALID_COMMAND   0xA1

◆ PBL_BT_AMS_ERR_INVALID_STATE

#define PBL_BT_AMS_ERR_INVALID_STATE   0xA0

E.g.

the Entity Update was written to before subscribing to it.

◆ PBL_BT_AMS_FLAG_TRUNCATED

#define PBL_BT_AMS_FLAG_TRUNCATED   PBL_BIT(0)

The value did not fit and was cut: the Entity Attribute has all of it.

◆ PBL_BT_AMS_UUID_ENTITY_ATTRIBUTE

#define PBL_BT_AMS_UUID_ENTITY_ATTRIBUTE    0xd7, 0xd5, 0xbb, 0x70, 0xa8, 0xa3, 0xab, 0xa6, 0xd8, 0x46, 0xab, 0x23, 0x8c, 0xf3, 0xb2, 0xc6

Entity Attribute: C6B2F38C-23AB-46D8-A6AB-A3A870BBD5D7.

◆ PBL_BT_AMS_UUID_ENTITY_UPDATE

#define PBL_BT_AMS_UUID_ENTITY_UPDATE    0x02, 0xc1, 0x96, 0xba, 0x92, 0xbb, 0x0c, 0x9a, 0x1f, 0x41, 0x8d, 0x80, 0xce, 0xab, 0x7c, 0x2f

Entity Update: 2F7CABCE-808D-411F-9A0C-BB92BA96C102.

◆ PBL_BT_AMS_UUID_REMOTE_COMMAND

#define PBL_BT_AMS_UUID_REMOTE_COMMAND    0xc2, 0x51, 0xca, 0xf7, 0x56, 0x0e, 0xdf, 0xb8, 0x8a, 0x4a, 0xb1, 0x57, 0xd8, 0x81, 0x3c, 0x9b

Remote Command: 9B3C81D8-57B1-4A8A-B8DF-0E56F7CA51C2.

◆ PBL_BT_AMS_UUID_SERVICE

#define PBL_BT_AMS_UUID_SERVICE    0xdc, 0xf8, 0x55, 0xad, 0x02, 0xc5, 0xf4, 0x8e, 0x3a, 0x43, 0x36, 0x0f, 0x2b, 0x50, 0xd3, 0x89

The service: 89D3502B-0F36-433A-8EF4-C502AD55F8DC.

Enumeration Type Documentation

◆ pbl_bt_ams_command

Commands for the media player.

Enumerator
PBL_BT_AMS_COMMAND_PLAY 
PBL_BT_AMS_COMMAND_PAUSE 
PBL_BT_AMS_COMMAND_TOGGLE_PLAY_PAUSE 
PBL_BT_AMS_COMMAND_NEXT_TRACK 
PBL_BT_AMS_COMMAND_PREVIOUS_TRACK 
PBL_BT_AMS_COMMAND_VOLUME_UP 
PBL_BT_AMS_COMMAND_VOLUME_DOWN 
PBL_BT_AMS_COMMAND_ADVANCE_REPEAT_MODE 
PBL_BT_AMS_COMMAND_ADVANCE_SHUFFLE_MODE 
PBL_BT_AMS_COMMAND_SKIP_FORWARD 
PBL_BT_AMS_COMMAND_SKIP_BACKWARD 
PBL_BT_AMS_COMMAND_LIKE_TRACK 
PBL_BT_AMS_COMMAND_DISLIKE_TRACK 
PBL_BT_AMS_COMMAND_BOOKMARK_TRACK 

◆ pbl_bt_ams_entity

What the service tells about.

Enumerator
PBL_BT_AMS_ENTITY_PLAYER 

The media player: its attributes are an enum pbl_bt_ams_player_attr.

PBL_BT_AMS_ENTITY_QUEUE 

The playback queue: its attributes are an enum pbl_bt_ams_queue_attr.

PBL_BT_AMS_ENTITY_TRACK 

The track: its attributes are an enum pbl_bt_ams_track_attr.

◆ pbl_bt_ams_playback_state

Playback states, as the playback info gives them.

Enumerator
PBL_BT_AMS_PLAYBACK_STATE_PAUSED 
PBL_BT_AMS_PLAYBACK_STATE_PLAYING 
PBL_BT_AMS_PLAYBACK_STATE_REWINDING 
PBL_BT_AMS_PLAYBACK_STATE_FAST_FORWARDING 

◆ pbl_bt_ams_player_attr

Attributes of the media player.

Enumerator
PBL_BT_AMS_PLAYER_ATTR_NAME 

The name of the app.

PBL_BT_AMS_PLAYER_ATTR_PLAYBACK_INFO 

Three values with commas in between: the playback state (an enum pbl_bt_ams_playback_state), the playback rate, and the elapsed time in seconds when the device sent it, the last two with decimals.

PBL_BT_AMS_PLAYER_ATTR_VOLUME 

From 0 (silent) to 1 (full volume), with decimals.

PBL_BT_AMS_PLAYER_ATTR_BUNDLE_IDENTIFIER 

Not in the specification: the bundle identifier of the app, which iOS has since 8.3.

◆ pbl_bt_ams_queue_attr

Attributes of the playback queue: each an integer.

Enumerator
PBL_BT_AMS_QUEUE_ATTR_INDEX 

Index of the track in the queue, from 0.

PBL_BT_AMS_QUEUE_ATTR_COUNT 

Number of tracks in the queue.

PBL_BT_AMS_QUEUE_ATTR_SHUFFLE_MODE 

An enum pbl_bt_ams_shuffle_mode.

PBL_BT_AMS_QUEUE_ATTR_REPEAT_MODE 

An enum pbl_bt_ams_repeat_mode.

◆ pbl_bt_ams_repeat_mode

Repeat modes of the queue.

Enumerator
PBL_BT_AMS_REPEAT_MODE_OFF 
PBL_BT_AMS_REPEAT_MODE_ONE 
PBL_BT_AMS_REPEAT_MODE_ALL 

◆ pbl_bt_ams_shuffle_mode

Shuffle modes of the queue.

Enumerator
PBL_BT_AMS_SHUFFLE_MODE_OFF 
PBL_BT_AMS_SHUFFLE_MODE_ONE 
PBL_BT_AMS_SHUFFLE_MODE_ALL 

◆ pbl_bt_ams_track_attr

Attributes of the track.

Enumerator
PBL_BT_AMS_TRACK_ATTR_ARTIST 
PBL_BT_AMS_TRACK_ATTR_ALBUM 
PBL_BT_AMS_TRACK_ATTR_TITLE 
PBL_BT_AMS_TRACK_ATTR_DURATION 

In seconds, with decimals.