cancel
Showing results for 
Search instead for 
Did you mean: 

Problem pairing a nRF52832 module with a SPBTLE_RF module

julius_21
Associate II

We are working with the SPBTLE_RF module with a custom board based on a STM32L082. We need to connect with a module which is based in the nRF52832 of Nordic, the module is the PTR5618.

We have done some tests with the STEVAL-IDB007V1M and the BlueNRG_GUI. This board has a SPBTLE_1 module which is quite like the SPBTLE_RF. The firmware of this module is the DTM_UART V3.1.

With the BlueNRG_GUI we can connect and pair the PTR5618 module but with the SPBTLE_RF we get some events after the aci_gap_create_connection. We get the event HCI_LE_META_EVENT and after 600 ms the HCI_DISCONNECTION_EVENT and we do not get the ACI_GAP_PAIRING_COMPLETE_EVENT and ACI_L2CAP_CONNECTION_UPDATE_REQ_EVENT events.

The event HCI_LE_META_EVENT that we get is: 0x3E13010002080001AFB8248B90F250000000D007

There are two vendor events before this one: 0xFF03010001, 0xFF0407044000

With the BlueNRG_GUI the sequence of events is different at the end we have and ACI_GAP_PAIRING_COMPLETE_EVENT and ACI_L2CAP_CONNECTION_UPDATE_REQ_EVENT

This are the logs of our board and from the BlueNRG_GUI:

Custom board logs:

1/02 00:00:00:058 DBG: BUTTON: button_init: 87: Button configured as EXTI (pin 0x1000)

01/01/02 00:00:00:070 DBG: BLE  : send_cmd: 121: Send_cmd: 0x01011000

01/01/02 00:00:00:074 DBG: BLE  : send_cmd: 121: Send_cmd: 0x01030C00

01/01/02 00:00:00:179 DBG: BLE  : MX_BlueNRG_MS_Init: 152: HWver 49, FWver 1827

01/01/02 00:00:00:181 DBG: BLE  : send_cmd: 121: Send_cmd: 0x010CFC080006BB0000E18002

01/01/02 00:00:00:186 DBG: BLE  : send_cmd: 121: Send_cmd: 0x0101FD00

01/01/02 00:00:00:190 DBG: BLE  : send_cmd: 121: Send_cmd: 0x0194FC00

01/01/02 00:00:00:216 DBG: BLE  : MX_BlueNRG_MS_Init: 208: aci_gap_clear_security_db --> SUCCESS

01/01/02 00:00:00:219 DBG: BLE  : send_cmd: 121: Send_cmd: 0x0185FC0104

01/01/02 00:00:00:223 DBG: BLE  : MX_BlueNRG_MS_Init: 217: aci_gap_set_io_capability --> SUCCESS

01/01/02 00:00:00:226 DBG: BLE  : send_cmd: 121: Send_cmd: 0x018AFC03040007

01/01/02 00:00:00:233 DBG: BLE  : send_cmd: 121: Send_cmd: 0x0186FC1A00000050002005AE01089D7000089F7000080710000100000001

01/01/02 00:00:00:236 DBG: BLE  : MX_BlueNRG_MS_Init: 251: BLE Stack Initialised.

01/01/02 00:00:00:239 DBG: BLE  : send_cmd: 121: Send_cmd: 0x0185FC0104

01/01/02 00:00:00:243 DBG: BLE  : MX_BlueNRG_MS_Init: 258: BLE capability 4 set successfully

01/01/02 00:00:00:246 DBG: BLE  : MX_BlueNRG_MS_Init: 277: CLIENT: BLE Stack Initialised

01/01/02 00:00:00:248 DBG: BLE  : send_cmd: 121: Send_cmd: 0x010FFC020104

01/01/02 00:00:00:252 DBG: BLE  : Make_Connection: 172: Client Create Connection

01/01/02 00:00:00:256 DBG: BLE  : send_cmd: 121: Send_cmd: 0x019CFC18D007D00701AFB8248B90F200500050000000D00702000200

01/01/02 00:00:00:261 DBG: BLE  : user_notify: 427: event FF len 3 msg: 0xFF03010001

01/01/02 00:00:00:264 DBG: BLE  : user_notify: 478: ecode: 1

