EPSONePOS / ePOS

EPSON ePOS Printer Sample
28 stars 4 forks source link

Timeout parameter not taken into account #4

Open eino opened 5 years ago

eino commented 5 years ago

Hi, I'm printing with an Epson printer (TM-10) in Bluetooth using this SDK

I call the connect function like this: mPrinter.connect("BT:00:01:...", 3000);

However, the library ignores the value I pass for timeout. Whatever I pass, it takes around 35 seconds to fail.

The documentation specifies that

timeout :Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

So I guess it should work. Why is the timeout not working ? It seems to be a bug in the SDK.

MahmoudiOussama commented 5 years ago

Hi, I think my answer is a litle dump, but have you tried to pass 3 instead of 3000 ? It may accept seconds instead of millis.

eino commented 5 years ago

Hi, thanks for the idea. I tried, but the SDK raises an exception with the ERR_PARAM error.