Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes "receive custom data" is not returning IP address after successful connection #35

Open
Manasmd opened this issue Nov 9, 2022 · 7 comments

Comments

@Manasmd
Copy link

Manasmd commented Nov 9, 2022

I tried it with the official ESP BLUFI App (https://github.com/EspressifApp/EspBlufiForAndroid/releases/download/v1.5.3/EspBluFi-1.5.3-24.apk)

the connection is always successful which is a good thing but sometimes the "Receive custom data" is not returning the IP address.

Is there any way to increase the wait time?
I have already increased my GATT_WRITE_TIMEOUT = 10000L;

but I guess this is only the write time, how can I increase the response wait time?

Screenshot_20221109_181812

@Manasmd Manasmd changed the title Receive custom data is not returning IP adress after sucessful connection sometimes Sometimes "receive custom data" is not returning IP address after sucessful connection Nov 9, 2022
@Manasmd Manasmd changed the title Sometimes "receive custom data" is not returning IP address after sucessful connection Sometimes "receive custom data" is not returning IP address after successful connection Nov 9, 2022
@Manasmd
Copy link
Author

Manasmd commented Nov 10, 2022

@XuXiangJun
Could you please guide me on this?

@XuXiangJun
Copy link
Collaborator

So you implemented the function of returning the IP address on the device side, right?

Normally, if there is no operation on the APP side, the connection should not be disconnected.
"Receive custom data" is triggered when the device actively sends a notify message.

@Manasmd
Copy link
Author

Manasmd commented Nov 10, 2022

Hi @XuXiangJun
Thank you so much for your reply.
Yea that's right, it's implemented on the device already. As you can see from the screenshot, it did return the IP address the first time. but the consecutive tests do not return the IP address (this happens like every 1/3 tests)

@Manasmd
Copy link
Author

Manasmd commented Nov 10, 2022

I noticed after the post configure params complete there seems to be a very short waiting time as the Disconnected is triggered very fast.

Is there a way to keep the window open longer after post configure params complete step?

@XuXiangJun
Copy link
Collaborator

APP will never close the connection actively unless you press the disconnect button.
Maybe the connection was closed by the device. Could you check the device side?

@XuXiangJun
Copy link
Collaborator

When the connection was disconnected, the error status is not printed, indicating that this is a normal disconnection.
So I think this is because the device disconnect the connection.

@Manasmd
Copy link
Author

Manasmd commented Nov 10, 2022

I see, so you mean the APP is not closing the connection and it could be the device that's setting the timeout after "post configure params complete" step?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants