AnsweredAssumed Answered

IDB05A1 - What commands are needed to make device discoverable by phone

Question asked by Paulstrom.Bjorn on Feb 11, 2017
Latest reply on Dec 2, 2017 by niemirowski.grzegorz

Hello, I am using a IDB05A1 woth a Nucleo64-F401RE, and writing commands to it via SPI.

 

I am wondering though, which commands do I need to send to make the device discoverable for other devices?

 

I tried issuing the Aci_Gap_Set_Discoverable command detailed here: link

 

This is what I send over SPI to the BT device:

 

0x01, //HCI Command

0xfc, 0x83, //Opcode

0x0f, //Parameter length = 15 

0x00, //Advertising_Event_Type, 0x00: Connectable undirected advertising (default)

0x08, 0x00, //Adv_Interval_Min    Default: N = 0x0800 (1.28 seconds)

0x08, 0x00, //Adv_Interval_Max   Default: N = 0x0800 (1.28 seconds)

0x00, //Address_Type   0x00: Public device address (default)

0x00, //Adv_Filter_Policy  0x00: Allow scan request from any, allow connect request from any (default).

0x02, //Local_Name_Length

0x42, //'B'

0x50, //'P'

0x00, //Service_UUID_Length    If there is no service to be advertised, set this field to 0x00.

0xff, 0xff, //Slave_Conn_Interval_Min   Value of 0xFFFF indicates no specific minimum.

0xff, 0xff //Slave_Conn_Interval_Max   Value of 0xFFFF indicates no specific maximum

 

And this is the response in hex and int form:

Data(hex):
   0x04    0x0e    0x04    0x01    0x83    0xfc    0x0c
Data(int):
   04    14    04    01    131    252    12

 

Which according to BT specification: link

 

Data(hex):
0x04            -   HCI event

0x0e            -   Command complete

0x04            -   Num_HCI_Command_Packets:

0x01            -   Not mentioned in the spec, what is this?

0x83 0xfc    -   Opcode

0x0c            -   Result, command disallowed

 

It says command is disallowed.

I send this as my first command, but I am guessing I need to do something else before

Any help is appreciated.

Outcomes