1 Reply Latest reply on Aug 21, 2015 9:03 AM by mifo

    SPI data with Dynamic advertising data

    jfannon

      I am trying to create a BLE module that broadcasts accelerometer data in its advertising packet.I am using the Anaren MSDB board or the Anaren Tiny Reference Design for my hardware.  They have their A20737A module and the ST LIS3DH accelerometer already on the board. 

       

      I used the BCM_iBeacon as my starting place for the code.  I have ported the SPI and LIS3DH libraries from Anaren's online Atmosphere development tool into the project to simplify the SPI communication.  Within the APPLICATION_INIT() function, I can initialize the SPI and communicate with the accelerometer.  After I do this, I then call bleapp_set_cfg(NULL, 0, NULL, (void *)&mybeacon_puart_cfg, NULL, mybeacon_create);.  This configures the advertising data and sets up bleprofile_notifyAdvPacketTransmissions().

       

      Within the function that is called before each advertisement, I can successfully increment data and see that change in the advertisement data.  If I try to do a SPI call, I get 1-3 advertisements and then the module stops advertising.

       

      I'm not sure what is happening that the module stops advertising.  Can somebody please help me to resolve this.

       

      Thank you.