LMP (Link Manager Protocol)

The LM (Link Manager) is the part of a Bluetooth device responsible for connecting to and disconnecting from other devices, and for the control of the connection. An LMP (Link Manager Protocol) message is a packet, or PDU (Packet Data Unit), sent between the LMs of a master and slave Bluetooth device; these messages are not propagated to the device's host, but they may trigger an HCI event to be sent to the device's host.

An LMP message is normally transmitted on the ACL link using a DM1 type packet, with the L_CH (Logical Channel) bits of the payload header set to 112. Alternatively, an LMP message may be sent on a SCO link using a DV type packet. The payload body (i.e. the packet data) contains:

Op-code and transaction ID (1 byte):
Transaction ID (least significant 1 bit):
0 for a transaction initiated by the master
1 for a transaction initiated by the slave
Op-code (most significant 7 bits): see below.
Message parameters: the number of parameters and their length is message specific.

LMP Op-codes

Op-code Bluetooth
version
Mandatory
or Optional
LMP PDU Length
(bytes)
Packet
type
Possible
direction
Parameters Position
in payload
1 V1.1 V1.2 EDR M LMP_name_req 2 DM1/DV m↔s name offset 2
2 V1.1 V1.2 EDR M LMP_name_res 17 DM1 m↔s name offset 2
  name length 3
  name fragment 4-17
3 V1.1 V1.2 EDR M LMP_accepted 2 DM1/DV m↔s op code 2
4 V1.1 V1.2 EDR M LMP_not_accepted 3 DM1/DV m↔s op code 2
  error code 3
5 V1.1 V1.2 EDR M LMP_clkoffset_req 1 DM1/DV m→s -  
6 V1.1 V1.2 EDR M LMP_clkoffset_res 3 DM1/DV m←s clock offset 2-3
7 V1.1 V1.2 EDR M LMP_detach 2 DM1/DV m↔s error code 2
8 V1.1 V1.2 EDR M LMP_in_rand 17 DM1 m↔s random number 2-17
9 V1.1 V1.2 EDR M LMP_comb_key 17 DM1 m↔s random number 2-17
10 V1.1 V1.2 EDR M LMP_unit_key 17 DM1 m↔s key 2-17
11 V1.1 V1.2 EDR M LMP_au_rand 17 DM1 m↔s random number 2-17
12 V1.1 V1.2 EDR M LMP_sres 5 DM1/DV m↔s authentication response 2-5
13 V1.1 V1.2 EDR O LMP_temp_rand 17 DM1 m→s random number 2-17
14 V1.1 V1.2 EDR O LMP_temp_key 17 DM1 m→s key 2-17
15 V1.1 V1.2 EDR O (M) LMP_encryption_mode_req 2 DM1/DV m↔s encryption mode 2
16 V1.1 V1.2 EDR O (M) LMP_encryption_key_size_req 2 DM1/DV m↔s key size 2
17 V1.1 V1.2 EDR O (M) LMP_start_encryption_req 17 DM1 m→s random number 2-17
18 V1.1 V1.2 EDR O (M) LMP_stop_encryption_req 1 DM1/DV m→s -  
19 V1.1 V1.2 EDR O (M) LMP_switch_req 5 DM1/DV m↔s switch instant 2-5
20 V1.1 V1.2 EDR O LMP_hold 7 DM1/DV m↔s hold time 2-3
  hold instant 4-7
21 V1.1 V1.2 EDR O LMP_hold_req 7 DM1/DV m↔s hold time 2-3
  hold instant 4-7
23 V1.1 V1.2 EDR O LMP_sniff_req 10 DM1 m↔s timing control flags 2
  Dsniff 3-4
  Tsniff 5-6
  sniff attempt 7-8
  sniff timeout 9-10
24 V1.1 V1.2 EDR O LMP_unsniff_req 1 DM1/DV m↔s -  
25 V1.1 V1.2 EDR O LMP_park_req 17 DM1 m↔s timing control flags 2
  DB 3-4
  TB 5-6
  NB 7
  ΔB 8
  PM_ADDR 9
  AR_ADDR 10
  NBsleep 11
  DBsleep 12
  Daccess 13
  Taccess 14
  Nacc-slots 15
  Npoll 16
  Maccess 17:0-3
  access scheme 17:4-7
27 V1.1 V1.2 EDR O LMP_set_broadcast_scan_window 4 or 6 DM1 m→s timing control flags 2
  DB 3-4
  broadcast scan window 5-6
28 V1.1 V1.2 EDR O LMP_modify_beacon 11 or 13 DM1 m→s timing control flags 2
  DB 3-4
  TB 5-6
  NB 7
  ΔB 8
  Daccess 9
  Taccess 10
  Nacc-slots 11
  Npoll 12
  Maccess 13:0-3
  access scheme 13:4-7
29 V1.1 V1.2 EDR O LMP_unpark_BD_ADDR_req variable DM1 m→s timing control flags 2
  DB 3-4
  LT_ADDR 1st unpark 5:0-2
  LT_ADDR 2nd unpark 5:4-6
  BD_ADDR 1st unpark 6-11
  BD_ADDR 2nd unpark 12-17
30 V1.1 V1.2 EDR O LMP_unpark_PM_ADDR_req variable DM1 m→s timing control flags 2
  DB 3-4
  LT_ADDR 1st unpark 5:0-3
  LT_ADDR 2nd unpark 5:4-7
  PM_ADDR 1st unpark 6
  PM_ADDR 2nd unpark 7
  LT_ADDR 3rd unpark 8:0-3
  LT_ADDR 4th unpark 8:4-7
  PM_ADDR 3rd unpark 9
  PM_ADDR 4th unpark 10
  LT_ADDR 5th unpark 11:0-3
  LT_ADDR 6th unpark 11:4-7
  PM_ADDR 6th unpark 12
  PM_ADDR 6th unpark 13
  LT_ADDR 7th unpark 14:0-3
  PM_ADDR 7th unpark 15
