Comments (2)
Hi brain112,
GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData);
This function is designed to be called in the initialization state,so it may cause status errors when called in other stages.
You can use this function to update the advertising data:
/**
* @brief Setup or change advertising and scan response data.
*
* @note if the return status from this function is SUCCESS,the task isn't complete
* until the GAP_ADV_DATA_UPDATE_DONE_EVENT is sent to the calling application task.
*
* @param taskID - task ID of the app requesting the change
* @param adType - TRUE - advertisement data, FALSE - scan response data
* @param dataLen - Octet length of advertData
* @param pAdvertData - advertising or scan response data
*
* @return SUCCESS: data accepted
* bleIncorrectMode: invalid profile role
*/
extern bStatus_t GAP_UpdateAdvertisingData( uint8_t taskID, uint8_t adType, uint16_t dataLen, uint8_t *pAdvertData );
This function wiil send a message to a valid taskID
, if you use the Peripheral_TaskID
, you can handle the message here:
static void Peripheral_ProcessGAPMsg(gapRoleEvent_t *pEvent)
{
switch(pEvent->gap.opcode)
{
case GAP_ADV_DATA_UPDATE_DONE_EVENT:
PRINT("%s data update status: %#x\n",
pEvent->dataUpdate.adType ? "adv" : "scan", pEvent->dataUpdate.hdr.status);
break;
...
from ch583.
Hi zerosensei,
This works! Thank you!
from ch583.
Related Issues (16)
- Repository is named ch582 but files say CH583 HOT 1
- CAN you Add Rt-Thread Project? HOT 1
- R8_PLL_CONFIG and R8_FLASH_CFG are undocumented
- Temperature sensor documentation incomplete HOT 4
- BLE is undocumented HOT 1
- RTC wakeup example for PM demo HOT 2
- Bricked the BLE functionality of my dev board HOT 2
- Bluetooth 5 Extended Advertisements HOT 4
- BLE and timer capture HOT 1
- cannot find -lCH58xBLE HOT 1
- CTE extension on ch582 HOT 6
- Using with lora radio HOT 1
- Schematic for CH582F HOT 1
- CH582M won't work at system frequency 2 MHz and lower
- Information Request: BLE & USB certifications HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ch583.