Giter Site home page Giter Site logo

[+]Response timeout about fpm HOT 10 CLOSED

brianrho avatar brianrho commented on August 17, 2024
[+]Response timeout

from fpm.

Comments (10)

brianrho avatar brianrho commented on August 17, 2024

What command gives this error? What's your baud rate? Post a minimal example of the code that yields this behaviour (with Pastebin.com)

from fpm.

TehseenHasan avatar TehseenHasan commented on August 17, 2024

When Client connected to ESP8266 and it makes some requests like call a URL like 192.168.4.1/count then timeout error appears in Serial monitor...

This is the minimal code: https://pastebin.com/zMZpqzkU

Sometimes it also give error like this with different values:
[+]Packet too long: 128

While simple timeout error is very frequent:
image

Note: Timeout Error occurs no matters WiFi is ON or OFF. But timeout error + Packet too long error occurs more frequently when Client is communicating with ESP8266 using its WiFi Access Point.
For Example see this image of Serial Terminal below:
Serial

from fpm.

brianrho avatar brianrho commented on August 17, 2024

First, fix the return type of get_template_count and rtn_val to int16_t if you'll be using negative values.
Are you using the most recent version of the library and is the current debug level ERRORS ONLY? Check FPM.h to be sure.
Does this timeout error occur only when you try to get the template count? Try the template count example a few times and see if you still get any error.

from fpm.

TehseenHasan avatar TehseenHasan commented on August 17, 2024

First, fix the return type of get_template_count and rtn_val to int16_t if you'll be using negative values.

Okay I changed the data type.

Are you using the most recent version of the library and is the current debug level ERRORS ONLY? Check FPM.h to be sure.

Yes I'm using most recent version. I just downloaded the library from here at github. And Debug level is default (Errors Only) in FPM.h

Does this timeout error occur only when you try to get the template count? Try the template count example a few times and see if you still get any error.

No, timeout error occurred no matters I count the fingerprints, Enroll a new Fingerprint or Search. Timeout occurs each time randomly (mostly when WiFi is ON).

Important:
Timeout occurs very rarely when WiFi is OFF and I just give commands through Serial. But as soon as I Turn WiFi ON and Client is connected to ESP8266 timeout error start coming more and more...

See this is the latest results:

Capture

from fpm.

brianrho avatar brianrho commented on August 17, 2024

You're powering the circuit through your Wemos USB port, right? Do you have anything else connected to the Wemos besides the R301T? Since the timeouts only happen when you turn on the Wi-Fi (soft AP?), it's possible that you're simply not providing enough power for the ESP8266 and R301T. So try powering the R301 with some other source (maybe another USB port).

Also try increasing FPM_DEFAULT_TIMEOUT to 5000 and see if it still times out.

from fpm.

TehseenHasan avatar TehseenHasan commented on August 17, 2024

1. Yes I was powering Wemos with its MicroUSB port. There is a Buzzer Module and an LED in my circuit along with Wemos D1 Mini and Fingerprint Sensor.
Now I attached 5V 2A external power supply to this circuit. But error did not resolve. Timeout still occurs .

2. I changes FPM_DEFAULT_TIMEOUT value to 5000, 10000 and 500 too but timeout error is still there...

I noted that when Timeout error occurs fingerprint module stop searching (stuck) for FPM_DEFAULT_TIMEOUT seconds. I mean after error appear fingerprint sensor stops working and then start working again after the timeout value seconds set for FPM_DEFAULT_TIMEOUT.
So to avoid the bad behavior of stop responding of the fingerprint sensor during timeout error I just changed the FPM_DEFAULT_TIMEOUT value to 500 hence when timeout error occurs it stops sensor's working only for 0.5 seconds and then sensor is alive again. So by doing this, somehow now my system is working despite of timeout errors are still there but at least my fingerprint sensor does not stops and stuck.

I think there are some sort of compatibility issues of this FPM Library with ESP8266 Modules.
I'm not an expert but please consider this issue and update the library, if possible, to add compatibility for ESP8266 modules. Thanks!

from fpm.

brianrho avatar brianrho commented on August 17, 2024

Can't add compatibility if the problem's cause is unknown, and that's assuming the issue is even with the library. This is the first time I've seen an R301 in use, so there's no precedence here. I'd recommend you try the Adafruit library and see if it works for you without timeouts. Then we could conclude that this library is likely the problem.

from fpm.

TehseenHasan avatar TehseenHasan commented on August 17, 2024

Okay but I see that this timeout error is discussed by someone else too.
#18 (comment)

from fpm.

brianrho avatar brianrho commented on August 17, 2024

That was for a different MCU and sensor. And in that case, it turned out the high speed search command wasn't supported by the module and so it was replaced with the regular search command, as well as increasing the timeout to a more reasonable 2 seconds. Yours is more general and seems more like a case of poor power supply or the module simply doesn't support these commands as documented. If you have a different sensor model, you can try it to see if the problem goes away. Or try a different library, like I already suggested.

from fpm.

TehseenHasan avatar TehseenHasan commented on August 17, 2024

Okay...

from fpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.