01/01/02 00:00:00:266 DBG: BLE  : user_notify: 427: event FF len 3 msg: 0xFF03010001

01/01/02 00:00:00:269 DBG: BLE  : user_notify: 478: ecode: 1

01/01/02 00:00:00:803 DBG: BLE  : user_notify: 427: event FF len 4 msg: 0xFF0407044000

01/01/02 00:00:00:806 DBG: BLE  : user_notify: 478: ecode: 1031

01/01/02 00:00:00:809 DBG: BLE  : user_notify: 427: event 3E len 19 msg: 0x3E13010001080001AFB8248B90F250000000D007

01/01/02 00:00:00:812 DBG: BLE  : GAP_ConnectionComplete_CB: 361: Connected to device: = F2908B24B8AF-

01/01/02 00:00:00:815 DBG: BLE  : user_notify: 466: st: 0 hd: 2049 rl: 0 peer_addr: 1 interval 80 lt: 0 sv_to: 2000 clk_ac: 0

01/01/02 00:00:01:476 DBG: BLE  : user_notify: 427: event 05 len 4 msg: 0x05040001083E

01/01/02 00:00:01:479 DBG: BLE  : GAP_DisconnectionComplete_CB: 373: Disconnected

BlueNRG_GUI logs:

0 14:17:06.111 Job start

1 14:17:06.098 HCI_RESET(Opcode=0x0C03,#Param=0x00)

2 14:17:06.104 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x04,Num_HCI_Command_Packets=0x01,Command_Opcode=0x0C03,Status=0x00)

