Hi dialog
we are using DSPS Host project , with custom Board Da14580 ,
As soon as the slave get connected to the host, we are sending data from the slave.And after reception of data we are disconnecting the slave from the master and putting the device to sleep. Master keeps on scanning and when the device wakes up it get connected again and this procedure continues.
我t is working fine for some time and after some time, we were facing a issue(Q1).
Q1. We were facing issue in between connection and data reception. DSPS host , taking more time (say 5 to 10 minutes) between connection and data reception, after this time we are able to see user_on_disconnect() callback, without any data reception. During this above said interval(3 or 4 min) host keeps on running ,we can see user_on_system_powered() keep on running ....,what could be the issue ???
Q2. To resolve the above said issue ,in user_on_connection() we were starting periodical_timer_handler() . If connection, data reception and disconnection is not happening at the expected interval, the timer expires and we are calling user_scan_start(), else if connection happened and data received we are disconnecting the device and in user_on_disconnection() callback, we will cancel the timer. We were not able to see the function registered(myfunc) with the timer getting called when the timer expires. What might be the issue?.
peridical_timer_handler()
{
wrbl_env.read_time2 = app_easy_timer(1000 . myfunc)
}
myfunc(void)
{
user_scan_start();
}
user_on_disconnection()
{
app_easy_timer_cancel(wrbl_env.read_time2);
}
Thank you
Hello Prasath,
我调查解决你的问题。我have a few questions regarding this.
1. Which version of the DSPS are you using?
2.我n Q1 scenarios, does the host and the device connect or is there a drop in connections as well?
3. Are you using any sleep mode in the host?
Regarding your Q2, I see an error in code sample provided. The arguments 1000 and myfunc should be separated by a comma (,) instead of a period. Please check it out.
Best,
LC
Hi Dialog
Thank you for your reply.
1.DA1458x_DSPS_v_5.150.2 version i am using.
2.是的,user_on_connection后()3或4 min to receive data , then no data received finally drop in connection happening (user_on_disconnection() get called. ) (In DSPS device side sleep is there , but host never enters sleep). (This issue we were facing when range b/w Host and device is around 25ft) , if the range is nearby no issues
3. Regarding your Q2, I see an error in code sample provided. The arguments 1000 and myfunc should be separated by a comma (,) instead of a period. Please check it out.
it was a typing mistake => wrbl_env.read_time2 = app_easy_timer(1000 , myfunc)
Thank you.
Hi Dialog,
This is a gentle reminder regarding the previous mail,
We are using DSPS host and slave. Our code flow in host is like , user_scan_start -> advertisement report-> connection-> Data reception -> disconnection(In the slave side on disconnection callback we are putting the slave to sleep for 3 minutes)->user_scan_start( In disconnection callback of the host side we are starting scan again to scan for the next device).
When the range between the host and slave is less say(<20 feet), everything is working fine. When the range is more say(>20 feet), we were able to see user_on_connection() callback
but no data reception. After some time say (5 minutes) we are able to see the disconnection callback from the host. It seems like host is trying to connect but not able to connect.
Q1. Why the slave is able to advertise but not able to connect beyond certain range ?
Q2. Even if the host is not able to connect to the slave why am i not able to see the disconnection callback immediately? Why it is taking some time(say 5 minutes) for disconnection?
Q3. Is there any way to overcome this issue?
我n order to resolve this issue we had started one timer in user_on_connection() with some 10 seconds(usually connection, data reception and disconnection happens less than 10 seconds), and we are cancelling the timer in user_on_disconnection(). If user_on_disconnection callback has not been called in 10 seconds after user_on_connection(), we are calling user_scan_start() on the expiration of the timer.
Q4. Why am i not able to see the function user_scan_start getting called after expiration of the timer?
Thank you
Hello Prasanth,
Are you using the Dialog's DevKits for the applications or is it some custom desinged boards? There might be a range related issue based on the Antenna design.
From your description, I felt you trying to connet to different devices with one at each time. Is that right?
我s it possible to send us your project, so that I can try and reproduce this issue here and see what's going wrong with the system. Also, if you have any air traces from a sniffer can help a lot. I am not really sure about why the callbacks are being delayed after that has been registered and when that call is reached. I will update you as I find about the possible causes. But in the mean time the project or the sniff log will make the debugging better. Please let me know if you can send those.
Best,
LC
Hi Dialog
Thank you for your reply.
We were using custom Board DA14580 as DSPS device , DA14583 as DSPS Host.
Yes, we were connecting to multiple devices , one at a time , put DSPS DEVICE sleep , connect to next device.
Regarding sending our code please send your mail id.
Hello Prasanth,
1. As I said, the Antenna design can have effect on the range. For better RF results, please use the App Notes "AN-B-027" for reference. Also, we offer some Antenna designs to our customers to offload the RF design timeline. Let us know if you are looking for any of these.
2.The Crystal Trimming can also have a bigger impact on the radio timing. So, are you trimming your crystal during your testing? If not, please refer to "AN-B-020" Section 7 for performing crystal trimming. We also have a few recommended Crystals listed in there.
3. Regarding the project, can you provide your email address. I will send an email to that ID you provide.
Best,
LC
Hi Dialog
kousik.k@tcs.com
Thank you.
Hello Prasanth,
我have sent you a secure server link to upload your project. Please follow the link to upload the files.
Best,
LC
Hello Prasanth,
Can you please confirm if/ when you have uploaded the project.
Thanks,
LC
Hi Dialog,
我have uploaded both the host and device project with a text file addressing the issue.
Thank you.
Hello Prasanth,
我see the files. I will keep you posted on the issue.
Best,
LC
Hello Prasanth,
As you mentioned about the RSSI 20. Can you confirm what is the hardware you have tested this upon. If this is your custom board, then did you use some other projects for testing and do they have this issue?
Are you controlling/ receiving data to PC from your central device?
Regarding your projects, there are host and device projects in both Master and Slave folder. The directions in the readme.txt file were a little confusing as it mentioned only host and slave. I beleive that you are referring to host project in Master for central (host) implementation and device project in Slave for peripheral implementation. Can you please confirm this.
我wasn't able reproduce the issue here. Can you let me know if there is any specific scenario this issue would be noticed in.
Thanks,
LC
Hi Dialog,
* We are using our custom board DA14583 as master and DA14580 as salve. No we have not tested any other projects .
* Yes we are sending data, not exactly to pc but to a WiFi chip interfaced with our master through UART.
*Yes, we are referring to host project in Master for central and device project in slave for peripheral.
*When the range is less(say <20 feet), every thing is working good. When we increase the range we are facing this issue and we suppose no specific scenario other than this.
There is a delay between the connection and data reception event and after some time (5 minutes or more) we are able to see the disconnection callback being called on the host side. If the host is not able to connect, why we are not able to see the disconnection callback immediately.
Thank you
Hello Prashanth,
Since I have no means to reproduce it here, I am reviewing the code to see for the issue.
However, I would like you to consider testing other projects for the range testing. This way you can confirm if the issue is related to the application or hardware. If you haven't done it yet, please do it.
The range can also be tested on a dialog devkit that can also rule out any hardware issues. Since you are unable to get the callbacks as you cliam, there should be something going wrong in the application. I will check it out and let you know what the issue is.
Best,
LC
Hi Dialog,
We will test with the devkit and let you know the result.
Thank you