KW38 - BLE central and peripheral simultaneously

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KW38 - BLE central and peripheral simultaneously

Jump to solution
2,267 Views
dawid_kasieczka
Contributor III

Hello, I'm using FRDM-KW38 board for BLE purposes. SDK version is 2.6.6 and MCUXpresso v11.1.1. I'm trying to create application that works as peripheral (advertises and is connectable) and scan at the same time, connecting to another peripherals. Is it possible with this MCU and SDK? I looked through provided examples but didn't find anything that fits my GAP structure idea. If it's possible, how I can achieve it? 

Labels (2)
0 Kudos
1 Solution
2,193 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Dawid, I hope you're doing well!

 

It's possible to change the GAP role of the device, maintain current connections, and then form a new connection using the new GAP role. This can be observed when using the Wireless UART SDK example for the FRDM-KW38 by following this procedure:

Two FRDM-KW38 devices and a mobile phone with the IoT Toolbox App are needed for this procedure.

  1. Program both FRDM-KW38 devices with the Wireless UART SDK Example (…\SDK_2.6.6_FRDM-KW38\boards\frdmkw38\wireless_examples\bluetooth\w_uart)
  2. Change the role on FRDM board A to GAP Peripheral and start advertising.
  3. Connect to FRDM board A using the IoT Toolbox phone app.
  4. Change the role on FRDM board A to GAP central and start scanning. Change the role on FRDM board B to GAP peripheral, and start advertising.
  5. Now both the phone and FRDM board B should be connected to FRDM board A.

 

Please let me know if you need any more information.

 

Best regards,

Sebastian

View solution in original post

2 Replies
2,194 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Dawid, I hope you're doing well!

 

It's possible to change the GAP role of the device, maintain current connections, and then form a new connection using the new GAP role. This can be observed when using the Wireless UART SDK example for the FRDM-KW38 by following this procedure:

Two FRDM-KW38 devices and a mobile phone with the IoT Toolbox App are needed for this procedure.

  1. Program both FRDM-KW38 devices with the Wireless UART SDK Example (…\SDK_2.6.6_FRDM-KW38\boards\frdmkw38\wireless_examples\bluetooth\w_uart)
  2. Change the role on FRDM board A to GAP Peripheral and start advertising.
  3. Connect to FRDM board A using the IoT Toolbox phone app.
  4. Change the role on FRDM board A to GAP central and start scanning. Change the role on FRDM board B to GAP peripheral, and start advertising.
  5. Now both the phone and FRDM board B should be connected to FRDM board A.

 

Please let me know if you need any more information.

 

Best regards,

Sebastian

2,194 Views
dawid_kasieczka
Contributor III

Thanks for the answer! That what I was exactly looking for. I modified it slightly to scan and advertise at the same time and it worked. That's good enough base for development of my app.

0 Kudos