QN9090-What is the most basic example design for a BLE Server

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

QN9090-What is the most basic example design for a BLE Server

Jump to solution
561 Views
blas_m
Contributor III

Hello there,

I am using as a base design the private_profile_server_bm to understand how the BLE APIs from NXP work but the code/design is turning a nightmare.
it contains a loads of folders and libraries for the QN9090-DK6 board.
For the point of view of an Application development, the folder "source" seems to encapsulate all required files. However, inside this folder there is a "common" folder which contains some additional files. In particular:
- ApplMain.c : This files seems to include the main loop of the BLE application (main_task()), which it calls then App_Thread(), which in turn calls App_HandleHostMessage(). This last function has a case for BLE message: 
- gAppGapGenericMsg_c
- gAppGapAdvertisementMsg_c
- gAppGapScanMsg_c .....
The ONLY messages type that seems to be received are: gAppGapGenericMsg_c.  Then the customer application function gets called: BleApp_GenericCallback(). This is the first function included in what seem to be the Development files ( in this example design, private_profile_server.c)
This is using a bare-metal example design but the amount of calls to reach the first point where a designer can modify the code seems excessive. Plus there are some calls to events queues and other functions/variable which are not accessible from the private_profile_server.c file
main_task() ->  App_Thread() -> App_HandleHostMessage()
-> BleApp_GenericCallback()

blas_m_0-1683302006051.png


- is there any more basic/simplified example design showing a BLE Server stack for the QN9090 device?
- is there some information about how this example design: private_profile_server project works, in terms of APIs and BLE states, call-back functions?

0 Kudos
1 Solution
545 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @blas_m ,

Thanks for contacting NXP support.

QN9090 provided a lot of design for  BLE,  I believe these design below could be helpful :

- For BLE Client, "beacon_bm" is the most basic example design, it works as BLE peripherals, and you can connect it with "IOT ToolBox" app on your smart phone.

- For BLE Server, "Alert Notification Server" and "Location and Navigation Server" is worth for a try.

- And also, "wireless_uart" is a basic example design can work as both central role and peripheral role.

 

For the last question, if you want to make custom modifications for your apps, please pay attention to the source/"$projectname.c" file and find the BleApp_GenericCallback() function, the switch loop in this function contains the most cases it uses and you can custom modify or add something you need. Connect Callback and Scanning Callback are important as well.

Regarding how to use these designs,you can refer to this document "Bluetooth Low Energy Demo Applications User's Guide.pdf". It is placed at this path "SDK_2_6_205_QN9090DK6\docs\wireless\Bluetooth\Bluetooth Low Energy Demo Applications User's Guide.pdf". For code, variable and function details, please refer to this document "Bluetooth Low Energy Application Developer's Guide.pdf".

Hope you are doing well!

 

Best regards,

Gavin

 

 

 

View solution in original post

Tags (1)
0 Kudos
2 Replies
521 Views
blas_m
Contributor III

Thank you Gavin for pointing out to those NXP documents for QN9090. 
I definitely take not about the example designs recommended too, although I would not consider "wireless_uart" as a basic example

thank you for your help!! much appreciate it

0 Kudos
546 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @blas_m ,

Thanks for contacting NXP support.

QN9090 provided a lot of design for  BLE,  I believe these design below could be helpful :

- For BLE Client, "beacon_bm" is the most basic example design, it works as BLE peripherals, and you can connect it with "IOT ToolBox" app on your smart phone.

- For BLE Server, "Alert Notification Server" and "Location and Navigation Server" is worth for a try.

- And also, "wireless_uart" is a basic example design can work as both central role and peripheral role.

 

For the last question, if you want to make custom modifications for your apps, please pay attention to the source/"$projectname.c" file and find the BleApp_GenericCallback() function, the switch loop in this function contains the most cases it uses and you can custom modify or add something you need. Connect Callback and Scanning Callback are important as well.

Regarding how to use these designs,you can refer to this document "Bluetooth Low Energy Demo Applications User's Guide.pdf". It is placed at this path "SDK_2_6_205_QN9090DK6\docs\wireless\Bluetooth\Bluetooth Low Energy Demo Applications User's Guide.pdf". For code, variable and function details, please refer to this document "Bluetooth Low Energy Application Developer's Guide.pdf".

Hope you are doing well!

 

Best regards,

Gavin

 

 

 

Tags (1)
0 Kudos