Tanganelli / CoAPthon3

CoAPthon3 is a porting to python3 of my CoAPthon library. CoAPthon3 is a python3 library to the CoAP protocol compliant with the RFC. Branch is available for the Twisted framework.
MIT License
59 stars 50 forks source link

Truncated answers #29

Open bobzomer opened 4 years ago

bobzomer commented 4 years ago

We use CoAPthon3 to communicate with Philips air purifier (see https://github.com/rgerganov/py-air-control/). In some cases, with some models, the CoAP answer is truncated by the library.

We can see in coapthon/client/coap.py, line 239, method receive_datagram:

                datagram, addr = self._socket.recvfrom(1152)

I've cloned the CoAPthon3 library and modified this line to:

                datagram, addr = self._socket.recvfrom(1500)

And now it works properly.

I will make a PR. Would you think possible to accept it and update pip package accordingly?

Tanganelli commented 4 years ago

yes of course

Il giorno gio 21 mag 2020 alle ore 08:11 bobzomer notifications@github.com ha scritto:

We use CoAPthon3 to communicate with Philips air purifier (see https://github.com/rgerganov/py-air-control/). In some cases, with some models, the CoAP answer is truncated by the library.

We can see in coapthon/client/coap.py, line 239, method receive_datagram:

            datagram, addr = self._socket.recvfrom(1152)

I've cloned the CoAPthon3 library and modified this line to:

            datagram, addr = self._socket.recvfrom(1500)

And now it works properly.

I will make a PR. Would you think possible to accept it and update pip package accordingly?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Tanganelli/CoAPthon3/issues/29, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTPN6UYQLIXAV64P3V45CTRSTAZTANCNFSM4NGSLLJA .

rgerganov commented 4 years ago

Any plans to release a new PyPI version with this fix?