QN9080-001-M17-BLE cant use Advertising model

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

QN9080-001-M17-BLE cant use Advertising model

958 Views
1758793535
Contributor I

Hi, I transplanted qn9080-001-m17 to another board, but this board has no buttons to set Bluetooth advertising. Which part of the program should I modify so that it can always be in the advertising state without buttons? Thank you!

WUWX@5AUQ}$`54F]HEQ{W_A.png33C747C57D7274009FBC428CDF75848E.jpg

0 Kudos
7 Replies

944 Views
nxf56274
NXP Employee
NXP Employee

Hi,

In main_task()

3.PNG

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

940 Views
1758793535
Contributor I

hi, I tried it ,but it didnt work. I think you might have misunderstood me. In the picture, SW2 is used to switch between ''GAP Central'' and ''GAP Peripheral'' modes, and SW1 is used to confirm the mode you switch. How to select the gap peripheral mode automatically and confirm it automatically without using the key. Achieve continuous Advertising.

按键图.png再次切换为扫描模式sw2-sw1.png

0 Kudos

933 Views
nxf56274
NXP Employee
NXP Employee

Hi,

Use a timer to configure the mcu role.  At first , the mcu configure as CENTRAL(Use BleApp_Advertise to start advertise). After , such as, 2 s, you change it to PERIPHERAL(Use App_StartScanning to start scan).  Cross run the role. If one role is connected, you can stop that timer until the connection is lost. Before you start advertising, you should stop scanning. The scan too. This is a complex program. 

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

927 Views
1758793535
Contributor I

thank you. I've solved the broadcast problem. But I have a new problem. When I use the IAR software, it can connect with my mobile phone, but if I leave the IAR software and only supply power to it, it can't run on its own. What code should I add? When the chip is powered, the program will run automatically.

0 Kudos

921 Views
nxf56274
NXP Employee
NXP Employee

Hi,

I guess the current is not enough. You may measure the working current in IAR and battery to see if it has difference.

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

906 Views
1758793535
Contributor I

Thank you. My main problem has been basically solved. I want to trouble you with some small problems. ''Tera Term'' successfully connected with 001-m17, but when I used ''Tera Term'' to display the data I sent, nothing happened. I am sure that the mobile phone has established a connection with 001-m17 and read its service.

1.png2.png3.png

0 Kudos

895 Views
nxf56274
NXP Employee
NXP Employee

Hi,

Do you confirm if the mcu get the data?  Could your board send message to phone? 

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos