- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
I currently have the 02200100 BLE Beacon . It working great as Beacon . However in my application I'm also looking to have a beacon scanner .
So is there any sample example that I can build upon ? or any steps that can guide me to achieving this ? or is it just simply setting the BLE profile to observer and turning the scanning option on without any code ?
Also is there a sample code or a guide for printing out information through UART
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah; So, that should be pretty simple to setup: You will need to set the device to central mode in order to scan the packets (you can scan all packets or just whitelisted packets (previously paired, etc); It is configurable in the BLE component)
You simply set the device to central, start scanning, then the scan_progress_result packets that occur will contain the data about the advertisement packet that the radio has found. Observer should behave similarly to the central device, but it deliberately limits connecting to devices. Observer and Central should either/both work for seeing beacon data, it is merely the implementation and what functionality you want it to do. The observer and broadcaster modes enable the central/peripheral modes respectively internally, but change the settings on the radio to prevent connections (as observers and broadcasters should never connect to anything).
Since you only want the beacon details, I would recommend the observer mode. Here is an example Observer device that spits out data about all advertising radios nearby: http://www.cypress.com/blog/100-projects-100-days/project-010-ble-gap-observer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please post your code so we can check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I dont have a code for a beacon scanner . I only changed the BLE module configuration to an observer with scanning enabled .
Was hoping if there is a guide a sample code on how to setup a beacon scanner 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For Bluetooth, the radio behaves in two capacities: Advertising (peripheral mode), and scanning (central mode). The Beacon example projects normally only have it set to use the peripheral mode to advertise data to other devices and wait for them to read/connect to it. In order to scan you need to have the central mode enabled.
Beacons and beacon scanners seem like opposite devices from what I looked up online. Can you explain if you are still wanting it to provide the same functionality as a beacon device? Or if it is a scanner to find other beacon devices?
If you are looking to scan packets, then you will need to use the central mode of the radio, and thus probably want to look at central examples like this (forum post containing all projects in 100 days examples), BLE central with immediate alert service, BLE GAP central and peripheral, or GAP central and observer.
Here is a link to an example project that demonstrates UART TX/RX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your replay .
What I meant is making the BLE module scan to find other beacon devices 🙂
from my basic understanding about BLE which might be incorrect is that central will scan for devices that are already paired to it . What I'm trying to do is simply display all beacon details (such as Major , Minor , RSSI) , which is why i'm not sure if I should set the module as a central device or an observer device
I'll have a look into the sample project you provided . Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah; So, that should be pretty simple to setup: You will need to set the device to central mode in order to scan the packets (you can scan all packets or just whitelisted packets (previously paired, etc); It is configurable in the BLE component)
You simply set the device to central, start scanning, then the scan_progress_result packets that occur will contain the data about the advertisement packet that the radio has found. Observer should behave similarly to the central device, but it deliberately limits connecting to devices. Observer and Central should either/both work for seeing beacon data, it is merely the implementation and what functionality you want it to do. The observer and broadcaster modes enable the central/peripheral modes respectively internally, but change the settings on the radio to prevent connections (as observers and broadcasters should never connect to anything).
Since you only want the beacon details, I would recommend the observer mode. Here is an example Observer device that spits out data about all advertising radios nearby: http://www.cypress.com/blog/100-projects-100-days/project-010-ble-gap-observer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you pratt , that's exactly what I was looking for , I was not awear about the 100 projects blog 🙂
I just have one more question if anyone has used this sample project before (the day 10 ble gap observer ), When I build the project I get the following error :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you modify the program at all? On fresh download and build of it, it worked without any errors. I'm currently running psoc version 4.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had to Update Components , which is the only thing I changed at the moment because it was coming up with several errors stating that the components were outdated . I'm using PSOC creator 3.3 . I'll try it with v4 see if it works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just upgraded to V4 , working perfectllly. Thank you very much for your help and support 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good to know! You're welcome. Good luck with the scanner