AnsweredAssumed Answered

Adapt Ble app from HRS sdk demo

Question asked by Florian Lebrun on Oct 29, 2018
Latest reply on Nov 9, 2018 by Estephania Martinez

Hi,

 

I'm using the r41Z module based on NXP KW41 ble module.

 

I able to run the demo without issue with Android Application IoT Toolbox  .

 

I also succed in added my two driver sensors to my code in the main, and print in debug mode my data into the console.

 

Now is the time to send my sensors data via ble, and i have to admit that, after few days reverse engineering the code, i'm a bit lost. I have difficulties to find in which file i have to implement my code. I understood i have to add services in .h etc...

 

My application has this simple behavior:

 

1)Sleep ( consume few uA to save max battrie)

2)Wake up periodically, advertise....

      - if no body interested, go back to sleep for one minute.

      - if a central is present, establish connexion, read sensors , send data each 1 second

3) If central is not responding anymore,Go back to 1)

 

Example seems to work a lot with callback functions and Timer function ( like LED bliking management for example). 

 

There is so much files in the projects i'm a bit lost. I search in all the documentation without to find real developpement info but more example user info.

Doc i used were here : mcuxpresso\01\SDKPackages\SDK_2.2.0_FRDM-KW41Z\docs

 

The product is really perfect, i really would like to be able to manage it the proper way.

 

Q1) Is there a document that would explain the framework, which file to works with please and integrate sleep mode , reading of my sensors, periodical wake up ...?

 

Q2) i'm using the internal regulator to supply my two sensors, is it possible to switch on/off when we want to save batterie when module sleep for example ?

 

Thanks a lot for your help

 

Florian

Outcomes