Ousret / pyTeliumManager

Python library to manipulate Ingenico mobile payment device like iCT220 or iWL220 equipped with Telium Manager. RS232/USB.
http://pyteliummanager.readthedocs.io
MIT License
104 stars 20 forks source link

A non-intrusive way to check everything is OK #9

Closed azmeuk closed 4 years ago

azmeuk commented 5 years ago

Hi. First of all, thank you for your work.

In the documentation I did not see nothing about checking the terminal status. I would love such a feature. Ideally a Telium.is_ok() returning a boolean wether the terminal is ready or not (something may has happened with the software, the terminal wire may have been disconnected etc.)

What do you think?

Ousret commented 5 years ago

Hi,

Sorry for the delay.

You are welcome. I remember trying to implement something like Telium.is_ok() but for some reason this could lead to bugs. I was trying to send ACK .. waiting for answer .. then send NAK. When I tested it in real condition I noticed that some transaction randomly ended up with NAK. Maybe it was isolated.

Do you think you could propose a PR and test it locally ?

Thank.

Ousret commented 4 years ago

Should be fixed by #12

azmeuk commented 4 years ago

Thank you!