DA 14580 timer packet switch

⚠️
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.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
florent
Offline
Last seen:3年5个月前
加入:2017-08-08 11:42
DA 14580 timer packet switch

Hi Dialog,

I am currently working on a project which use a DA 14580. The goal of my system simple : i send data ( packet of 20 octets ) through an SPI link to the DA14580. Then i use the beacon mode to send this data ( placing the data from the SPI reads in the advertising string ) and i am able to receive all that data with my mobile phone's bluetooth scanner. I work on IAR for the global code ( collect data from sensor and send them to SPI flash link ), and i load a binary file for the Bluetooth configuration. The binary file is created when i build my Bluetooth program on U vision.

My problem is that I don't receive all the data that is send, and some of the data exchange of place . I mean, to be sure, instead of putting the sensor's data in the SPI link, I put number that I selected. You can see on the PDF attached, what i did. Then, you can see on the 2 screenshot below, that i receive different value for the same packet, and i only took 2 screenshot, but some of the value exchange their place ( like for example, 66 switch with 99).

It also seem that the data 44 is always deleted.

Any idea to 'stabilized' the system let me know.

Best regards,
Florent

附件:
Device:
MT_dialog
Offline
Last seen:1 month 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi florent,

Hi florent,

Something should be wrong with the way that you change the advertising string, do you stop and start the advertising procedure when you are about to change the advertising string ? Is your advertising string properly formated ? When you start the advertising procedure and you populate the advertising string, are you able to see that the data that you 've copied in the adv_data[] array are indeed copied to the gapm_start_advertising_cmd message ? There is no obvious reason for what you are experiencing, you need to debug your fw in order to check why that happens.

Thanks MT_dialog

florent
Offline
Last seen:3年5个月前
加入:2017-08-08 11:42
Hi Dialog,

Hi Dialog,

I send payload of 20 octets through the SPI link each 1 second, then each time that the DA14580 detect a packet, it start advertising during a define time, then it stop until the next packet. I think that my advertising string is properly formatted, i had a look to it and it seems to be good.

I would like to see the data that I have copied in the adv_data[] array are indeed copied to the gapm_start_advertising_cmd, but I don't know how to see that.

In addition, I would like to know if there is a circular buffer somewhere, because the data seems to be shift after sometimes. Moreover, some values seems to be awlays receive, and some other like the 44 are always missing.

Thanks,
Florent

MT_dialog
Offline
Last seen:1 month 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi florent,

Hi florent,

In order to demonstrate how you can check the data inserted in the advertising string i will assume that you are using the ble_app_barebone example. So, starting from the user_app_adv_start, you allocate a gapm_start_advertise_cmd pointer and you go through the cmd = app_easy_gap_undirected_advertise_get_active(), so the cmd sturcture pointer is holding the address of the entire advertising message, therefore if you check the cmd->info.host.adv_data[] you should be able to see the advertising data that are copied to the advertising message struct and are about to be send to the stack in order for the advertising to start. Regarding the circular buffer, no there is no such thing in the advertising procedure.

Thanks MT_dialog