3 14:17:06.105 ACI_BLUE_INITIALIZED_EVENT(Event Code=0xFF,#Param=0x03,Ecode=0x0001,Reason_Code=0x01)

4 14:17:06.306 ACI_HAL_WRITE_CONFIG_DATA(Opcode=0xFC0C,#Param=0x08,Offset=0x00,Length=0x06,Value=0x0280E1003868)

5 14:17:06.322 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x04,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFC0C,Status=0x00)

6 14:17:06.328 ACI_HAL_SET_TX_POWER_LEVEL(Opcode=0xFC0F,#Param=0x02,En_High_Power=0x01,PA_Level=0x04)

7 14:17:06.338 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x04,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFC0F,Status=0x00)

8 14:17:06.342 ACI_GATT_INIT(Opcode=0xFD01,#Param=0x00)

9 14:17:06.351 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x04,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFD01,Status=0x00)

10 14:17:06.358 ACI_GAP_INIT(Opcode=0xFC8A,#Param=0x03,Role=0x04,privacy_enabled=0x00,device_name_char_len=0x07)

11 14:17:06.364 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x0A,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFC8A,Status=0x00,Service_Handle=0x0005,Dev_Name_Char_Handle=0x0006,Appearance_Char_Handle=0x0008)

12 14:17:06.368 ACI_GATT_UPDATE_CHAR_VALUE(Opcode=0xFD06,#Param=0x0D,Service_Handle=0x0005,Char_Handle=0x0006,Val_Offset=0x00,Char_Value_Length=0x07,Char_Value=0x47524E65756C42)

13 14:17:06.375 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x04,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFD06,Status=0x00)

14 14:17:06.388 Job finished

15 14:17:13.928 Job start

16 14:17:13.914 ACI_GAP_CLEAR_SECURITY_DB(Opcode=0xFC94,#Param=0x00)

17 14:17:13.941 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x04,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFC94,Status=0x00)

18 14:17:13.943 ACI_GAP_SET_IO_CAPABILITY(Opcode=0xFC85,#Param=0x01,IO_Capability=0x04)

19 14:17:13.946 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x04,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFC85,Status=0x00)

20 14:17:13.947 ACI_GAP_SET_AUTHENTICATION_REQUIREMENT(Opcode=0xFC86,#Param=0x0C,Bonding_Mode=0x01,MITM_Mode=0x00,SC_Support=0x00,KeyPress_Notification_Support=0x00,Min_Encryption_Key_Size=0x07,Max_Encryption_Key_Size=0x10,Use_Fixed_Pin=0x00,Fixed_Pin=0x00000000,Identity_Address_Type=0x00)

21 14:17:13.950 HCI_COMMAND_COMPLETE_EVENT(Event Code=0x0E,#Param=0x04,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFC86,Status=0x00)

22 14:17:13.954 Job finished

23 14:17:24.658 Job start

24 14:17:24.658 ACI_GAP_START_GENERAL_DISCOVERY_PROC(Opcode=0xFC97,#Param=0x06,LE_Scan_Interval=0x07D0,LE_Scan_Window=0x07D0,Own_Address_Type=0x00,Filter_Duplicates=0x00)

25 14:17:24.665 HCI_COMMAND_STATUS_EVENT(Event Code=0x0F,#Param=0x04,Status=0x00,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFC97)

26 14:17:24.671 Job finished

152 14:17:34.683 HCI_LE_META_EVENT(Event Code=0x3E,#Param=0x1E,Subevent_Code=0x02,Num_Reports=0x01,Event_Type=[0x04],Address_Type=[0x01],Address=[0xF2908B24B8AF],Length_Data=[0x12],Data=[[0x11,0x07,0x9E,0xCA,0xDC,0x24,0x0E,0xE5,0xA9,0xE0,0x93,0xF3,0xA3,0xB5,0x01,0x00,0x40,0x6E]],RSSI=[0xC9])

155 14:17:34.911 ACI_GAP_PROC_COMPLETE_EVENT(Event Code=0xFF,#Param=0x05,Ecode=0x0407,Procedure_Code=0x02,Status=0x00,Data_Length=0x00,Data=0x0)

156 14:17:42.280 Job start

157 14:17:42.282 ACI_GAP_CREATE_CONNECTION(Opcode=0xFC9C,#Param=0x18,LE_Scan_Interval=0x07D0,LE_Scan_Window=0x07D0,Peer_Address_Type=0x01,Peer_Address=0xF2908B24B8AF,Own_Address_Type=0x00,Conn_Interval_Min=0x0014,Conn_Interval_Max=0x0028,Conn_Latency=0x0000,Supervision_Timeout=0x0064,Minimum_CE_Length=0x0002,Maximum_CE_Length=0x0002)

158 14:17:42.292 HCI_COMMAND_STATUS_EVENT(Event Code=0x0F,#Param=0x04,Status=0x00,Num_HCI_Command_Packets=0x01,Command_Opcode=0xFC9C)

159 14:17:42.296 Job finished

160 14:17:42.711 ACI_GAP_PROC_COMPLETE_EVENT(Event Code=0xFF,#Param=0x05,Ecode=0x0407,Procedure_Code=0x40,Status=0x00,Data_Length=0x00,Data=0x0)

161 14:17:42.727 HCI_LE_META_EVENT(Event Code=0x3E,#Param=0x13,Subevent_Code=0x01,Status=0x00,Connection_Handle=0x0801,Role=0x00,Peer_Address_Type=0x01,Peer_Address=0xF2908B24B8AF,Conn_Interval=0x001E,Conn_Latency=0x0000,Supervision_Timeout=0x0064,Master_Clock_Accuracy=0x00)

162 14:17:44.887 HCI_ENCRYPTION_CHANGE_EVENT(Event Code=0x08,#Param=0x04,Status=0x00,Connection_Handle=0x0801,Encryption_Enabled=0x01)

163 14:17:45.187 ACI_GAP_PAIRING_COMPLETE_EVENT(Event Code=0xFF,#Param=0x06,Ecode=0x0401,Connection_Handle=0x0801,Status=0x00,Reason=0x00)

164 14:17:47.737 ACI_L2CAP_CONNECTION_UPDATE_REQ_EVENT(Event Code=0xFF,#Param=0x0F,Ecode=0x0802,Connection_Handle=0x0801,Identifier=0x03,L2CAP_Length=0x0008,Interval_Min=0x00C0,Interval_Max=0x00C8,Slave_Latency=0x0000,Timeout_Multiplier=0x0190)

165 14:18:47.775 HCI_DISCONNECTION_COMPLETE_EVENT(Event Code=0x05,#Param=0x04,Status=0x00,Connection_Handle=0x0801,Reason=0x13)

Thanks

1 REPLY 1
julius_21
Associate II

Hi

I think the problem was the firmware version. I have tested a SPBTLE-RF module with the latest release and it works.

I have a new question now.

How could I update the SPBTLE-RF with a custom board ? Is the BlueNRG GUI the only software to do this?

Thank you in advance