Skip to main content
Associate
April 2, 2024
Question

Sends a packet periodically using BLE_LLD

  • April 2, 2024
  • 1 reply
  • 759 views

I want to write a very simple program that sends a packet using BLE_LLD. For simplicity sake, for now, I prefer not using sequencer and put everything in the main loop.

According to UM2804, I should be able to do that only using HAL interfaces. I started with following code, however not working. Does anybody have the solution?

 

  HAL_BLE_LLD_Init(CFG_HS_STARTUP_TIME, true);
  HAL_BLE_LLD_Configure(POWER, CHANNEL, true, CFG_BACK2BACK_TIME, NET_ID);
  uint8_t payLoad[10]={1,2,3,4};
  while (1)
  {
      HAL_Delay(500);
      HAL_BLE_LLD_SendPacket( payLoad,4,BleCallBack);
  }
 
The source file is attached.

 

 

1 reply

STTwo-32
Technical Moderator
May 23, 2024

Hello @Severex 

You have to follow the recommendation of our application notes and user manuals to implement your application. The implementation that we support on our examples is the one based on the Sequencer since the Wireless tasks need to be executed with a perfect coordination.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.