⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
Avouaill
Offline
Last seen:3 years 8 months ago
加入:2016-09-19 15:21
DA14580 Beacon

Hi,

I currently use my DA14580 BLE module in connection mode with the version 5.150.2 of the code.
I would like to use the the module with the beacon mode project and configure it to send Eddystone packets. Do you know if i have to change the project ? If yes could you tell me which one i should download among these available on your website and what i should change ?

Thanks in advance

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi Avouaill,

Hi Avouaill,

The Beacon project is using a quite old SDK, so taking that as an example and modify it in order to support the EDDYSTONE format, isn't something that i would recommend, what you can do is take the BEACON example as a reference (in order to check the beacon related configurations, the non-connectable advertising, etc) and use the barebone example as a base for your project. In order to implement an EDDYSTONE you will just have to format the advertising string of the device accoring to the Eddystone specification.

如果你正在寻找一些快捷dirty and just change the advertising string of the beacon reference design to Eddystone format you can just download the beacon and change the advertising string that the beacon uses (in the nvds.c file in the NVDS_TAG_APP_BLE_ADV_DATA and reduce the length of the ADV_DATA_TAG_LEN accoring to the length of the advertising string), like below:

.NVDS_TAG_APP_BLE_ADV_DATA = {0x03,0x03,0xAA, 0xFE,0x15,0x16,0xAA, 0xFE, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,0x00, 0x03,0x00, 0x02},

.ADV_DATA_TAG_LEN = 26,

由于MT_dialog

Avouaill
Offline
Last seen:3 years 8 months ago
加入:2016-09-19 15:21
hi,

hi,

Thanks for your reply, i will try that

Avouaill
Offline
Last seen:3 years 8 months ago
加入:2016-09-19 15:21
Hi,

Hi,

I finally picked the beacon project : the version 3.40.6_0 available on your website.

I can see the BLE module using a snifer.

Now i try to send data from the uC to the BLE module via SPI. That part looks to be working since i can check the SPI data flowing on the pins.
But when i use the snifer the BLE doesn't send anything (or it looks like).

Do you know if i have to modify something from the origin project to make it work ?

Moreover i saw that the SPI is configured in master mode on the BLE project while in my case i use it in slave mode. I tried to change few things but still not working.

Thanks in advance

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi Avouaill,

Hi Avouaill,

The beacon reference design doesn't implement functionallity to accept data from the SPI interface from an external ucontroller and populate the advertising string, this is an implementation that you will have to apply, what the beacon does is to read data from an external SPI flash from a specific header and a specific address and populate the advertising string with the data read from the flash.

I trust that you ve have a custom implementation on this that should go like below:

  • Start a timer that will define the time that the device will keep on advertising.
  • When the timer elapses issue a command to stop advertising.
  • When you get the callback that the device has stopped advertising (somehow, depending on which device is the master of the SPI bus you will have to get data from the SPI interface).
  • As soon as you get the new advertising data, you should fill in the start advertise command with the new advertising string obtained from the SPI and send the start advertising command to the stack.
  • As soon as you do that and if the command completes succesfully you should see the device advertising.

Regarding the fact that you dont see the device advertising and since you are getting the data from the external controller (make sure that you do, check the buffer that you store that data from the SPI interaction), the advertising string might be wrong (duplicated tags, etc). So if you get the data from the external device and you send the advertising command (GAPM_START_ADVERTISE_CMD) this command should reply with a GAPM_CMP_EVT (if not executed) and should return a status (cancelled), so check for that callback and from there you can have a hint why the device is not advertising. Also i would recommend to use the latest SDK for your project instead of using the beacon reference design which is builded on a much older SDK. You can check the ble_app_barebone project for example.

由于MT_dialog