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.