Send connect request to phone

⚠️
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.
10 posts / 0 new
Last post
DanyloVodopianov
Offline
Last seen:7 months 1 day ago
加入:2019-09-30 19:35
Send connect request to phone

Hello,

I'm trying to connect my device to the phone after scanning.

My phone was previously bonded with device

1) I start scanning

2) when I found the phone and solve it with app_on_addr_solved_ind callback, found my phone at the database with IRK

3) set device address:

app_easy_gap_start_connection_to_set( 0x01, \
param->addr.addr, \
MS_TO_DOUBLESLOTS(100) );

4) stop scanning:
user_app_scan_stop();

5) send connection command to the stack:
app_easy_gap_start_connection_to();

As far as I understand, stack should call app_on_connection callback, but stack doesn't do it.

SDK: 10.0.6

Device: DA14585

Phone: iPhone 10s

Device:
PM_Dialog
Offline
Last seen:1 day 8 min ago
工作人员
加入:2018-02-08 11:03
Hi DanyloVodopianov,

Hi DanyloVodopianov,

First of all thanks for posting online and for your interest in our BLE solutions.

Hoverer, the SDK6.0.6 is obsolete, so we strongly recommend moving into our latest SDK6.0.14.

Additionally, the SDK6.0.14 is common for DA14585/586 and our newest DA14531 device.

Regarding you question, if I understood correctly, the DA14585 is acting as a Central (scanning) and the iPhone is acting as a peripheral (advertising). Could you please check if the mobile phone has changed the BD Address? Please note that if the phone is using a random address you won’t be able to be aware of the new BD address. Would it be possible to use a sniffer tool in order to capture what is happening over the air and share the log?

Thanks, PM_Dialog

DanyloVodopianov
Offline
Last seen:7 months 1 day ago
加入:2019-09-30 19:35
Hello, thank you for your

Hello, thank you for your answer.

I am sure, that I use the right BD address after scanning because before I send a connection request, I can resolve iPhone random BD address with IRK.

I also tried this with galaxy s8 and I have the same result, the phone can not get a connection request.

PM_Dialog
Offline
Last seen:1 day 8 min ago
工作人员
加入:2018-02-08 11:03
Hi DanyloVodopianov,

Hi DanyloVodopianov,

Could you share a sniffer log?

Thanks, PM_Dialog

DanyloVodopianov
Offline
Last seen:7 months 1 day ago
加入:2019-09-30 19:35
I had mistaken with SDK

I had mistaken with SDK version, I use SDK6.0.10.511. Should I update SDK?

This is the log for android

RESOLVED 65:69:8e:81:4b:ea -> random MAC addr

< RSSI: 30:96:fb:ca:f1:e6 216 (-4dBm) -> MAC and RSSI after resolving

PM_Dialog
Offline
Last seen:1 day 8 min ago
工作人员
加入:2018-02-08 11:03
Hi DanyloVodopianov,

Hi DanyloVodopianov,

Our recommendation would be to use our latest SDK which is SDK6.0.14. It is common for DA14585/586 and DA14531. This is the log for the android - in my previous comment I meant to use a Sniffer tool and capture the packets over the air. However, I can see that the address in random, so probably it is changing every time.

Thanks, PM_Dialog

DanyloVodopianov
Offline
Last seen:7 months 1 day ago
加入:2019-09-30 19:35
Thank you for your response.

Thank you for your response.

I'm trying to port your new stack, but I have an issue with files path and scatterfile:

  • Skatterfile path in Keil options: .\..\sdk\common_project_files\scatterfiles\DA14585_586.sct
  • Misc controls in Keil options: --feedback=".\unused_585.txt" .\..\sdk\common_project_files\misc\da14585_symbols.txt --symdefs=bike_alarm_main_585_symdef.txt --any_placement=best_fit --datacompressor off
  • Path to the da1458x_stack_config.h in Keil options: .\..\sdk\common_project_files
  • I attached a screen with my project tree.

I checked all paths and can not understand what is wrong

But I have these errors:

linking...

.\..\src\config\da1458x_config_basic.h(36): error: #5: cannot open source input file "da1458x_stack_config.h": No such file or directory

#include "da1458x_stack_config.h"

C:\Users\User\AppData\Local\Temp\p2334-2: 0 warnings, 1 error

.\..\src\config\da1458x_config_basic.h: Error: L6636E: Pre-processor step failed for '.\..\sdk\common_project_files\scatterfiles\DA14585_586.sct'

.\..\src\config\da1458x_config_basic.h: Error: L6372E: Image needs at least one load region.

Not enough information to produce a SYMDEFs file.

Not enough information to produce a FEEDBACK file.

Not enough information to list image symbols.

Not enough information to list load addresses in the image map.

Finished: 4 information, 0 warning and 2 error messages.

".\out_585\bike_alarm_main_585.axf" - 3 Error(s), 0 Warning(s).

附件:
PM_Dialog
Offline
Last seen:1 day 8 min ago
工作人员
加入:2018-02-08 11:03
Hi DanyloVodopianov,

Hi DanyloVodopianov,

Could you please help me to understand the steps you are following?

你是什么意思,“我想港新吗stack ” ? So, if I understood correctly, you are trying to port the application code from the SDK6.0.10 to SDk6.0.14. Is that correct? Please correct me if I am mistaken.

In that case, please take a look at theUM-B-118: DA14585-DA14531 SDK Porting Guideuser guide. This document describes the changes and the steps needed to port an application that has been developed with DA14585/DA14586 SDK 6.0.10 release, to the latest DA14585/586/531 SDK 6.0.14 release.

Thanks, PM_Dialog

DanyloVodopianov
Offline
Last seen:7 months 1 day ago
加入:2019-09-30 19:35
In my project, I have a

In my project, I have a folder with the name "sdk" and I just deleted all old files from this folder (SDK6.0.10) and copy new files from (SDK6.0.14) to this folder.

PM_Dialog
Offline
Last seen:1 day 8 min ago
工作人员
加入:2018-02-08 11:03
Hi DanyloVodopianov,

Hi DanyloVodopianov,

I would strongly recommend first checking the porting guide document - not sure if the procedure you are following is working.

Thanks, PM_Dialog