- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can use blecm_startAdv and blecm_startScan to scan and send advertise at the same time. However, when I stop the scan using the following function, the advertise also stop. Is it by design? How can I keep the device sending advertise?
blecm_setScanEnable(HCIULP_SCAN_MODE_OFF, blecen_cen_cfg.filter_duplicates);
- Labels:
-
Scanning-Advertising
-
SDK 2.X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the same thing happen when you use the user-level functions below to start and stop scans and advertisements?
blecen_Scan
bleprofile_Discoverable
Are you able to restart advertisements after the setScan function turns them off?
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am able to restart the advertisements. I did not try to use blecen_Scan and bleprofile_Discoverable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please see if the problem persists when you use the user-level functions blecen_Scan and bleprofile_Discoverable.
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to use the original functions because of the two reason. I do not want to have timer to stop them and also I need to configure the channel for sending advertise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll be fine restarting advertisements every time you stop a scan since you won't be interrupting timers. I can't narrow down the problem if I can't confirm it persists with the user-level functions.
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the user-level functions use blecm_startAdv, blecm_startScan, and blecm_setScanEnable. So, the same problem should be there. Is it not true?
I did the following test:
run blecen_Scan(LOW_SCAN) and bleprofile_Discoverable(LOW_UNDIRECTED_DISCOVERABLE) -> there is No beacon.
run blecm_startScan and bleprofile_Discoverable(LOW_UNDIRECTED_DISCOVERABLE) -> there is beacon.
run blecm_startScan and bleprofile_Discoverable(LOW_UNDIRECTED_DISCOVERABLE) and blecen_Scan(NO_SCAN)-> there is NO beacon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The user-level functions do, indeed, use these functions but they also do a few additional things on top of just calling these lower level functions. We needed to rule out it being a problem stemming form the upper layers.
I'll attempt to emulate the problem later today and get back to you.
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't reproduce this. If I quickly start and stop a scan, it doesn't stop my advertisements. Perhaps it's because you're in connection when you're calling these? Try a call to blecm_setAdvDuringConnEnable(TRUE);
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have added blecm_setAdvDuringConnEnable(TRUE);
The device scans for other adv. When the device connects to others as the master, the following messages show that it stops its own Adv:
15:41:15 Connection is UP.
15:41:15 connUp
15:41:15 noAdv
Any idea why it stops adv?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your initial question said that advertisements are stopped when you stopped scans. Is this not the case? Is it only when you enter connection?
"noAdv" is printed when bleprofile_Discoverable(NO_DISCOVERABLE, NULL) is called. This happens below the application level in the connection process and cannot be prevented from happening.
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am still verifying my initial question.
You suggested that maybe the node enter connection mode and blecm_setAdvDuringConnEnable(TRUE). So, I tested it and see the "noAdv" log.
But I did not call bleprofile_Discoverable. There is no bleprofile_Discoverable in my code at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This happens below the application level in the connection process and cannot be prevented from happening.
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, even when I set blecm_setAdvDuringConnEnable(TRUE), as long as a slave connects to the master, the master will stop sending adv?
Do some other functions call bleprofile_Discoverable(NO_DISCOVERABLE, NULL) ? I am not sure why when a connection is up, the bleprofile_Discoverable(NO_DISCOVERABLE, NULL) needs to be called...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you must restart them after the connection process is compete.
Jacob