31 V1.1 V1.2 EDR O LMP_incr_power_req 2 DM1/DV m↔s for future use 2
32 V1.1 V1.2 EDR O LMP_decr_power_req 2 DM1/DV m↔s for future use 2
33 V1.1 V1.2 EDR O LMP_max_power 1 DM1/DV m↔s -  
34 V1.1 V1.2 EDR O LMP_min_power 1 DM1/DV m↔s -  
35 V1.1 V1.2 EDR O LMP_auto_rate 1 DM1/DV m↔s -  
36 V1.1 V1.2 EDR O LMP_preferred_rate 2 DM1/DV m↔s data rate 2
37 V1.1 V1.2 EDR M LMP_version_req 6 DM1/DV m↔s VersNr 2
  CompId 3-4
  SubVersNr 5-6
38 V1.1 V1.2 EDR M LMP_version_res 6 DM1/DV m↔s VersNr 2
  CompId 3-4
  SubVersNr 5-6
39 V1.1 V1.2 EDR M LMP_features_req 9 DM1/DV m↔s features 2-9
40 V1.1 V1.2 EDR M LMP_features_res 9 DM1/DV m↔s features 2-9
41 V1.1 V1.2 EDR M LMP_quality_of_service 4 DM1/DV m→s poll interval 2-3
  NBC 4
42 V1.1 V1.2 EDR M LMP_quality_of_service_req 4 DM1/DV m↔s poll interval 2-3
  NBC 4
43 V1.1 V1.2 EDR O LMP_SCO_link_req 7 DM1/DV m↔s SCO handle 2
  timing control flags 3
  DSCO 4
  TSCO 5
  SCO packet 6
  air mode 7
44 V1.1 V1.2 EDR O LMP_remove_SCO_link_req 3 DM1/DV m↔s SCO handle 2
  error code 3
45 V1.1 V1.2 EDR M LMP_max_slot 2 DM1/DV m↔s max slots 2
46 V1.1 V1.2 EDR M LMP_max_slot_req 2 DM1/DV m↔s max slots 2
47 V1.1 V1.2 EDR O LMP_timing_accuracy_req 1 DM1/DV m↔s -  
48 V1.1 V1.2 EDR O (M) LMP_timing_accuracy_res 3 DM1/DV m↔s drift 2
  jitter 3
49 V1.1 V1.2 EDR M LMP_setup_complete 1 DM1 m↔s -  
50 V1.1 V1.2 EDR O LMP_use_semi_permanent_key 1 DM1/DV m→s -  
51 V1.1 V1.2 EDR M LMP_host_connection_req 1 DM1/DV m↔s -  
52 V1.1 V1.2 EDR O (M) LMP_slot_offset 9 DM1/DV m↔s slot offset 2-3
  BD_ADDR 4-9
53 V1.1 V1.2 EDR O LMP_page_mode_req 3 DM1/DV m↔s paging scheme 2
  paging scheme settings 3
54 V1.1 V1.2 EDR O LMP_page_scan_mode_req 3 DM1/DV m↔s paging scheme 2
  paging scheme settings 3
55 V1.1 V1.2 EDR M LMP_supervision_timeout 3 DM1/DV m→s supervision timeout 2-3
56 V1.1 V1.2 EDR O LMP_test_activate 1 DM1/DV m→s -  
57 V1.1 V1.2 EDR O LMP_test_control 10 DM1 m→s test scenario 2
  hopping mode 3
  TX frequency 4
  RX frequency 5
  power control mode 6
  poll period 7
  packet type 8
  length of test data 9-10
58 V1.2 EDR O LMP_encryption_key_size_mask_req 1 DM1 m→s -  
59 V1.2 EDR O LMP_encryption_key_size_mask_res 3 DM1 m←s key size mask 2-3
60 V1.2 EDR O (M) LMP_set_AFH 16 DM1 m→s AFH_instant 2-5
  AFH_mode 6
  AFH_channel_map 7-16
127,1 V1.2 EDR O LMP_accepted_ext 4 DM1 m↔s escape op code 3
  extended op code 4
127,2 V1.2 EDR O LMP_not_accepted_ext 5 DM1 m↔s escape op code 3
  extended op code 4
  error code 5
127,3 V1.2 EDR O LMP_features_req_ext 12 DM1 m↔s features page 3
  max supported page 4
  extended features 5-12
127,4 V1.2 EDR O LMP_features_res_ext 12 DM1 m↔s features page 3
  max supported page 4
  extended features 5-12
127,11 EDR O LMP_packet_type_table_req 3 DM1 m↔s packet type table 3
127,12 V1.2 EDR O LMP_eSCO_link_req 16 DM1 m↔s eSCO handle 3
  eSCO LT_ADDR 4
  timing control flags 5
  DeSCO 6
  TeSCO 7
  WeSCO 8
  SCO packet type M→S 9
  SCO packet type S→M 10
  packet length M→S 11-12
  packet length S→M 13-14
  air mode 15
  negotiation state 16
127,13 V1.2 EDR O LMP_remove_eSCO_link_req 4 DM1 m↔s eSCO handle 3
  error code 4
127,16 V1.2 EDR O LMP_channel_classification_req 7 DM1 m→s AFH_reporting_mode 3
  AFH_min_interval 4-5
  AFH_max_interval 6-7
127,17 V1.2 EDR O LMP_channel_classification 12 DM1 m←s AFH_channel_classification 3-12